diff options
| author | Martin J. Bligh <mbligh@aracnet.com> | 2002-12-22 18:20:04 -0800 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-12-22 18:20:04 -0800 |
| commit | 6c39ac1fe9b851e3df4e7d2045dd9b515c4af9f9 (patch) | |
| tree | 9cb3fbc4b312d8d39c02160340bbbcea756e6f04 /include | |
| parent | 67382f14b60f0a056e969d2ac92bacefad5f665a (diff) | |
[PATCH] more clustered-apic-mode work
Code mostly originally by James Cleverdon.
Abstracts out more clustered_apic_mode gunk into
- ioapic_phys_id_map()
- wakeup_secondary_cpu()
- setup_portio_remap()
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/mach-default/mach_apic.h | 12 | ||||
| -rw-r--r-- | include/asm-i386/mach-numaq/mach_apic.h | 20 | ||||
| -rw-r--r-- | include/asm-i386/mach-summit/mach_apic.h | 13 |
3 files changed, 45 insertions, 0 deletions
diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h index e30e38ccdf66..a24df01ffe2e 100644 --- a/include/asm-i386/mach-default/mach_apic.h +++ b/include/asm-i386/mach-default/mach_apic.h @@ -37,6 +37,11 @@ static inline void init_apic_ldr(void) apic_write_around(APIC_LDR, val); } +static inline ulong ioapic_phys_id_map(ulong phys_map) +{ + return phys_map; +} + static inline void clustered_apic_check(void) { printk("Enabling APIC mode: %s. Using %d I/O APICs\n", @@ -68,4 +73,11 @@ static inline int mpc_apic_id(struct mpc_config_processor *m, int quad) return (m->mpc_apicid); } +#define wakeup_secondary_cpu(apicid, start_eip) \ + wakeup_secondary_via_INIT(apicid, start_eip) + +static inline void setup_portio_remap(void) +{ +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h index 2faa25de2ea7..be8eacb32aa0 100644 --- a/include/asm-i386/mach-numaq/mach_apic.h +++ b/include/asm-i386/mach-numaq/mach_apic.h @@ -31,6 +31,12 @@ static inline int multi_timer_check(int apic, int irq) return (apic != 0 && irq == 0); } +static inline ulong ioapic_phys_id_map(ulong phys_map) +{ + /* We don't have a good way to do this yet - hack */ + return 0xf; +} + static inline int cpu_present_to_apicid(int mps_cpu) { return ( ((mps_cpu/4)*16) + (1<<(mps_cpu%4)) ); @@ -63,4 +69,18 @@ static inline int mpc_apic_id(struct mpc_config_processor *m, int quad) return logical_apicid; } +#define wakeup_secondary_cpu(apicid, start_eip) \ + wakeup_secondary_via_NMI(apicid) + +static inline void setup_portio_remap(void) +{ + if (numnodes <= 1) + return; + + printk("Remapping cross-quad port I/O for %d quads\n", numnodes); + xquad_portio = ioremap (XQUAD_PORTIO_BASE, numnodes*XQUAD_PORTIO_QUAD); + printk("xquad_portio vaddr 0x%08lx, len %08lx\n", + (u_long) xquad_portio, (u_long) numnodes*XQUAD_PORTIO_QUAD); +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index 14d4db5f8d1d..2de1e9fea7cd 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h @@ -40,6 +40,12 @@ static inline int cpu_present_to_apicid(int mps_cpu) return mps_cpu; } +static inline ulong ioapic_phys_id_map(ulong phys_map) +{ + /* For clustered we don't have a good way to do this yet - hack */ + return (x86_summit ? 0x0F : phys_map); +} + static inline unsigned long apicid_to_phys_cpu_present(int apicid) { if (x86_summit) @@ -48,4 +54,11 @@ static inline unsigned long apicid_to_phys_cpu_present(int apicid) return (1ul << apicid); } +#define wakeup_secondary_cpu(apicid, start_eip) \ + wakeup_secondary_via_INIT(apicid, start_eip) + +static inline void setup_portio_remap(void) +{ +} + #endif /* __ASM_MACH_APIC_H */ |
