提交 2ba95bcb 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

x86: provide bogus hard_smp_processor_id

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: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 fe874b3e
...@@ -46,6 +46,8 @@ static inline int num_booting_cpus(void) ...@@ -46,6 +46,8 @@ static inline int num_booting_cpus(void)
#define safe_smp_processor_id() smp_processor_id() #define safe_smp_processor_id() smp_processor_id()
#ifdef CONFIG_X86_LOCAL_APIC
static inline int logical_smp_processor_id(void) static inline int logical_smp_processor_id(void)
{ {
/* we don't want to mark this access volatile - bad code generation */ /* we don't want to mark this access volatile - bad code generation */
...@@ -63,5 +65,13 @@ static inline int hard_smp_processor_id(void) ...@@ -63,5 +65,13 @@ static inline int hard_smp_processor_id(void)
} }
# endif /* APIC_DEFINITION */ # endif /* APIC_DEFINITION */
#else /* CONFIG_X86_LOCAL_APIC */
# ifndef CONFIG_SMP
# define hard_smp_processor_id() 0
# endif
#endif /* CONFIG_X86_LOCAL_APIC */
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册