[PATCH 1/9] [PATCH] x86: surround hard_smp_processor_id in APIC_DEFINITION

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, <glommer@...>, <mingo@...>, <tglx@...>, Glauber Costa <gcosta@...>
Date: Thursday, March 27, 2008 - 1:05 pm

APIC_DEFINITION is not defined in x86_64, so in practice, we keep
our old code here. But as a nice side effect, the code is now
equal to smp_32.h.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
 include/asm-x86/smp_64.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index c53a011..2520633 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -52,12 +52,16 @@ static inline int logical_smp_processor_id(void)
 	return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
 }
 
-#include <mach_apicdef.h>
+# ifdef APIC_DEFINITION
+extern int hard_smp_processor_id(void);
+# else
+#  include <mach_apicdef.h>
 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));
 }
+# endif /* APIC_DEFINITION */
 
 #endif
 
-- 
1.5.0.6

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/9] integrate smp.h, Glauber Costa, (Thu Mar 27, 1:05 pm)
Re: [PATCH 0/9] integrate smp.h, Ingo Molnar, (Fri Mar 28, 5:07 am)
[PATCH 6/9] [PATCH] x86: split safe_smp_processor_id, Glauber Costa, (Thu Mar 27, 1:06 pm)
[PATCH 5/9] [PATCH] x86: merge includes in smp.h, Glauber Costa, (Thu Mar 27, 1:06 pm)
[PATCH 1/9] [PATCH] x86: surround hard_smp_processor_id in A..., Glauber Costa, (Thu Mar 27, 1:05 pm)
[PATCH 7/9] [PATCH] x86: merge SMP definitions of smp.h, Glauber Costa, (Thu Mar 27, 1:06 pm)