diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 73 | ||||
-rw-r--r-- | arch/x86/kernel/numaq_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/summit_32.c | 2 |
5 files changed, 79 insertions, 11 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index f226bdc19f69..7dc2130046d9 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -848,7 +848,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
848 | #ifdef CONFIG_X86_IO_APIC | 848 | #ifdef CONFIG_X86_IO_APIC |
849 | #define MP_ISA_BUS 0 | 849 | #define MP_ISA_BUS 0 |
850 | 850 | ||
851 | #if defined(CONFIG_X86_ES7000) || defined(CONFIG_X86_GENERICARCH) | 851 | #ifdef CONFIG_X86_ES7000 |
852 | extern int es7000_plat; | 852 | extern int es7000_plat; |
853 | #endif | 853 | #endif |
854 | 854 | ||
@@ -997,7 +997,7 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
997 | set_bit(MP_ISA_BUS, mp_bus_not_pci); | 997 | set_bit(MP_ISA_BUS, mp_bus_not_pci); |
998 | Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); | 998 | Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); |
999 | 999 | ||
1000 | #if defined(CONFIG_X86_ES7000) || defined(CONFIG_X86_GENERICARCH) | 1000 | #ifdef CONFIG_X86_ES7000 |
1001 | /* | 1001 | /* |
1002 | * Older generations of ES7000 have no legacy identity mappings | 1002 | * Older generations of ES7000 have no legacy identity mappings |
1003 | */ | 1003 | */ |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 2285b81ad1d5..97e62a01f1e2 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -1722,7 +1722,6 @@ void disable_IO_APIC(void) | |||
1722 | * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 | 1722 | * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 |
1723 | */ | 1723 | */ |
1724 | 1724 | ||
1725 | #ifndef CONFIG_X86_NUMAQ | ||
1726 | static void __init setup_ioapic_ids_from_mpc(void) | 1725 | static void __init setup_ioapic_ids_from_mpc(void) |
1727 | { | 1726 | { |
1728 | union IO_APIC_reg_00 reg_00; | 1727 | union IO_APIC_reg_00 reg_00; |
@@ -1732,6 +1731,11 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
1732 | unsigned char old_id; | 1731 | unsigned char old_id; |
1733 | unsigned long flags; | 1732 | unsigned long flags; |
1734 | 1733 | ||
1734 | #ifdef CONFIG_X86_NUMAQ | ||
1735 | if (found_numaq) | ||
1736 | return; | ||
1737 | #endif | ||
1738 | |||
1735 | /* | 1739 | /* |
1736 | * Don't check I/O APIC IDs for xAPIC systems. They have | 1740 | * Don't check I/O APIC IDs for xAPIC systems. They have |
1737 | * no meaning without the serial APIC bus. | 1741 | * no meaning without the serial APIC bus. |
@@ -1828,9 +1832,6 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
1828 | apic_printk(APIC_VERBOSE, " ok.\n"); | 1832 | apic_printk(APIC_VERBOSE, " ok.\n"); |
1829 | } | 1833 | } |
1830 | } | 1834 | } |
1831 | #else | ||
1832 | static void __init setup_ioapic_ids_from_mpc(void) { } | ||
1833 | #endif | ||
1834 | 1835 | ||
1835 | int no_timer_check __initdata; | 1836 | int no_timer_check __initdata; |
1836 | 1837 | ||
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 7591325e616d..1cc7a4b8643f 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -49,15 +49,73 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | #ifdef CONFIG_X86_NUMAQ | 51 | #ifdef CONFIG_X86_NUMAQ |
52 | int found_numaq; | ||
52 | /* | 53 | /* |
53 | * Have to match translation table entries to main table entries by counter | 54 | * Have to match translation table entries to main table entries by counter |
54 | * hence the mpc_record variable .... can't see a less disgusting way of | 55 | * hence the mpc_record variable .... can't see a less disgusting way of |
55 | * doing this .... | 56 | * doing this .... |
56 | */ | 57 | */ |
58 | struct mpc_config_translation { | ||
59 | unsigned char mpc_type; | ||
60 | unsigned char trans_len; | ||
61 | unsigned char trans_type; | ||
62 | unsigned char trans_quad; | ||
63 | unsigned char trans_global; | ||
64 | unsigned char trans_local; | ||
65 | unsigned short trans_reserved; | ||
66 | }; | ||
67 | |||
57 | 68 | ||
58 | static int mpc_record; | 69 | static int mpc_record; |
59 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] | 70 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] |
60 | __cpuinitdata; | 71 | __cpuinitdata; |
72 | |||
73 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
74 | { | ||
75 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
76 | } | ||
77 | |||
78 | |||
79 | static inline int mpc_apic_id(struct mpc_config_processor *m, | ||
80 | struct mpc_config_translation *translation_record) | ||
81 | { | ||
82 | int quad = translation_record->trans_quad; | ||
83 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
84 | |||
85 | printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
86 | m->mpc_apicid, | ||
87 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
88 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
89 | m->mpc_apicver, quad, logical_apicid); | ||
90 | return logical_apicid; | ||
91 | } | ||
92 | |||
93 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
94 | |||
95 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
96 | |||
97 | static void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | ||
98 | struct mpc_config_translation *translation) | ||
99 | { | ||
100 | int quad = translation->trans_quad; | ||
101 | int local = translation->trans_local; | ||
102 | |||
103 | mp_bus_id_to_node[m->mpc_busid] = quad; | ||
104 | mp_bus_id_to_local[m->mpc_busid] = local; | ||
105 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", | ||
106 | m->mpc_busid, name, quad); | ||
107 | } | ||
108 | |||
109 | int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
110 | static void mpc_oem_pci_bus(struct mpc_config_bus *m, | ||
111 | struct mpc_config_translation *translation) | ||
112 | { | ||
113 | int quad = translation->trans_quad; | ||
114 | int local = translation->trans_local; | ||
115 | |||
116 | quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; | ||
117 | } | ||
118 | |||
61 | #endif | 119 | #endif |
62 | 120 | ||
63 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) | 121 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
@@ -321,11 +379,11 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, | |||
321 | } | 379 | } |
322 | } | 380 | } |
323 | 381 | ||
324 | static inline void mps_oem_check(struct mp_config_table *mpc, char *oem, | 382 | void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, |
325 | char *productid) | 383 | char *productid) |
326 | { | 384 | { |
327 | if (strncmp(oem, "IBM NUMA", 8)) | 385 | if (strncmp(oem, "IBM NUMA", 8)) |
328 | printk("Warning! May not be a NUMA-Q system!\n"); | 386 | printk("Warning! Not a NUMA-Q system!\n"); |
329 | else | 387 | else |
330 | found_numaq = 1; | 388 | found_numaq = 1; |
331 | 389 | ||
@@ -388,7 +446,16 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early) | |||
388 | return 0; | 446 | return 0; |
389 | 447 | ||
390 | #ifdef CONFIG_X86_32 | 448 | #ifdef CONFIG_X86_32 |
391 | mps_oem_check(mpc, oem, str); | 449 | /* |
450 | * need to make sure summit and es7000's mps_oem_check is safe to be | ||
451 | * called early via genericarch 's mps_oem_check | ||
452 | */ | ||
453 | if (early) { | ||
454 | #ifdef CONFIG_X86_NUMAQ | ||
455 | numaq_mps_oem_check(mpc, oem, str); | ||
456 | #endif | ||
457 | } else | ||
458 | mps_oem_check(mpc, oem, str); | ||
392 | #endif | 459 | #endif |
393 | 460 | ||
394 | /* save the local APIC address, it might be non-default */ | 461 | /* save the local APIC address, it might be non-default */ |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c index 27b908254fb0..f0f1de1c4a1d 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/numaq_32.c | |||
@@ -36,8 +36,6 @@ | |||
36 | 36 | ||
37 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) | 37 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) |
38 | 38 | ||
39 | int found_numaq; | ||
40 | |||
41 | /* | 39 | /* |
42 | * Function: smp_dump_qct() | 40 | * Function: smp_dump_qct() |
43 | * | 41 | * |
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c index ae751094eba9..d67ce5f044ba 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/summit_32.c | |||
@@ -36,7 +36,9 @@ static struct rio_table_hdr *rio_table_hdr __initdata; | |||
36 | static struct scal_detail *scal_devs[MAX_NUMNODES] __initdata; | 36 | static struct scal_detail *scal_devs[MAX_NUMNODES] __initdata; |
37 | static struct rio_detail *rio_devs[MAX_NUMNODES*4] __initdata; | 37 | static struct rio_detail *rio_devs[MAX_NUMNODES*4] __initdata; |
38 | 38 | ||
39 | #ifndef CONFIG_X86_NUMAQ | ||
39 | static int mp_bus_id_to_node[MAX_MP_BUSSES] __initdata; | 40 | static int mp_bus_id_to_node[MAX_MP_BUSSES] __initdata; |
41 | #endif | ||
40 | 42 | ||
41 | static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) | 43 | static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) |
42 | { | 44 | { |