]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/smp.h
x86: change GET_APIC_ID() from an inline function to an out-of-line function
[linux-2.6-omap-h63xx.git] / include / asm-x86 / smp.h
index bcbd25cbd863ff4af157a9a1dd5c37018b085052..c0d693ca43576724ad2b19ef5e3c4be3ab72a6fb 100644 (file)
@@ -174,6 +174,11 @@ static inline int logical_smp_processor_id(void)
        return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
 }
 
+static inline unsigned int read_apic_id(void)
+{
+       return *(u32 *)(APIC_BASE + APIC_ID);
+}
+
 # ifdef APIC_DEFINITION
 extern int hard_smp_processor_id(void);
 # else
@@ -181,7 +186,7 @@ extern int hard_smp_processor_id(void);
 static inline int hard_smp_processor_id(void)
 {
        /* we don't want to mark this access volatile - bad code generation */
-       return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID));
+       return GET_APIC_ID(read_apic_id());
 }
 # endif /* APIC_DEFINITION */