diff options
| author | Martin J. Bligh <mbligh@aracnet.com> | 2002-12-22 18:19:48 -0800 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-12-22 18:19:48 -0800 |
| commit | 37d1206a506a5ee32d71bfa8e2c818551341e684 (patch) | |
| tree | 1aa6af48e453bf813aff1ddbbcc43e8e348c6b97 /include | |
| parent | 43f1c206e9e0cb6d11f13c177fde56f988ada646 (diff) | |
[PATCH] mpparse cleanups
Most of code originally by James Cleverdon.
More stuff reformed in the mpparse sections - this time not apic stuff,
so we create mach_mpparse.h and stick it in there.
Abstracts out:
- mpc_oem_bus_info() - stores mappings between buses and nodes/quads.
- mpc_oem_pci_bus() - stores mappings between global and local pci bus numbers
Changes summit_check() into mps_oem_check() to generalise it.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/mach-default/mach_apic.h | 4 | ||||
| -rw-r--r-- | include/asm-i386/mach-default/mach_mpparse.h | 20 | ||||
| -rw-r--r-- | include/asm-i386/mach-numaq/mach_apic.h | 4 | ||||
| -rw-r--r-- | include/asm-i386/mach-numaq/mach_mpparse.h | 37 | ||||
| -rw-r--r-- | include/asm-i386/mach-summit/mach_apic.h | 6 | ||||
| -rw-r--r-- | include/asm-i386/mach-summit/mach_mpparse.h | 22 |
6 files changed, 79 insertions, 14 deletions
diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h index 7d26f6aeedc5..e30e38ccdf66 100644 --- a/include/asm-i386/mach-default/mach_apic.h +++ b/include/asm-i386/mach-default/mach_apic.h @@ -14,10 +14,6 @@ #define APIC_BROADCAST_ID 0x0F #define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid)) -static inline void summit_check(char *oem, char *productid) -{ -} - static inline int apic_id_registered(void) { return (test_bit(GET_APIC_ID(apic_read(APIC_ID)), diff --git a/include/asm-i386/mach-default/mach_mpparse.h b/include/asm-i386/mach-default/mach_mpparse.h new file mode 100644 index 000000000000..20a41976843d --- /dev/null +++ b/include/asm-i386/mach-default/mach_mpparse.h @@ -0,0 +1,20 @@ +#ifndef __ASM_MACH_MPPARSE_H +#define __ASM_MACH_MPPARSE_H + +static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, + struct mpc_config_translation *translation) +{ + Dprintk("Bus #%d is %s\n", m->mpc_busid, name); +} + +static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, + struct mpc_config_translation *translation) +{ +} + +static inline void mps_oem_check(struct mp_config_table *mpc, char *oem, + char *productid) +{ +} + +#endif /* __ASM_MACH_MPPARSE_H */ diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h index c4b5047a0bcc..2faa25de2ea7 100644 --- a/include/asm-i386/mach-numaq/mach_apic.h +++ b/include/asm-i386/mach-numaq/mach_apic.h @@ -10,10 +10,6 @@ #define APIC_BROADCAST_ID 0x0F #define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid)) -static inline void summit_check(char *oem, char *productid) -{ -} - static inline int apic_id_registered(void) { return (1); diff --git a/include/asm-i386/mach-numaq/mach_mpparse.h b/include/asm-i386/mach-numaq/mach_mpparse.h new file mode 100644 index 000000000000..ddda81a724a8 --- /dev/null +++ b/include/asm-i386/mach-numaq/mach_mpparse.h @@ -0,0 +1,37 @@ +#ifndef __ASM_MACH_MPPARSE_H +#define __ASM_MACH_MPPARSE_H + +static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, + unsigned short oemsize); + +static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, + struct mpc_config_translation *translation) +{ + int quad = translation->trans_quad; + int local = translation->trans_local; + + mp_bus_id_to_node[m->mpc_busid] = quad; + mp_bus_id_to_local[m->mpc_busid] = local; + printk("Bus #%d is %s (node %d)\n", m->mpc_busid, name, quad); +} + +static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, + struct mpc_config_translation *translation) +{ + int quad = translation->trans_quad; + int local = translation->trans_local; + + quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; +} + +static inline void mps_oem_check(struct mp_config_table *mpc, char *oem, + char *productid) +{ + if (strncmp(oem, "IBM NUMA", 8)) + printk("Warning! May not be a NUMA-Q system!\n"); + if (mpc->mpc_oemptr) + smp_read_mpc_oem((struct mp_config_oemtable *) mpc->mpc_oemptr, + mpc->mpc_oemsize); +} + +#endif /* __ASM_MACH_MPPARSE_H */ diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index 4cc36cd80092..14d4db5f8d1d 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h @@ -26,12 +26,6 @@ static inline unsigned long calculate_ldr(unsigned long old) #define APIC_BROADCAST_ID (x86_summit ? 0xFF : 0x0F) #define check_apicid_used(bitmap, apicid) (0) -static inline void summit_check(char *oem, char *productid) -{ - if (!strncmp(oem, "IBM ENSW", 8) && !strncmp(str, "VIGIL SMP", 9)) - x86_summit = 1; -} - static inline void clustered_apic_check(void) { printk("Enabling APIC mode: %s. Using %d I/O APICs\n", diff --git a/include/asm-i386/mach-summit/mach_mpparse.h b/include/asm-i386/mach-summit/mach_mpparse.h new file mode 100644 index 000000000000..7bb66819082f --- /dev/null +++ b/include/asm-i386/mach-summit/mach_mpparse.h @@ -0,0 +1,22 @@ +#ifndef __ASM_MACH_MPPARSE_H +#define __ASM_MACH_MPPARSE_H + +static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, + struct mpc_config_translation *translation) +{ + Dprintk("Bus #%d is %s\n", m->mpc_busid, name); +} + +static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, + struct mpc_config_translation *translation) +{ +} + +static inline void mps_oem_check(struct mp_config_table *mpc, char *oem, + char *productid) +{ + if (!strncmp(oem, "IBM ENSW", 8) && !strncmp(str, "VIGIL SMP", 9)) + x86_summit = 1; +} + +#endif /* __ASM_MACH_MPPARSE_H */ |
