diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 13:32:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 13:32:39 -0400 |
commit | e7849f16c13476288fe4fbd420975e8456c75aa0 (patch) | |
tree | a4f4f4a720210dd4a7879f979c9c79b6d0b75a3f /drivers/base | |
parent | af5329cdf51cdd208a323e521faa46800a16d2ec (diff) | |
parent | 131b943ae643b1ad6febd67cdbb31d955706ecf4 (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.c | 32 |
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 | ||
97 | define_id_show_func(physical_package_id); | 96 | define_id_show_func(physical_package_id); |
98 | define_one_ro(physical_package_id); | 97 | define_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 | ||
105 | define_id_show_func(core_id); | 99 | define_id_show_func(core_id); |
106 | define_one_ro(core_id); | 100 | define_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 | ||
113 | define_siblings_show_func(thread_siblings); | 102 | define_siblings_show_func(thread_siblings); |
114 | define_one_ro(thread_siblings); | 103 | define_one_ro(thread_siblings); |
115 | define_one_ro(thread_siblings_list); | 104 | define_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 | ||
123 | define_siblings_show_func(core_siblings); | 106 | define_siblings_show_func(core_siblings); |
124 | define_one_ro(core_siblings); | 107 | define_one_ro(core_siblings); |
125 | define_one_ro(core_siblings_list); | 108 | define_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 | ||
132 | static struct attribute *default_attrs[] = { | 110 | static 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 | ||