aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 13:32:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-15 13:32:39 -0400
commite7849f16c13476288fe4fbd420975e8456c75aa0 (patch)
treea4f4f4a720210dd4a7879f979c9c79b6d0b75a3f /drivers/base
parentaf5329cdf51cdd208a323e521faa46800a16d2ec (diff)
parent131b943ae643b1ad6febd67cdbb31d955706ecf4 (diff)
Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: cputopology: always define CPU topology information, clean up cpu topology: always define CPU topology information
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/topology.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 1efe162e16d7..3f6d9b0a6abe 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -93,47 +93,27 @@ static ssize_t show_##name##_list(struct sys_device *dev, char *buf) \
93#define define_siblings_show_func(name) \ 93#define define_siblings_show_func(name) \
94 define_siblings_show_map(name); define_siblings_show_list(name) 94 define_siblings_show_map(name); define_siblings_show_list(name)
95 95
96#ifdef topology_physical_package_id
97define_id_show_func(physical_package_id); 96define_id_show_func(physical_package_id);
98define_one_ro(physical_package_id); 97define_one_ro(physical_package_id);
99#define ref_physical_package_id_attr &attr_physical_package_id.attr,
100#else
101#define ref_physical_package_id_attr
102#endif
103 98
104#ifdef topology_core_id
105define_id_show_func(core_id); 99define_id_show_func(core_id);
106define_one_ro(core_id); 100define_one_ro(core_id);
107#define ref_core_id_attr &attr_core_id.attr,
108#else
109#define ref_core_id_attr
110#endif
111 101
112#ifdef topology_thread_siblings
113define_siblings_show_func(thread_siblings); 102define_siblings_show_func(thread_siblings);
114define_one_ro(thread_siblings); 103define_one_ro(thread_siblings);
115define_one_ro(thread_siblings_list); 104define_one_ro(thread_siblings_list);
116#define ref_thread_siblings_attr \
117 &attr_thread_siblings.attr, &attr_thread_siblings_list.attr,
118#else
119#define ref_thread_siblings_attr
120#endif
121 105
122#ifdef topology_core_siblings
123define_siblings_show_func(core_siblings); 106define_siblings_show_func(core_siblings);
124define_one_ro(core_siblings); 107define_one_ro(core_siblings);
125define_one_ro(core_siblings_list); 108define_one_ro(core_siblings_list);
126#define ref_core_siblings_attr \
127 &attr_core_siblings.attr, &attr_core_siblings_list.attr,
128#else
129#define ref_core_siblings_attr
130#endif
131 109
132static struct attribute *default_attrs[] = { 110static struct attribute *default_attrs[] = {
133 ref_physical_package_id_attr 111 &attr_physical_package_id.attr,
134 ref_core_id_attr 112 &attr_core_id.attr,
135 ref_thread_siblings_attr 113 &attr_thread_siblings.attr,
136 ref_core_siblings_attr 114 &attr_thread_siblings_list.attr,
115 &attr_core_siblings.attr,
116 &attr_core_siblings_list.attr,
137 NULL 117 NULL
138}; 118};
139 119