Added patch headers.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / kernel / apic / apic-xen.c
1 /*
2  *      Local APIC handling stubs
3  */
4
5 #include <linux/init.h>
6 #include <linux/interrupt.h>
7 #include <linux/module.h>
8
9 #include <asm/smp.h>
10 #include <asm/proto.h>
11 #include <asm/apic.h>
12
13 unsigned int num_processors;
14
15 /*
16  * Map cpu index to physical APIC ID
17  */
18 DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
19 EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
20
21 /*
22  * Debug level, exported for io_apic.c
23  */
24 unsigned int apic_verbosity;
25
26 /* Have we found an MP table */
27 int smp_found_config;
28
29 static int __init apic_set_verbosity(char *arg)
30 {
31         if (!arg)  {
32 #ifdef CONFIG_X86_64
33                 skip_ioapic_setup = 0;
34                 return 0;
35 #endif
36                 return -EINVAL;
37         }
38
39         if (strcmp("debug", arg) == 0)
40                 apic_verbosity = APIC_DEBUG;
41         else if (strcmp("verbose", arg) == 0)
42                 apic_verbosity = APIC_VERBOSE;
43         else {
44                 pr_warning("APIC Verbosity level %s not recognised"
45                         " use apic=verbose or apic=debug\n", arg);
46                 return -EINVAL;
47         }
48
49         return 0;
50 }
51 early_param("apic", apic_set_verbosity);
52
53 int setup_profiling_timer(unsigned int multiplier)
54 {
55         return -EINVAL;
56 }
57
58 int __init APIC_init_uniprocessor(void)
59 {
60 #ifdef CONFIG_X86_IO_APIC
61         if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
62                 setup_IO_APIC();
63 # ifdef CONFIG_X86_64
64         else
65                 nr_ioapics = 0;
66 # endif
67 #endif
68
69         return 0;
70 }