diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-08 21:31:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-10 05:34:42 -0400 |
commit | d49c4288407b2ffa8cab270cb5bc6882abe969f6 (patch) | |
tree | 8ad69dcc6f70ab18a4dfdf8d39dc4dff96ae1fd9 /arch/x86 | |
parent | e0da33646826b66ef933d47ea2fb7a693fd849bf (diff) |
x86: make generic arch support NUMAQ
... so it could fall back to normal numa and we'd reduce the impact of the
NUMAQ subarch.
NUMAQ depends on GENERICARCH
also decouple genericarch numa from acpi.
also make it fall back to bigsmp if apicid > 8.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 74 | ||||
-rw-r--r-- | arch/x86/Makefile | 18 | ||||
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 4 | ||||
-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 | ||||
-rw-r--r-- | arch/x86/mach-es7000/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/mach-es7000/es7000plat.c | 47 | ||||
-rw-r--r-- | arch/x86/mach-generic/Makefile | 10 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 41 | ||||
-rw-r--r-- | arch/x86/mach-generic/probe.c | 15 | ||||
-rw-r--r-- | arch/x86/pci/Makefile_32 | 5 | ||||
-rw-r--r-- | arch/x86/pci/numa.c | 29 |
16 files changed, 184 insertions, 152 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 9e9761504422..8b89810fe3f2 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -268,36 +268,6 @@ config X86_VOYAGER | |||
268 | If you do not specifically know you have a Voyager based machine, | 268 | If you do not specifically know you have a Voyager based machine, |
269 | say N here, otherwise the kernel you build will not be bootable. | 269 | say N here, otherwise the kernel you build will not be bootable. |
270 | 270 | ||
271 | config X86_NUMAQ | ||
272 | bool "NUMAQ (IBM/Sequent)" | ||
273 | depends on SMP && X86_32 | ||
274 | select NUMA | ||
275 | help | ||
276 | This option is used for getting Linux to run on a (IBM/Sequent) NUMA | ||
277 | multiquad box. This changes the way that processors are bootstrapped, | ||
278 | and uses Clustered Logical APIC addressing mode instead of Flat Logical. | ||
279 | You will need a new lynxer.elf file to flash your firmware with - send | ||
280 | email to <Martin.Bligh@us.ibm.com>. | ||
281 | |||
282 | config X86_SUMMIT | ||
283 | bool "Summit/EXA (IBM x440)" | ||
284 | depends on X86_32 && SMP | ||
285 | help | ||
286 | This option is needed for IBM systems that use the Summit/EXA chipset. | ||
287 | In particular, it is needed for the x440. | ||
288 | |||
289 | If you don't have one of these computers, you should say N here. | ||
290 | If you want to build a NUMA kernel, you must select ACPI. | ||
291 | |||
292 | config X86_BIGSMP | ||
293 | bool "Support for other sub-arch SMP systems with more than 8 CPUs" | ||
294 | depends on X86_32 && SMP | ||
295 | help | ||
296 | This option is needed for the systems that have more than 8 CPUs | ||
297 | and if the system is not of any sub-arch type above. | ||
298 | |||
299 | If you don't have such a system, you should say N here. | ||
300 | |||
301 | config X86_VISWS | 271 | config X86_VISWS |
302 | bool "SGI 320/540 (Visual Workstation)" | 272 | bool "SGI 320/540 (Visual Workstation)" |
303 | depends on X86_32 | 273 | depends on X86_32 |
@@ -311,12 +281,33 @@ config X86_VISWS | |||
311 | and vice versa. See <file:Documentation/sgi-visws.txt> for details. | 281 | and vice versa. See <file:Documentation/sgi-visws.txt> for details. |
312 | 282 | ||
313 | config X86_GENERICARCH | 283 | config X86_GENERICARCH |
314 | bool "Generic architecture (Summit, bigsmp, ES7000, default)" | 284 | bool "Generic architecture" |
315 | depends on X86_32 | 285 | depends on X86_32 |
316 | help | 286 | help |
317 | This option compiles in the Summit, bigsmp, ES7000, default subarchitectures. | 287 | This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default |
318 | It is intended for a generic binary kernel. | 288 | subarchitectures. It is intended for a generic binary kernel. |
319 | If you want a NUMA kernel, select ACPI. We need SRAT for NUMA. | 289 | if you select them all, kernel will probe it one by one. and will |
290 | fallback to default. | ||
291 | |||
292 | if X86_GENERICARCH | ||
293 | |||
294 | config X86_NUMAQ | ||
295 | bool "NUMAQ (IBM/Sequent)" | ||
296 | depends on SMP && X86_32 | ||
297 | select NUMA | ||
298 | help | ||
299 | This option is used for getting Linux to run on a NUMAQ (IBM/Sequent) | ||
300 | NUMA multiquad box. This changes the way that processors are | ||
301 | bootstrapped, and uses Clustered Logical APIC addressing mode instead | ||
302 | of Flat Logical. You will need a new lynxer.elf file to flash your | ||
303 | firmware with - send email to <Martin.Bligh@us.ibm.com>. | ||
304 | |||
305 | config X86_SUMMIT | ||
306 | bool "Summit/EXA (IBM x440)" | ||
307 | depends on X86_32 && SMP | ||
308 | help | ||
309 | This option is needed for IBM systems that use the Summit/EXA chipset. | ||
310 | In particular, it is needed for the x440. | ||
320 | 311 | ||
321 | config X86_ES7000 | 312 | config X86_ES7000 |
322 | bool "Support for Unisys ES7000 IA32 series" | 313 | bool "Support for Unisys ES7000 IA32 series" |
@@ -324,8 +315,15 @@ config X86_ES7000 | |||
324 | help | 315 | help |
325 | Support for Unisys ES7000 systems. Say 'Y' here if this kernel is | 316 | Support for Unisys ES7000 systems. Say 'Y' here if this kernel is |
326 | supposed to run on an IA32-based Unisys ES7000 system. | 317 | supposed to run on an IA32-based Unisys ES7000 system. |
327 | Only choose this option if you have such a system, otherwise you | 318 | |
328 | should say N here. | 319 | config X86_BIGSMP |
320 | bool "Support for big SMP systems with more than 8 CPUs" | ||
321 | depends on X86_32 && SMP | ||
322 | help | ||
323 | This option is needed for the systems that have more than 8 CPUs | ||
324 | and if the system is not of any sub-arch type above. | ||
325 | |||
326 | endif | ||
329 | 327 | ||
330 | config X86_RDC321X | 328 | config X86_RDC321X |
331 | bool "RDC R-321x SoC" | 329 | bool "RDC R-321x SoC" |
@@ -913,9 +911,9 @@ config X86_PAE | |||
913 | config NUMA | 911 | config NUMA |
914 | bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)" | 912 | bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)" |
915 | depends on SMP | 913 | depends on SMP |
916 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI) && EXPERIMENTAL) | 914 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || X86_SUMMIT && ACPI) && EXPERIMENTAL) |
917 | default n if X86_PC | 915 | default n if X86_PC |
918 | default y if (X86_NUMAQ || X86_SUMMIT) | 916 | default y if (X86_NUMAQ || X86_SUMMIT || X86_GENERICARCH) |
919 | help | 917 | help |
920 | Enable NUMA (Non Uniform Memory Access) support. | 918 | Enable NUMA (Non Uniform Memory Access) support. |
921 | The kernel will try to allocate memory used by a CPU on the | 919 | The kernel will try to allocate memory used by a CPU on the |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 30b046bcccb6..d6650131659e 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -117,29 +117,11 @@ mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/ | |||
117 | mflags-$(CONFIG_X86_VISWS) := -Iinclude/asm-x86/mach-visws | 117 | mflags-$(CONFIG_X86_VISWS) := -Iinclude/asm-x86/mach-visws |
118 | mcore-$(CONFIG_X86_VISWS) := arch/x86/mach-visws/ | 118 | mcore-$(CONFIG_X86_VISWS) := arch/x86/mach-visws/ |
119 | 119 | ||
120 | # NUMAQ subarch support | ||
121 | mflags-$(CONFIG_X86_NUMAQ) := -Iinclude/asm-x86/mach-numaq | ||
122 | mcore-$(CONFIG_X86_NUMAQ) := arch/x86/mach-default/ | ||
123 | |||
124 | # BIGSMP subarch support | ||
125 | mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-x86/mach-bigsmp | ||
126 | mcore-$(CONFIG_X86_BIGSMP) := arch/x86/mach-default/ | ||
127 | |||
128 | #Summit subarch support | ||
129 | mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-x86/mach-summit | ||
130 | mcore-$(CONFIG_X86_SUMMIT) := arch/x86/mach-default/ | ||
131 | |||
132 | # generic subarchitecture | 120 | # generic subarchitecture |
133 | mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic | 121 | mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic |
134 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ | 122 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ |
135 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ | 123 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ |
136 | 124 | ||
137 | |||
138 | # ES7000 subarch support | ||
139 | mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-x86/mach-es7000 | ||
140 | fcore-$(CONFIG_X86_ES7000) := arch/x86/mach-es7000/ | ||
141 | mcore-$(CONFIG_X86_ES7000) := arch/x86/mach-default/ | ||
142 | |||
143 | # RDC R-321x subarch support | 125 | # RDC R-321x subarch support |
144 | mflags-$(CONFIG_X86_RDC321X) := -Iinclude/asm-x86/mach-rdc321x | 126 | mflags-$(CONFIG_X86_RDC321X) := -Iinclude/asm-x86/mach-rdc321x |
145 | mcore-$(CONFIG_X86_RDC321X) := arch/x86/mach-default/ | 127 | mcore-$(CONFIG_X86_RDC321X) := arch/x86/mach-default/ |
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 90456cee47c3..ba0be6a25ff7 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -221,10 +221,6 @@ static char *vidmem; | |||
221 | static int vidport; | 221 | static int vidport; |
222 | static int lines, cols; | 222 | static int lines, cols; |
223 | 223 | ||
224 | #ifdef CONFIG_X86_NUMAQ | ||
225 | void *xquad_portio; | ||
226 | #endif | ||
227 | |||
228 | #include "../../../../lib/inflate.c" | 224 | #include "../../../../lib/inflate.c" |
229 | 225 | ||
230 | static void *malloc(int size) | 226 | static void *malloc(int size) |
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 | { |
diff --git a/arch/x86/mach-es7000/Makefile b/arch/x86/mach-es7000/Makefile index 69dd4da218dc..3ef8b43b62fc 100644 --- a/arch/x86/mach-es7000/Makefile +++ b/arch/x86/mach-es7000/Makefile | |||
@@ -3,4 +3,3 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_X86_ES7000) := es7000plat.o | 5 | obj-$(CONFIG_X86_ES7000) := es7000plat.o |
6 | obj-$(CONFIG_X86_GENERICARCH) := es7000plat.o | ||
diff --git a/arch/x86/mach-es7000/es7000plat.c b/arch/x86/mach-es7000/es7000plat.c index a41c77a47227..4354ce804889 100644 --- a/arch/x86/mach-es7000/es7000plat.c +++ b/arch/x86/mach-es7000/es7000plat.c | |||
@@ -177,53 +177,6 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr) | |||
177 | } | 177 | } |
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* | ||
181 | * This file also gets compiled if CONFIG_X86_GENERICARCH is set. Generic | ||
182 | * arch already has got following function definitions (asm-generic/es7000.c) | ||
183 | * hence no need to define these for that case. | ||
184 | */ | ||
185 | #ifndef CONFIG_X86_GENERICARCH | ||
186 | void es7000_sw_apic(void); | ||
187 | void __init enable_apic_mode(void) | ||
188 | { | ||
189 | es7000_sw_apic(); | ||
190 | return; | ||
191 | } | ||
192 | |||
193 | __init int mps_oem_check(struct mp_config_table *mpc, char *oem, | ||
194 | char *productid) | ||
195 | { | ||
196 | if (mpc->mpc_oemptr) { | ||
197 | struct mp_config_oemtable *oem_table = | ||
198 | (struct mp_config_oemtable *)mpc->mpc_oemptr; | ||
199 | if (!strncmp(oem, "UNISYS", 6)) | ||
200 | return parse_unisys_oem((char *)oem_table); | ||
201 | } | ||
202 | return 0; | ||
203 | } | ||
204 | #ifdef CONFIG_ACPI | ||
205 | /* Hook from generic ACPI tables.c */ | ||
206 | int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
207 | { | ||
208 | unsigned long oem_addr; | ||
209 | if (!find_unisys_acpi_oem_table(&oem_addr)) { | ||
210 | if (es7000_check_dsdt()) | ||
211 | return parse_unisys_oem((char *)oem_addr); | ||
212 | else { | ||
213 | setup_unisys(); | ||
214 | return 1; | ||
215 | } | ||
216 | } | ||
217 | return 0; | ||
218 | } | ||
219 | #else | ||
220 | int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
221 | { | ||
222 | return 0; | ||
223 | } | ||
224 | #endif | ||
225 | #endif /* COFIG_X86_GENERICARCH */ | ||
226 | |||
227 | static void | 180 | static void |
228 | es7000_spin(int n) | 181 | es7000_spin(int n) |
229 | { | 182 | { |
diff --git a/arch/x86/mach-generic/Makefile b/arch/x86/mach-generic/Makefile index 19d6d407737b..0dbd7803a1d5 100644 --- a/arch/x86/mach-generic/Makefile +++ b/arch/x86/mach-generic/Makefile | |||
@@ -2,7 +2,11 @@ | |||
2 | # Makefile for the generic architecture | 2 | # Makefile for the generic architecture |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_CFLAGS := -Iarch/x86/kernel | 5 | EXTRA_CFLAGS := -Iarch/x86/kernel |
6 | 6 | ||
7 | obj-y := probe.o summit.o bigsmp.o es7000.o default.o | 7 | obj-y := probe.o default.o |
8 | obj-y += ../../x86/mach-es7000/ | 8 | obj-$(CONFIG_X86_NUMAQ) += numaq.o |
9 | obj-$(CONFIG_X86_SUMMIT) += summit.o | ||
10 | obj-$(CONFIG_X86_BIGSMP) += bigsmp.o | ||
11 | obj-$(CONFIG_X86_ES7000) += es7000.o | ||
12 | obj-$(CONFIG_X86_ES7000) += ../../x86/mach-es7000/ | ||
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 2a243019acae..59d771714559 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -23,10 +23,8 @@ static int dmi_bigsmp; /* can be set by dmi scanners */ | |||
23 | 23 | ||
24 | static int hp_ht_bigsmp(const struct dmi_system_id *d) | 24 | static int hp_ht_bigsmp(const struct dmi_system_id *d) |
25 | { | 25 | { |
26 | #ifdef CONFIG_X86_GENERICARCH | ||
27 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); | 26 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); |
28 | dmi_bigsmp = 1; | 27 | dmi_bigsmp = 1; |
29 | #endif | ||
30 | return 0; | 28 | return 0; |
31 | } | 29 | } |
32 | 30 | ||
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c new file mode 100644 index 000000000000..8091e68764c4 --- /dev/null +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * APIC driver for the IBM NUMAQ chipset. | ||
3 | */ | ||
4 | #define APIC_DEFINITION 1 | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/cpumask.h> | ||
7 | #include <linux/smp.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/string.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <asm/mach-numaq/mach_apic.h> | ||
16 | #include <asm/mach-numaq/mach_apicdef.h> | ||
17 | #include <asm/mach-numaq/mach_ipi.h> | ||
18 | #include <asm/mach-numaq/mach_mpparse.h> | ||
19 | #include <asm/mach-numaq/mach_wakecpu.h> | ||
20 | #include <asm/numaq.h> | ||
21 | |||
22 | static int mps_oem_check(struct mp_config_table *mpc, char *oem, | ||
23 | char *productid) | ||
24 | { | ||
25 | numaq_mps_oem_check(mpc, oem, productid); | ||
26 | return found_numaq; | ||
27 | } | ||
28 | |||
29 | static int probe_numaq(void) | ||
30 | { | ||
31 | /* already know from get_memcfg_numaq() */ | ||
32 | return found_numaq; | ||
33 | } | ||
34 | |||
35 | /* Hook from generic ACPI tables.c */ | ||
36 | static int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | struct genapic apic_numaq = APIC_INIT("NUMAQ", probe_numaq); | ||
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c index c5ae751b994a..ba18dec48555 100644 --- a/arch/x86/mach-generic/probe.c +++ b/arch/x86/mach-generic/probe.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/apicdef.h> | 16 | #include <asm/apicdef.h> |
17 | #include <asm/genapic.h> | 17 | #include <asm/genapic.h> |
18 | 18 | ||
19 | extern struct genapic apic_numaq; | ||
19 | extern struct genapic apic_summit; | 20 | extern struct genapic apic_summit; |
20 | extern struct genapic apic_bigsmp; | 21 | extern struct genapic apic_bigsmp; |
21 | extern struct genapic apic_es7000; | 22 | extern struct genapic apic_es7000; |
@@ -24,9 +25,18 @@ extern struct genapic apic_default; | |||
24 | struct genapic *genapic = &apic_default; | 25 | struct genapic *genapic = &apic_default; |
25 | 26 | ||
26 | static struct genapic *apic_probe[] __initdata = { | 27 | static struct genapic *apic_probe[] __initdata = { |
28 | #ifdef CONFIG_X86_NUMAQ | ||
29 | &apic_numaq, | ||
30 | #endif | ||
31 | #ifdef CONFIG_X86_SUMMIT | ||
27 | &apic_summit, | 32 | &apic_summit, |
33 | #endif | ||
34 | #ifdef CONFIG_X86_BIGSMP | ||
28 | &apic_bigsmp, | 35 | &apic_bigsmp, |
36 | #endif | ||
37 | #ifdef CONFIG_X86_ES7000 | ||
29 | &apic_es7000, | 38 | &apic_es7000, |
39 | #endif | ||
30 | &apic_default, /* must be last */ | 40 | &apic_default, /* must be last */ |
31 | NULL, | 41 | NULL, |
32 | }; | 42 | }; |
@@ -54,6 +64,7 @@ early_param("apic", parse_apic); | |||
54 | 64 | ||
55 | void __init generic_bigsmp_probe(void) | 65 | void __init generic_bigsmp_probe(void) |
56 | { | 66 | { |
67 | #if CONFIG_X86_BIGSMP | ||
57 | /* | 68 | /* |
58 | * This routine is used to switch to bigsmp mode when | 69 | * This routine is used to switch to bigsmp mode when |
59 | * - There is no apic= option specified by the user | 70 | * - There is no apic= option specified by the user |
@@ -67,6 +78,7 @@ void __init generic_bigsmp_probe(void) | |||
67 | printk(KERN_INFO "Overriding APIC driver with %s\n", | 78 | printk(KERN_INFO "Overriding APIC driver with %s\n", |
68 | genapic->name); | 79 | genapic->name); |
69 | } | 80 | } |
81 | #endif | ||
70 | } | 82 | } |
71 | 83 | ||
72 | void __init generic_apic_probe(void) | 84 | void __init generic_apic_probe(void) |
@@ -88,7 +100,8 @@ void __init generic_apic_probe(void) | |||
88 | 100 | ||
89 | /* These functions can switch the APIC even after the initial ->probe() */ | 101 | /* These functions can switch the APIC even after the initial ->probe() */ |
90 | 102 | ||
91 | int __init mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid) | 103 | int __init mps_oem_check(struct mp_config_table *mpc, char *oem, |
104 | char *productid) | ||
92 | { | 105 | { |
93 | int i; | 106 | int i; |
94 | for (i = 0; apic_probe[i]; ++i) { | 107 | for (i = 0; apic_probe[i]; ++i) { |
diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32 index 89ec35d00efd..962d96c0495a 100644 --- a/arch/x86/pci/Makefile_32 +++ b/arch/x86/pci/Makefile_32 | |||
@@ -13,10 +13,11 @@ pci-y := fixup.o | |||
13 | pci-$(CONFIG_ACPI) += acpi.o | 13 | pci-$(CONFIG_ACPI) += acpi.o |
14 | pci-y += legacy.o irq.o | 14 | pci-y += legacy.o irq.o |
15 | 15 | ||
16 | # Careful: VISWS and NUMAQ overrule the pci-y above. The colons are | 16 | # Careful: VISWS overrule the pci-y above. The colons are |
17 | # therefor correct. This needs a proper fix by distangling the code. | 17 | # therefor correct. This needs a proper fix by distangling the code. |
18 | pci-$(CONFIG_X86_VISWS) := visws.o fixup.o | 18 | pci-$(CONFIG_X86_VISWS) := visws.o fixup.o |
19 | pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o | 19 | |
20 | pci-$(CONFIG_X86_NUMAQ) += numa.o | ||
20 | 21 | ||
21 | # Necessary for NUMAQ as well | 22 | # Necessary for NUMAQ as well |
22 | pci-$(CONFIG_NUMA) += mp_bus_to_node.o | 23 | pci-$(CONFIG_NUMA) += mp_bus_to_node.o |
diff --git a/arch/x86/pci/numa.c b/arch/x86/pci/numa.c index d9afbae5092b..99f1ecd485b5 100644 --- a/arch/x86/pci/numa.c +++ b/arch/x86/pci/numa.c | |||
@@ -6,45 +6,21 @@ | |||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <mach_apic.h> | 8 | #include <mach_apic.h> |
9 | #include <asm/mpspec.h> | ||
9 | #include "pci.h" | 10 | #include "pci.h" |
10 | 11 | ||
11 | #define XQUAD_PORTIO_BASE 0xfe400000 | 12 | #define XQUAD_PORTIO_BASE 0xfe400000 |
12 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ | 13 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ |
13 | 14 | ||
14 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
15 | #define BUS2QUAD(global) (mp_bus_id_to_node[global]) | 15 | #define BUS2QUAD(global) (mp_bus_id_to_node[global]) |
16 | 16 | ||
17 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
18 | #define BUS2LOCAL(global) (mp_bus_id_to_local[global]) | 17 | #define BUS2LOCAL(global) (mp_bus_id_to_local[global]) |
19 | 18 | ||
20 | void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | ||
21 | struct mpc_config_translation *translation) | ||
22 | { | ||
23 | int quad = translation->trans_quad; | ||
24 | int local = translation->trans_local; | ||
25 | |||
26 | mp_bus_id_to_node[m->mpc_busid] = quad; | ||
27 | mp_bus_id_to_local[m->mpc_busid] = local; | ||
28 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", | ||
29 | m->mpc_busid, name, quad); | ||
30 | } | ||
31 | |||
32 | int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
33 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) | 19 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) |
34 | void mpc_oem_pci_bus(struct mpc_config_bus *m, | ||
35 | struct mpc_config_translation *translation) | ||
36 | { | ||
37 | int quad = translation->trans_quad; | ||
38 | int local = translation->trans_local; | ||
39 | |||
40 | quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; | ||
41 | } | ||
42 | 20 | ||
43 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ | 21 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ |
44 | void *xquad_portio; | 22 | void *xquad_portio; |
45 | #ifdef CONFIG_X86_NUMAQ | ||
46 | EXPORT_SYMBOL(xquad_portio); | 23 | EXPORT_SYMBOL(xquad_portio); |
47 | #endif | ||
48 | 24 | ||
49 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) | 25 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) |
50 | 26 | ||
@@ -179,6 +155,9 @@ static int __init pci_numa_init(void) | |||
179 | { | 155 | { |
180 | int quad; | 156 | int quad; |
181 | 157 | ||
158 | if (!found_numaq) | ||
159 | return 0; | ||
160 | |||
182 | raw_pci_ops = &pci_direct_conf1_mq; | 161 | raw_pci_ops = &pci_direct_conf1_mq; |
183 | 162 | ||
184 | if (pcibios_scanned++) | 163 | if (pcibios_scanned++) |