diff options
author | Jack Steiner <steiner@sgi.com> | 2008-03-28 15:12:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:33 -0400 |
commit | 05f2d12c3563dea8c81b301f9f3cf7919af23b13 (patch) | |
tree | d696f29159d311d8d1fde7f6bd1b01261ca713b9 /include/asm-x86/smp.h | |
parent | a5c15d419d4b68535222b51f9054dd08d5e67470 (diff) |
x86: change GET_APIC_ID() from an inline function to an out-of-line function
Introduce a function to read the local APIC_ID.
This change is in preparation for additional changes to
the APICID functions that will come in a later patch.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/smp.h')
-rw-r--r-- | include/asm-x86/smp.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index bcbd25cbd863..c0d693ca4357 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -174,6 +174,11 @@ static inline int logical_smp_processor_id(void) | |||
174 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | 174 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); |
175 | } | 175 | } |
176 | 176 | ||
177 | static inline unsigned int read_apic_id(void) | ||
178 | { | ||
179 | return *(u32 *)(APIC_BASE + APIC_ID); | ||
180 | } | ||
181 | |||
177 | # ifdef APIC_DEFINITION | 182 | # ifdef APIC_DEFINITION |
178 | extern int hard_smp_processor_id(void); | 183 | extern int hard_smp_processor_id(void); |
179 | # else | 184 | # else |
@@ -181,7 +186,7 @@ extern int hard_smp_processor_id(void); | |||
181 | static inline int hard_smp_processor_id(void) | 186 | static inline int hard_smp_processor_id(void) |
182 | { | 187 | { |
183 | /* we don't want to mark this access volatile - bad code generation */ | 188 | /* we don't want to mark this access volatile - bad code generation */ |
184 | return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); | 189 | return GET_APIC_ID(read_apic_id()); |
185 | } | 190 | } |
186 | # endif /* APIC_DEFINITION */ | 191 | # endif /* APIC_DEFINITION */ |
187 | 192 | ||