Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619478

[PATCH 2/2] x86/smp: Remove the redundant #ifdef CONFIG_SMP directive

From Dou Liyang <douly.fnst@cn.fujitsu.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] x86/smp: Remove the redundant #ifdef CONFIG_SMP directive
Date 2017-04-09 12:50 +0200
Message-ID <tuizU-1Fl-15@gated-at.bofh.it> (permalink)
References <tuizT-1Fl-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


According to:
  ...
  config X86_LOCAL_APIC
     def_bool y
     depends on X86_64 || SMP || X86_32_NON_STANDARD ...
  ...
in arch/x86/Kconfig

If X86_LOCAL_APIC is n, the SMP must be n.

So, Remove the redundant #ifdef CONFIG_SMP directive in the case of
!X86_LOCAL_APIC.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/include/asm/smp.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index f64aaa7..47103ec 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -188,11 +188,7 @@ static inline int logical_smp_processor_id(void)
 extern int hard_smp_processor_id(void);
 
 #else /* CONFIG_X86_LOCAL_APIC */
-
-# ifndef CONFIG_SMP
-#  define hard_smp_processor_id()	0
-# endif
-
+#define hard_smp_processor_id()	0
 #endif /* CONFIG_X86_LOCAL_APIC */
 
 #ifdef CONFIG_DEBUG_NMI_SELFTEST
-- 
2.5.5

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] x86/smp: Refine the code in the case of X86_32_SMP Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-04-09 12:50 +0200
  [PATCH 2/2] x86/smp: Remove the redundant #ifdef CONFIG_SMP directive Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-04-09 12:50 +0200
  [PATCH 3/3] x86/irq: Remove a redundant #ifdef directive Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-04-10 10:10 +0200

csiph-web