diff options
-rw-r--r-- | include/asm-x86/smp.h | 27 | ||||
-rw-r--r-- | include/asm-x86/smp_32.h | 27 | ||||
-rw-r--r-- | include/asm-x86/smp_64.h | 27 |
3 files changed, 27 insertions, 54 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index ef26911dc22a..e5534f19c312 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -123,6 +123,33 @@ void smp_store_cpu_info(int id); | |||
123 | # include "smp_64.h" | 123 | # include "smp_64.h" |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #ifdef CONFIG_X86_LOCAL_APIC | ||
127 | |||
128 | static inline int logical_smp_processor_id(void) | ||
129 | { | ||
130 | /* we don't want to mark this access volatile - bad code generation */ | ||
131 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | ||
132 | } | ||
133 | |||
134 | # ifdef APIC_DEFINITION | ||
135 | extern int hard_smp_processor_id(void); | ||
136 | # else | ||
137 | # include <mach_apicdef.h> | ||
138 | static inline int hard_smp_processor_id(void) | ||
139 | { | ||
140 | /* we don't want to mark this access volatile - bad code generation */ | ||
141 | return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); | ||
142 | } | ||
143 | # endif /* APIC_DEFINITION */ | ||
144 | |||
145 | #else /* CONFIG_X86_LOCAL_APIC */ | ||
146 | |||
147 | # ifndef CONFIG_SMP | ||
148 | # define hard_smp_processor_id() 0 | ||
149 | # endif | ||
150 | |||
151 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
152 | |||
126 | #ifdef CONFIG_HOTPLUG_CPU | 153 | #ifdef CONFIG_HOTPLUG_CPU |
127 | extern void cpu_exit_clear(void); | 154 | extern void cpu_exit_clear(void); |
128 | extern void cpu_uninit(void); | 155 | extern void cpu_uninit(void); |
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h index cb3ada2fedbf..53432dbd5426 100644 --- a/include/asm-x86/smp_32.h +++ b/include/asm-x86/smp_32.h | |||
@@ -42,32 +42,5 @@ static inline int num_booting_cpus(void) | |||
42 | #define safe_smp_processor_id() 0 | 42 | #define safe_smp_processor_id() 0 |
43 | #endif /* !CONFIG_SMP */ | 43 | #endif /* !CONFIG_SMP */ |
44 | 44 | ||
45 | #ifdef CONFIG_X86_LOCAL_APIC | ||
46 | |||
47 | static inline int logical_smp_processor_id(void) | ||
48 | { | ||
49 | /* we don't want to mark this access volatile - bad code generation */ | ||
50 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | ||
51 | } | ||
52 | |||
53 | # ifdef APIC_DEFINITION | ||
54 | extern int hard_smp_processor_id(void); | ||
55 | # else | ||
56 | # include <mach_apicdef.h> | ||
57 | static inline int hard_smp_processor_id(void) | ||
58 | { | ||
59 | /* we don't want to mark this access volatile - bad code generation */ | ||
60 | return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); | ||
61 | } | ||
62 | # endif /* APIC_DEFINITION */ | ||
63 | |||
64 | #else /* CONFIG_X86_LOCAL_APIC */ | ||
65 | |||
66 | # ifndef CONFIG_SMP | ||
67 | # define hard_smp_processor_id() 0 | ||
68 | # endif | ||
69 | |||
70 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
71 | |||
72 | #endif /* !ASSEMBLY */ | 45 | #endif /* !ASSEMBLY */ |
73 | #endif | 46 | #endif |
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index c46585e09ea1..015d36e29ade 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h | |||
@@ -46,32 +46,5 @@ static inline int num_booting_cpus(void) | |||
46 | 46 | ||
47 | #define safe_smp_processor_id() smp_processor_id() | 47 | #define safe_smp_processor_id() smp_processor_id() |
48 | 48 | ||
49 | #ifdef CONFIG_X86_LOCAL_APIC | ||
50 | |||
51 | static inline int logical_smp_processor_id(void) | ||
52 | { | ||
53 | /* we don't want to mark this access volatile - bad code generation */ | ||
54 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | ||
55 | } | ||
56 | |||
57 | # ifdef APIC_DEFINITION | ||
58 | extern int hard_smp_processor_id(void); | ||
59 | # else | ||
60 | # include <mach_apicdef.h> | ||
61 | static inline int hard_smp_processor_id(void) | ||
62 | { | ||
63 | /* we don't want to mark this access volatile - bad code generation */ | ||
64 | return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); | ||
65 | } | ||
66 | # endif /* APIC_DEFINITION */ | ||
67 | |||
68 | #else /* CONFIG_X86_LOCAL_APIC */ | ||
69 | |||
70 | # ifndef CONFIG_SMP | ||
71 | # define hard_smp_processor_id() 0 | ||
72 | # endif | ||
73 | |||
74 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
75 | |||
76 | #endif | 49 | #endif |
77 | 50 | ||