aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/smp.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:26 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:26 -0400
commit874c4fe389d1358f82c96dc9b5092fc5c7690604 (patch)
tree9d79c398041c8902cff3abb6c9495c3d63bf59f1 /include/asm-i386/smp.h
parent9142e0c8396b25ed4cb549b5efa636065768ebe0 (diff)
[PATCH] i386: Allow to use GENERICARCH for UP kernels
There are some machines around (large xSeries or Unisys ES7000) that need physical IO-APIC destination mode to access all of their IO devices. This currently doesn't work in UP kernels as used in distribution installers. This patch allows to compile even UP kernels as GENERICARCH which allows to use physical or clustered APIC mode. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-i386/smp.h')
-rw-r--r--include/asm-i386/smp.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 142d10e34ade..f87826039a51 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -80,17 +80,11 @@ static inline int hard_smp_processor_id(void)
80 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID)); 80 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
81} 81}
82#endif 82#endif
83
84static __inline int logical_smp_processor_id(void)
85{
86 /* we don't want to mark this access volatile - bad code generation */
87 return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
88}
89
90#endif 83#endif
91 84
92extern int __cpu_disable(void); 85extern int __cpu_disable(void);
93extern void __cpu_die(unsigned int cpu); 86extern void __cpu_die(unsigned int cpu);
87
94#endif /* !__ASSEMBLY__ */ 88#endif /* !__ASSEMBLY__ */
95 89
96#else /* CONFIG_SMP */ 90#else /* CONFIG_SMP */
@@ -100,4 +94,15 @@ extern void __cpu_die(unsigned int cpu);
100#define NO_PROC_ID 0xFF /* No processor magic marker */ 94#define NO_PROC_ID 0xFF /* No processor magic marker */
101 95
102#endif 96#endif
97
98#ifndef __ASSEMBLY__
99#ifdef CONFIG_X86_LOCAL_APIC
100static __inline int logical_smp_processor_id(void)
101{
102 /* we don't want to mark this access volatile - bad code generation */
103 return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
104}
105#endif
106#endif
107
103#endif 108#endif