[PATCH 2/9] [PATCH] x86: provide bogus hard_smp_processor_id

!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

We provide a bogus macro for x86_64 in case CONFIG_X86_LOCAL_APIC
is not set. It will always be set for x86_64, so the effect
is just to make the code equal to i386.

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

diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index 2520633..c46585e 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -46,6 +46,8 @@ static inline int num_booting_cpus(void)
 
 #define safe_smp_processor_id()		smp_processor_id()
 
+#ifdef CONFIG_X86_LOCAL_APIC
+
 static inline int logical_smp_processor_id(void)
 {
 	/* we don't want to mark this access volatile - bad code generation */
@@ -63,5 +65,13 @@ static inline int hard_smp_processor_id(void)
 }
 # endif /* APIC_DEFINITION */
 
+#else /* CONFIG_X86_LOCAL_APIC */
+
+# ifndef CONFIG_SMP
+#  define hard_smp_processor_id()	0
+# endif
+
+#endif /* CONFIG_X86_LOCAL_APIC */
+
 #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 2/9] [PATCH] x86: provide bogus hard_smp_processor_id, 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)