Commit 1a731ce0 authored by Martin J. Bligh's avatar Martin J. Bligh Committed by Linus Torvalds

[PATCH] Enable Summit in makefile, update summit subarch code

Adds the summit subarch hook to the config file, and updates various things
all inside the summit subarch directories (ie this can't possibly break
anyone else ;-)). The Summit's subarch had got out of sync in a few places.
parent eb025812
...@@ -69,6 +69,10 @@ mcore-$(CONFIG_X86_NUMAQ) := mach-default ...@@ -69,6 +69,10 @@ mcore-$(CONFIG_X86_NUMAQ) := mach-default
mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-i386/mach-bigsmp mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-i386/mach-bigsmp
mcore-$(CONFIG_X86_BIGSMP) := mach-default mcore-$(CONFIG_X86_BIGSMP) := mach-default
#Summit subarch support
mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
mcore-$(CONFIG_X86_SUMMIT) := mach-default
# default subarch .h files # default subarch .h files
mflags-y += -Iinclude/asm-i386/mach-default mflags-y += -Iinclude/asm-i386/mach-default
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
extern int x86_summit; extern int x86_summit;
#define esr_disable (1) #define esr_disable (1)
#define no_balance_irq (0)
#define XAPIC_DEST_CPUS_MASK 0x0Fu #define XAPIC_DEST_CPUS_MASK 0x0Fu
#define XAPIC_DEST_CLUSTER_MASK 0xF0u #define XAPIC_DEST_CLUSTER_MASK 0xF0u
...@@ -11,17 +12,6 @@ extern int x86_summit; ...@@ -11,17 +12,6 @@ extern int x86_summit;
#define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\ #define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\
((phys_apic) & XAPIC_DEST_CLUSTER_MASK) ) ((phys_apic) & XAPIC_DEST_CLUSTER_MASK) )
static inline unsigned long calculate_ldr(unsigned long old)
{
unsigned long id;
if (x86_summit)
id = xapic_phys_to_log_apicid(hard_smp_processor_id());
else
id = 1UL << smp_processor_id();
return ((old & ~APIC_LDR_MASK) | SET_APIC_LOGICAL_ID(id));
}
#define APIC_DFR_VALUE (x86_summit ? APIC_DFR_CLUSTER : APIC_DFR_FLAT) #define APIC_DFR_VALUE (x86_summit ? APIC_DFR_CLUSTER : APIC_DFR_FLAT)
#define TARGET_CPUS (x86_summit ? XAPIC_DEST_CPUS_MASK : cpu_online_map) #define TARGET_CPUS (x86_summit ? XAPIC_DEST_CPUS_MASK : cpu_online_map)
...@@ -34,6 +24,32 @@ static inline unsigned long calculate_ldr(unsigned long old) ...@@ -34,6 +24,32 @@ static inline unsigned long calculate_ldr(unsigned long old)
/* we don't use the phys_cpu_present_map to indicate apicid presence */ /* we don't use the phys_cpu_present_map to indicate apicid presence */
#define check_apicid_present(bit) (1) #define check_apicid_present(bit) (1)
extern u8 bios_cpu_apicid[];
static inline void init_apic_ldr(void)
{
unsigned long val, id;
if (x86_summit)
id = xapic_phys_to_log_apicid(hard_smp_processor_id());
else
id = 1UL << smp_processor_id();
apic_write_around(APIC_DFR, APIC_DFR_VALUE);
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
val |= SET_APIC_LOGICAL_ID(id);
apic_write_around(APIC_LDR, val);
}
static inline int multi_timer_check(int apic, int irq)
{
return 0;
}
static inline int apic_id_registered(void)
{
return 1;
}
static inline void clustered_apic_check(void) static inline void clustered_apic_check(void)
{ {
printk("Enabling APIC mode: %s. Using %d I/O APICs\n", printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
...@@ -66,14 +82,24 @@ static inline ulong ioapic_phys_id_map(ulong phys_map) ...@@ -66,14 +82,24 @@ static inline ulong ioapic_phys_id_map(ulong phys_map)
return (x86_summit ? 0x0F : phys_map); return (x86_summit ? 0x0F : phys_map);
} }
static inline unsigned long apicid_to_phys_cpu_present(int apicid) static inline unsigned long apicid_to_cpu_present(int apicid)
{ {
if (x86_summit) if (x86_summit)
return (1ul << (((apicid >> 4) << 2) | (apicid & 0x3))); return 1;
else else
return (1ul << apicid); return (1ul << apicid);
} }
static inline int mpc_apic_id(struct mpc_config_processor *m, int quad)
{
printk("Processor #%d %ld:%ld APIC version %d\n",
m->mpc_apicid,
(m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
(m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
m->mpc_apicver);
return (m->mpc_apicid);
}
static inline void setup_portio_remap(void) static inline void setup_portio_remap(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