aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/topology.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-06-05 12:37:15 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-13 04:10:20 -0400
commit131b943ae643b1ad6febd67cdbb31d955706ecf4 (patch)
tree79c0204d241b5b6dab689d776fa33df9fe8f56b6 /drivers/base/topology.c
parentc50cbb05a05cf1f9ca3592272eff053c847727d8 (diff)
cputopology: always define CPU topology information, clean up
simplify drivers/base/topology.c a bit. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/base/topology.c')
-rw-r--r--drivers/base/topology.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 24d29a9fc25b..f0cb27011930 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -59,16 +59,14 @@ static ssize_t show_cpumap(int type, cpumask_t *mask, char *buf)
59static inline ssize_t show_##name(struct sys_device *dev, char *buf) \ 59static inline ssize_t show_##name(struct sys_device *dev, char *buf) \
60{ \ 60{ \
61 unsigned int cpu = dev->id; \ 61 unsigned int cpu = dev->id; \
62 cpumask_t siblings = topology_##name(cpu); \ 62 return show_cpumap(0, &(topology_##name(cpu)), buf); \
63 return show_cpumap(0, &siblings, buf); \
64} 63}
65 64
66#define define_siblings_show_list(name) \ 65#define define_siblings_show_list(name) \
67static inline ssize_t show_##name##_list(struct sys_device *dev, char *buf) \ 66static inline ssize_t show_##name##_list(struct sys_device *dev, char *buf) \
68{ \ 67{ \
69 unsigned int cpu = dev->id; \ 68 unsigned int cpu = dev->id; \
70 cpumask_t siblings = topology_##name(cpu); \ 69 return show_cpumap(1, &(topology_##name(cpu)), buf); \
71 return show_cpumap(1, &siblings, buf); \
72} 70}
73 71
74#define define_siblings_show_func(name) \ 72#define define_siblings_show_func(name) \