mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org, akpm@osdl.org,
	benh@kernel.crashing.org, davem@davemloft.net
Subject: [PATCH] Remove topology_thread_siblings
Date: Mon, 13 Jul 2009 17:20:39 +0200	[thread overview]
Message-ID: <20090713152039.GA7627@basil.fritz.box> (raw)

Remove topology_thread_siblings

It's unused and x86 only provides a fallback that gives incorrect
results (no siblings). So if anyone would start using it they 
would get wrong results on x86.

It's equivalent topology_thread_cpumask anyways. So just remove it 
everywhere, including ia64, sparc, power.

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
 arch/ia64/include/asm/topology.h     |    1 -
 arch/powerpc/include/asm/topology.h  |    1 -
 arch/sparc/include/asm/topology_64.h |    1 -
 include/linux/topology.h             |    3 ---
 4 files changed, 6 deletions(-)

Index: linux-2.6.31-rc2-ak/arch/ia64/include/asm/topology.h
===================================================================
--- linux-2.6.31-rc2-ak.orig/arch/ia64/include/asm/topology.h
+++ linux-2.6.31-rc2-ak/arch/ia64/include/asm/topology.h
@@ -104,7 +104,6 @@ void build_cpu_to_node_map(void);
 #define topology_physical_package_id(cpu)	(cpu_data(cpu)->socket_id)
 #define topology_core_id(cpu)			(cpu_data(cpu)->core_id)
 #define topology_core_siblings(cpu)		(cpu_core_map[cpu])
-#define topology_thread_siblings(cpu)		(per_cpu(cpu_sibling_map, cpu))
 #define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
 #define topology_thread_cpumask(cpu)		(&per_cpu(cpu_sibling_map, cpu))
 #define smt_capable() 				(smp_num_siblings > 1)
Index: linux-2.6.31-rc2-ak/arch/powerpc/include/asm/topology.h
===================================================================
--- linux-2.6.31-rc2-ak.orig/arch/powerpc/include/asm/topology.h
+++ linux-2.6.31-rc2-ak/arch/powerpc/include/asm/topology.h
@@ -105,7 +105,6 @@ static inline void sysfs_remove_device_f
 #ifdef CONFIG_PPC64
 #include <asm/smp.h>
 
-#define topology_thread_siblings(cpu)	(per_cpu(cpu_sibling_map, cpu))
 #define topology_core_siblings(cpu)	(per_cpu(cpu_core_map, cpu))
 #define topology_thread_cpumask(cpu)	(&per_cpu(cpu_sibling_map, cpu))
 #define topology_core_cpumask(cpu)	(&per_cpu(cpu_core_map, cpu))
Index: linux-2.6.31-rc2-ak/arch/sparc/include/asm/topology_64.h
===================================================================
--- linux-2.6.31-rc2-ak.orig/arch/sparc/include/asm/topology_64.h
+++ linux-2.6.31-rc2-ak/arch/sparc/include/asm/topology_64.h
@@ -73,7 +73,6 @@ static inline int pcibus_to_node(struct
 #define topology_physical_package_id(cpu)	(cpu_data(cpu).proc_id)
 #define topology_core_id(cpu)			(cpu_data(cpu).core_id)
 #define topology_core_siblings(cpu)		(cpu_core_map[cpu])
-#define topology_thread_siblings(cpu)		(per_cpu(cpu_sibling_map, cpu))
 #define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
 #define topology_thread_cpumask(cpu)		(&per_cpu(cpu_sibling_map, cpu))
 #define mc_capable()				(sparc64_multi_core)
Index: linux-2.6.31-rc2-ak/include/linux/topology.h
===================================================================
--- linux-2.6.31-rc2-ak.orig/include/linux/topology.h
+++ linux-2.6.31-rc2-ak/include/linux/topology.h
@@ -183,9 +183,6 @@ int arch_update_cpu_topology(void);
 #ifndef topology_core_id
 #define topology_core_id(cpu)			((void)(cpu), 0)
 #endif
-#ifndef topology_thread_siblings
-#define topology_thread_siblings(cpu)		cpumask_of_cpu(cpu)
-#endif
 #ifndef topology_core_siblings
 #define topology_core_siblings(cpu)		cpumask_of_cpu(cpu)
 #endif

                 reply	other threads:[~2009-07-13 15:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090713152039.GA7627@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®