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


Groups > linux.kernel > #1394545 > unrolled thread

[PATCH] x86/topology: remove redundant ENABLE_TOPO_DEFINES

Started bySudeep Holla <sudeep.holla@arm.com>
First post2016-05-04 19:00 +0200
Last post2016-05-05 11:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] x86/topology: remove redundant ENABLE_TOPO_DEFINES Sudeep Holla <sudeep.holla@arm.com> - 2016-05-04 19:00 +0200
    Re: [PATCH] x86/topology: remove redundant ENABLE_TOPO_DEFINES Borislav Petkov <bp@suse.de> - 2016-05-04 19:10 +0200
    [tip:x86/cpu] x86/topology: Remove redundant ENABLE_TOPO_DEFINES tip-bot for Sudeep Holla <tipbot@zytor.com> - 2016-05-05 11:40 +0200

#1394545 — [PATCH] x86/topology: remove redundant ENABLE_TOPO_DEFINES

FromSudeep Holla <sudeep.holla@arm.com>
Date2016-05-04 19:00 +0200
Subject[PATCH] x86/topology: remove redundant ENABLE_TOPO_DEFINES
Message-ID<rv8jw-7F4-13@gated-at.bofh.it>
Commit c8e56d20f2d1 ("x86: Kill CONFIG_X86_HT") removed CONFIG_X86_HT
and defined ENABLE_TOPO_DEFINES always if CONFIG_SMP, which makes
ENABLE_TOPO_DEFINES redundant.

This patch removes the redundant ENABLE_TOPO_DEFINES and instead uses
CONFIG_SMP directly

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/x86/include/asm/topology.h | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Hi,

When I was referring x86 topology code for something, I found
ENABLE_TOPO_DEFINES to be redundant.

Regards,
Sudeep

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 7f991bd5031b..c9a4ed73aef4 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -25,16 +25,6 @@
 #ifndef _ASM_X86_TOPOLOGY_H
 #define _ASM_X86_TOPOLOGY_H
 
-#ifdef CONFIG_X86_32
-# ifdef CONFIG_SMP
-#  define ENABLE_TOPO_DEFINES
-# endif
-#else
-# ifdef CONFIG_SMP
-#  define ENABLE_TOPO_DEFINES
-# endif
-#endif
-
 /*
  * to preserve the visibility of NUMA_NO_NODE definition,
  * moved to there from here.  May be used independent of
@@ -123,7 +113,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
 #define topology_physical_package_id(cpu)	(cpu_data(cpu).phys_proc_id)
 #define topology_core_id(cpu)			(cpu_data(cpu).cpu_core_id)
 
-#ifdef ENABLE_TOPO_DEFINES
+#ifdef CONFIG_SMP
 #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
 #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1394556

FromBorislav Petkov <bp@suse.de>
Date2016-05-04 19:10 +0200
Message-ID<rv8tc-86C-23@gated-at.bofh.it>
In reply to#1394545
On Wed, May 04, 2016 at 05:50:59PM +0100, Sudeep Holla wrote:
> Commit c8e56d20f2d1 ("x86: Kill CONFIG_X86_HT") removed CONFIG_X86_HT
> and defined ENABLE_TOPO_DEFINES always if CONFIG_SMP, which makes
> ENABLE_TOPO_DEFINES redundant.
> 
> This patch removes the redundant ENABLE_TOPO_DEFINES and instead uses
> CONFIG_SMP directly
> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/x86/include/asm/topology.h | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)

LGTM,

Acked-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

[toc] | [prev] | [next] | [standalone]


#1394965 — [tip:x86/cpu] x86/topology: Remove redundant ENABLE_TOPO_DEFINES

Fromtip-bot for Sudeep Holla <tipbot@zytor.com>
Date2016-05-05 11:40 +0200
Subject[tip:x86/cpu] x86/topology: Remove redundant ENABLE_TOPO_DEFINES
Message-ID<rvnVf-5Rb-5@gated-at.bofh.it>
In reply to#1394545
Commit-ID:  3282e6b8f89eaeaf4915ee6cc57bcf06d1d6cead
Gitweb:     http://git.kernel.org/tip/3282e6b8f89eaeaf4915ee6cc57bcf06d1d6cead
Author:     Sudeep Holla <sudeep.holla@arm.com>
AuthorDate: Wed, 4 May 2016 17:50:59 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 5 May 2016 08:42:48 +0200

x86/topology: Remove redundant ENABLE_TOPO_DEFINES

Commit c8e56d20f2d1 ("x86: Kill CONFIG_X86_HT") removed CONFIG_X86_HT
and defined ENABLE_TOPO_DEFINES always if CONFIG_SMP, which makes
ENABLE_TOPO_DEFINES redundant.

This patch removes the redundant ENABLE_TOPO_DEFINES and instead uses
CONFIG_SMP directly

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1462380659-5968-1-git-send-email-sudeep.holla@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/topology.h | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 7f991bd5..c9a4ed7 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -25,16 +25,6 @@
 #ifndef _ASM_X86_TOPOLOGY_H
 #define _ASM_X86_TOPOLOGY_H
 
-#ifdef CONFIG_X86_32
-# ifdef CONFIG_SMP
-#  define ENABLE_TOPO_DEFINES
-# endif
-#else
-# ifdef CONFIG_SMP
-#  define ENABLE_TOPO_DEFINES
-# endif
-#endif
-
 /*
  * to preserve the visibility of NUMA_NO_NODE definition,
  * moved to there from here.  May be used independent of
@@ -123,7 +113,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
 #define topology_physical_package_id(cpu)	(cpu_data(cpu).phys_proc_id)
 #define topology_core_id(cpu)			(cpu_data(cpu).cpu_core_id)
 
-#ifdef ENABLE_TOPO_DEFINES
+#ifdef CONFIG_SMP
 #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
 #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web