Commit 172a3ef7 authored by Martin J. Bligh's avatar Martin J. Bligh Committed by Patrick Mochel

[PATCH] NUMA-Q subarch directory

This adds a shell of a NUMA-Q subarch directory, and copies
mach-default/mach_apic.h into it.  I then edited the default version to
remove the NUMA-Q stuff, and the NUMA-Q version to remove the default
stuff.
parent 47a62db5
......@@ -55,6 +55,10 @@ mcore-y := mach-default
mflags-$(CONFIG_VISWS) := -Iinclude/asm-i386/mach-visws
mcore-$(CONFIG_VISWS) := mach-visws
#NUMAQ subarch support
mflags-$(CONFIG_X86_NUMAQ) := -Iinclude/asm-i386/mach-numaq
mcore-$(CONFIG_X86_NUMAQ) := mach-default
#add other subarch support here
#default subarch .h files
......
......@@ -12,7 +12,7 @@ static inline unsigned long calculate_ldr(unsigned long old)
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#ifdef CONFIG_SMP
#define TARGET_CPUS (clustered_apic_mode ? 0xf : cpu_online_map)
#define TARGET_CPUS (cpu_online_map)
#else
#define TARGET_CPUS 0x01
#endif
......@@ -27,15 +27,12 @@ static inline void summit_check(char *oem, char *productid)
static inline void clustered_apic_check(void)
{
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
(clustered_apic_mode ? "NUMA-Q" : "Flat"), nr_ioapics);
"Flat", nr_ioapics);
}
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (clustered_apic_mode)
return ( ((mps_cpu/4)*16) + (1<<(mps_cpu%4)) );
else
return mps_cpu;
return mps_cpu;
}
static inline unsigned long apicid_to_cpu_present(int apicid)
......
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H
static inline unsigned long calculate_ldr(unsigned long old)
{
unsigned long id;
id = 1UL << smp_processor_id();
return ((old & ~APIC_LDR_MASK) | SET_APIC_LOGICAL_ID(id));
}
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define TARGET_CPUS (0xf)
#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 void clustered_apic_check(void)
{
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
"NUMA-Q", nr_ioapics);
}
static inline int cpu_present_to_apicid(int mps_cpu)
{
return ( ((mps_cpu/4)*16) + (1<<(mps_cpu%4)) );
}
static inline unsigned long apicid_to_cpu_present(int apicid)
{
return (1ul << apicid);
}
#endif /* __ASM_MACH_APIC_H */
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