lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090713152039.GA7627@basil.fritz.box>
Date:	Mon, 13 Jul 2009 17:20:39 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org, akpm@...l.org,
	benh@...nel.crashing.org, davem@...emloft.net
Subject: [PATCH] Remove topology_thread_siblings

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@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ