diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-22 01:08:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-22 03:09:15 -0400 |
commit | 1b9b89e7f163336ad84200b66a17284dbf26aced (patch) | |
tree | e5f84e8c4e63de6029c38d10c979054014599874 /arch/x86/kernel/genx2apic_phys.c | |
parent | 76c3bb15d6786a0b8da0ad0090e0c9c3672fc08b (diff) |
x86: add apic probe for genapic 64bit, v2
introducing an APIC handling probing abstraction:
static struct genapic *apic_probe[] __initdata = {
&apic_x2apic_uv_x,
&apic_x2apic_phys,
&apic_x2apic_cluster,
&apic_physflat,
NULL,
};
This way we can remove UV, x2apic specific code from genapic_64.c and
move them to their specific genapic files.
[ v2: fix compiling when CONFIG_ACPI is not set ]
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/genx2apic_phys.c')
-rw-r--r-- | arch/x86/kernel/genx2apic_phys.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c index 2f3c6ca19de9..f35a3bf3a9e5 100644 --- a/arch/x86/kernel/genx2apic_phys.c +++ b/arch/x86/kernel/genx2apic_phys.c | |||
@@ -4,10 +4,30 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/ctype.h> | 5 | #include <linux/ctype.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/dmar.h> | ||
8 | |||
7 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
8 | #include <asm/ipi.h> | 10 | #include <asm/ipi.h> |
9 | #include <asm/genapic.h> | 11 | #include <asm/genapic.h> |
10 | 12 | ||
13 | DEFINE_PER_CPU(int, x2apic_extra_bits); | ||
14 | |||
15 | static int x2apic_phys; | ||
16 | |||
17 | static int set_x2apic_phys_mode(char *arg) | ||
18 | { | ||
19 | x2apic_phys = 1; | ||
20 | return 0; | ||
21 | } | ||
22 | early_param("x2apic_phys", set_x2apic_phys_mode); | ||
23 | |||
24 | static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
25 | { | ||
26 | if (cpu_has_x2apic && intr_remapping_enabled && x2apic_phys) | ||
27 | return 1; | ||
28 | |||
29 | return 0; | ||
30 | } | ||
11 | 31 | ||
12 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ | 32 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ |
13 | 33 | ||
@@ -122,6 +142,7 @@ void init_x2apic_ldr(void) | |||
122 | 142 | ||
123 | struct genapic apic_x2apic_phys = { | 143 | struct genapic apic_x2apic_phys = { |
124 | .name = "physical x2apic", | 144 | .name = "physical x2apic", |
145 | .acpi_madt_oem_check = x2apic_acpi_madt_oem_check, | ||
125 | .int_delivery_mode = dest_Fixed, | 146 | .int_delivery_mode = dest_Fixed, |
126 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), | 147 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), |
127 | .target_cpus = x2apic_target_cpus, | 148 | .target_cpus = x2apic_target_cpus, |