1 #include <xen/delay.h>
2 #include <xen/init.h>
3 #include <xen/lib.h>
4 #include <xen/softirq.h>
5 #include <xen/warning.h>
6 
7 #define WARNING_ARRAY_SIZE 20
8 static unsigned int __initdata nr_warnings;
9 static const char *__initdata warnings[WARNING_ARRAY_SIZE];
10 
warning_add(const char * warning)11 void __init warning_add(const char *warning)
12 {
13     if ( nr_warnings >= WARNING_ARRAY_SIZE )
14         panic("Too many pieces of warning text.");
15 
16     warnings[nr_warnings] = warning;
17     nr_warnings++;
18 }
19 
warning_print(void)20 void __init warning_print(void)
21 {
22     unsigned int i, j;
23 
24     if ( !nr_warnings )
25         return;
26 
27     printk("***************************************************\n");
28 
29     for ( i = 0; i < nr_warnings; i++ )
30     {
31         printk("%s", warnings[i]);
32         printk("***************************************************\n");
33     }
34 
35     for ( i = 0; i < 3; i++ )
36     {
37         printk("%u... ", 3 - i);
38         for ( j = 0; j < 100; j++ )
39         {
40             process_pending_softirqs();
41             mdelay(10);
42         }
43     }
44     printk("\n");
45 }
46 
47 /*
48  * Local variables:
49  * mode: C
50  * c-file-style: "BSD"
51  * c-basic-offset: 4
52  * tab-width: 4
53  * indent-tabs-mode: nil
54  * End:
55  */
56