Commit ab530e1f authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: early check if a system is numaq

so we could fall back to one node numa.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f19dc2f2
...@@ -70,7 +70,10 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m) ...@@ -70,7 +70,10 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
return; return;
} }
#ifdef CONFIG_X86_NUMAQ #ifdef CONFIG_X86_NUMAQ
apicid = mpc_apic_id(m, translation_table[mpc_record]); if (found_numaq)
apicid = mpc_apic_id(m, translation_table[mpc_record]);
else
apicid = m->mpc_apicid;
#else #else
apicid = m->mpc_apicid; apicid = m->mpc_apicid;
#endif #endif
...@@ -91,7 +94,8 @@ static void __init MP_bus_info(struct mpc_config_bus *m) ...@@ -91,7 +94,8 @@ static void __init MP_bus_info(struct mpc_config_bus *m)
str[6] = 0; str[6] = 0;
#ifdef CONFIG_X86_NUMAQ #ifdef CONFIG_X86_NUMAQ
mpc_oem_bus_info(m, str, translation_table[mpc_record]); if (found_numaq)
mpc_oem_bus_info(m, str, translation_table[mpc_record]);
#else #else
printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str);
#endif #endif
...@@ -112,7 +116,8 @@ static void __init MP_bus_info(struct mpc_config_bus *m) ...@@ -112,7 +116,8 @@ static void __init MP_bus_info(struct mpc_config_bus *m)
#endif #endif
} else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
#ifdef CONFIG_X86_NUMAQ #ifdef CONFIG_X86_NUMAQ
mpc_oem_pci_bus(m, translation_table[mpc_record]); if (found_numaq)
mpc_oem_pci_bus(m, translation_table[mpc_record]);
#endif #endif
clear_bit(m->mpc_busid, mp_bus_not_pci); clear_bit(m->mpc_busid, mp_bus_not_pci);
#if defined(CONFIG_EISA) || defined (CONFIG_MCA) #if defined(CONFIG_EISA) || defined (CONFIG_MCA)
...@@ -321,6 +326,9 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem, ...@@ -321,6 +326,9 @@ static inline void mps_oem_check(struct mp_config_table *mpc, char *oem,
{ {
if (strncmp(oem, "IBM NUMA", 8)) if (strncmp(oem, "IBM NUMA", 8))
printk("Warning! May not be a NUMA-Q system!\n"); printk("Warning! May not be a NUMA-Q system!\n");
else
found_numaq = 1;
if (mpc->mpc_oemptr) if (mpc->mpc_oemptr)
smp_read_mpc_oem((struct mp_config_oemtable *)mpc->mpc_oemptr, smp_read_mpc_oem((struct mp_config_oemtable *)mpc->mpc_oemptr,
mpc->mpc_oemsize); mpc->mpc_oemsize);
......
...@@ -31,9 +31,12 @@ ...@@ -31,9 +31,12 @@
#include <asm/numaq.h> #include <asm/numaq.h>
#include <asm/topology.h> #include <asm/topology.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mpspec.h>
#define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))
int found_numaq;
/* /*
* Function: smp_dump_qct() * Function: smp_dump_qct()
* *
...@@ -67,13 +70,24 @@ static void __init smp_dump_qct(void) ...@@ -67,13 +70,24 @@ static void __init smp_dump_qct(void)
} }
} }
/* static __init void early_check_numaq(void)
* Unlike Summit, we don't really care to let the NUMA-Q {
* fall back to flat mode. Don't compile for NUMA-Q /*
* unless you really need it! * Find possible boot-time SMP configuration:
*/ */
early_find_smp_config();
/*
* get boot-time SMP configuration:
*/
if (smp_found_config)
early_get_smp_config();
}
int __init get_memcfg_numaq(void) int __init get_memcfg_numaq(void)
{ {
early_check_numaq();
if (!found_numaq)
return 0;
smp_dump_qct(); smp_dump_qct();
return 1; return 1;
} }
......
...@@ -21,11 +21,11 @@ extern int pic_mode; ...@@ -21,11 +21,11 @@ extern int pic_mode;
/* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */
#define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4)
#endif
extern void early_find_smp_config(void); extern void early_find_smp_config(void);
extern void early_get_smp_config(void); extern void early_get_smp_config(void);
#endif
#if defined(CONFIG_MCA) || defined(CONFIG_EISA) #if defined(CONFIG_MCA) || defined(CONFIG_EISA)
extern int mp_bus_id_to_type[MAX_MP_BUSSES]; extern int mp_bus_id_to_type[MAX_MP_BUSSES];
#endif #endif
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#ifdef CONFIG_X86_NUMAQ #ifdef CONFIG_X86_NUMAQ
extern int found_numaq;
extern int get_memcfg_numaq(void); extern int get_memcfg_numaq(void);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment