mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
powerpc: Make core sibling information available to userspace
Implement the notion of "core siblings" for powerpc. This makes /sys/devices/system/cpu/cpu*/topology/core_siblings present sensible values, indicating online CPUs which share an L2 cache. BenH: Made cpu_to_l2cache() use of_find_node_by_phandle() instead of IBM-specific open coded search Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
0764bf63da
commit
440a0857e3
3 changed files with 66 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ extern int smp_hw_index[];
|
|||
#endif
|
||||
|
||||
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
|
||||
DECLARE_PER_CPU(cpumask_t, cpu_core_map);
|
||||
|
||||
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
|
|||
#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))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue