aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/topology.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 21:07:59 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 21:07:59 -0400
commit84c3d4aaec3338201b449034beac41635866bddf (patch)
tree3412951682fb2dd4feb8a5532f8efbaf8b345933 /drivers/base/topology.c
parent43d2548bb2ef7e6d753f91468a746784041e522d (diff)
parentfafa3a3f16723997f039a0193997464d66dafd8f (diff)
Merge commit 'origin/master'
Manual merge of: arch/powerpc/Kconfig arch/powerpc/kernel/stacktrace.c arch/powerpc/mm/slice.c arch/ppc/kernel/smp.c
Diffstat (limited to 'drivers/base/topology.c')
-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