x86: eliminate asm/mach-*/mach_mpparse.h
[linux-2.6/x86.git] / arch / x86 / mach-generic / bigsmp.c
blob626f45ca4e7ecf64c4b924a6dfe93f7dcfed2210
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>
20 static int dmi_bigsmp; /* can be set by dmi scanners */
22 static int hp_ht_bigsmp(const struct dmi_system_id *d)
24 printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
25 dmi_bigsmp = 1;
26 return 0;
30 static const struct dmi_system_id bigsmp_dmi_table[] = {
31 { hp_ht_bigsmp, "HP ProLiant DL760 G2",
32 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
33 DMI_MATCH(DMI_BIOS_VERSION, "P44-"),}
36 { hp_ht_bigsmp, "HP ProLiant DL740",
37 { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
38 DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
40 { }
43 static void bigsmp_vector_allocation_domain(int cpu, cpumask_t *retmask)
45 cpus_clear(*retmask);
46 cpu_set(cpu, *retmask);
49 static int probe_bigsmp(void)
51 if (def_to_bigsmp)
52 dmi_bigsmp = 1;
53 else
54 dmi_check_system(bigsmp_dmi_table);
55 return dmi_bigsmp;
58 struct genapic apic_bigsmp = {
60 .name = "bigsmp",
61 .probe = probe_bigsmp,
62 .acpi_madt_oem_check = NULL,
63 .apic_id_registered = bigsmp_apic_id_registered,
65 .irq_delivery_mode = dest_Fixed,
66 /* phys delivery to target CPU: */
67 .irq_dest_mode = 0,
69 .target_cpus = bigsmp_target_cpus,
70 .disable_esr = 1,
71 .dest_logical = 0,
72 .check_apicid_used = bigsmp_check_apicid_used,
73 .check_apicid_present = bigsmp_check_apicid_present,
75 .vector_allocation_domain = bigsmp_vector_allocation_domain,
76 .init_apic_ldr = bigsmp_init_apic_ldr,
78 .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map,
79 .setup_apic_routing = bigsmp_setup_apic_routing,
80 .multi_timer_check = NULL,
81 .apicid_to_node = bigsmp_apicid_to_node,
82 .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid,
83 .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid,
84 .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present,
85 .setup_portio_remap = NULL,
86 .check_phys_apicid_present = bigsmp_check_phys_apicid_present,
87 .enable_apic_mode = NULL,
88 .phys_pkg_id = bigsmp_phys_pkg_id,
89 .mps_oem_check = NULL,
91 .get_apic_id = bigsmp_get_apic_id,
92 .set_apic_id = NULL,
93 .apic_id_mask = 0xFF << 24,
95 .cpu_mask_to_apicid = bigsmp_cpu_mask_to_apicid,
96 .cpu_mask_to_apicid_and = bigsmp_cpu_mask_to_apicid_and,
98 .send_IPI_mask = default_send_IPI_mask,
99 .send_IPI_mask_allbutself = NULL,
100 .send_IPI_allbutself = bigsmp_send_IPI_allbutself,
101 .send_IPI_all = bigsmp_send_IPI_all,
102 .send_IPI_self = NULL,
104 .wakeup_cpu = NULL,
105 .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
106 .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
108 .wait_for_init_deassert = default_wait_for_init_deassert,
110 .smp_callin_clear_local_apic = NULL,
111 .store_NMI_vector = NULL,
112 .inquire_remote_apic = default_inquire_remote_apic,