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>
This commit is contained in:
committed by
Ingo Molnar
parent
c50cbb05a0
commit
131b943ae6
@@ -59,16 +59,14 @@ static ssize_t show_cpumap(int type, cpumask_t *mask, char *buf)
|
|||||||
static inline ssize_t show_##name(struct sys_device *dev, char *buf) \
|
static inline ssize_t show_##name(struct sys_device *dev, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
unsigned int cpu = dev->id; \
|
unsigned int cpu = dev->id; \
|
||||||
cpumask_t siblings = topology_##name(cpu); \
|
return show_cpumap(0, &(topology_##name(cpu)), buf); \
|
||||||
return show_cpumap(0, &siblings, buf); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define define_siblings_show_list(name) \
|
#define define_siblings_show_list(name) \
|
||||||
static inline ssize_t show_##name##_list(struct sys_device *dev, char *buf) \
|
static inline ssize_t show_##name##_list(struct sys_device *dev, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
unsigned int cpu = dev->id; \
|
unsigned int cpu = dev->id; \
|
||||||
cpumask_t siblings = topology_##name(cpu); \
|
return show_cpumap(1, &(topology_##name(cpu)), buf); \
|
||||||
return show_cpumap(1, &siblings, buf); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define define_siblings_show_func(name) \
|
#define define_siblings_show_func(name) \
|
||||||
|
Reference in New Issue
Block a user