]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/x86/mach-generic/bigsmp.c
x86, apic: clean up target_cpus methods
[linux-2.6-omap-h63xx.git] / arch / x86 / mach-generic / bigsmp.c
1 /*
2  * APIC driver for "bigsmp" XAPIC machines with more than 8 virtual CPUs.
3  * Drives the local APIC in "clustered mode".
4  */
5 #define APIC_DEFINITION 1
6 #include <linux/threads.h>
7 #include <linux/cpumask.h>
8 #include <asm/mpspec.h>
9 #include <asm/genapic.h>
10 #include <asm/fixmap.h>
11 #include <asm/apicdef.h>
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/dmi.h>
15 #include <asm/bigsmp/apicdef.h>
16 #include <linux/smp.h>
17 #include <asm/bigsmp/apic.h>
18 #include <asm/bigsmp/ipi.h>
19 #include <asm/mach-default/mach_mpparse.h>
20 #include <asm/mach-default/mach_wakecpu.h>
21
22 static int dmi_bigsmp; /* can be set by dmi scanners */
23
24 static int hp_ht_bigsmp(const struct dmi_system_id *d)
25 {
26         printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
27         dmi_bigsmp = 1;
28         return 0;
29 }
30
31
32 static const struct dmi_system_id bigsmp_dmi_table[] = {
33         { hp_ht_bigsmp, "HP ProLiant DL760 G2",
34         { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
35         DMI_MATCH(DMI_BIOS_VERSION, "P44-"),}
36         },
37
38         { hp_ht_bigsmp, "HP ProLiant DL740",
39         { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
40         DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
41         },
42          { }
43 };
44
45 static void vector_allocation_domain(int cpu, cpumask_t *retmask)
46 {
47         cpus_clear(*retmask);
48         cpu_set(cpu, *retmask);
49 }
50
51 static int probe_bigsmp(void)
52 {
53         if (def_to_bigsmp)
54                 dmi_bigsmp = 1;
55         else
56                 dmi_check_system(bigsmp_dmi_table);
57         return dmi_bigsmp;
58 }
59
60 struct genapic apic_bigsmp = {
61
62         .name                           = "bigsmp",
63         .probe                          = probe_bigsmp,
64         .acpi_madt_oem_check            = NULL,
65         .apic_id_registered             = bigsmp_apic_id_registered,
66
67         .irq_delivery_mode              = dest_Fixed,
68         /* phys delivery to target CPU: */
69         .irq_dest_mode                  = 0,
70
71         .target_cpus                    = bigsmp_target_cpus,
72         .ESR_DISABLE                    = esr_disable,
73         .apic_destination_logical       = APIC_DEST_LOGICAL,
74         .check_apicid_used              = check_apicid_used,
75         .check_apicid_present           = check_apicid_present,
76
77         .no_balance_irq                 = NO_BALANCE_IRQ,
78         .no_ioapic_check                = 0,
79
80         .vector_allocation_domain       = vector_allocation_domain,
81         .init_apic_ldr                  = init_apic_ldr,
82
83         .ioapic_phys_id_map             = ioapic_phys_id_map,
84         .setup_apic_routing             = setup_apic_routing,
85         .multi_timer_check              = multi_timer_check,
86         .apicid_to_node                 = apicid_to_node,
87         .cpu_to_logical_apicid          = cpu_to_logical_apicid,
88         .cpu_present_to_apicid          = cpu_present_to_apicid,
89         .apicid_to_cpu_present          = apicid_to_cpu_present,
90         .setup_portio_remap             = setup_portio_remap,
91         .check_phys_apicid_present      = check_phys_apicid_present,
92         .enable_apic_mode               = enable_apic_mode,
93         .phys_pkg_id                    = phys_pkg_id,
94         .mps_oem_check                  = mps_oem_check,
95
96         .get_apic_id                    = get_apic_id,
97         .set_apic_id                    = NULL,
98         .apic_id_mask                   = APIC_ID_MASK,
99
100         .cpu_mask_to_apicid             = cpu_mask_to_apicid,
101         .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
102
103         .send_IPI_mask                  = send_IPI_mask,
104         .send_IPI_mask_allbutself       = NULL,
105         .send_IPI_allbutself            = send_IPI_allbutself,
106         .send_IPI_all                   = send_IPI_all,
107         .send_IPI_self                  = NULL,
108
109         .wakeup_cpu                     = NULL,
110         .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
111         .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
112         .wait_for_init_deassert         = wait_for_init_deassert,
113         .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
114         .store_NMI_vector               = store_NMI_vector,
115         .restore_NMI_vector             = restore_NMI_vector,
116         .inquire_remote_apic            = inquire_remote_apic,
117 };