diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
commit | ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch) | |
tree | d851c923f85566572112d4c0f884cff388a3cc05 /arch/sparc | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | ea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff) |
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.
The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/sysfs.c | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c index 7408201d7efb..654e8aad3bbe 100644 --- a/arch/sparc/kernel/sysfs.c +++ b/arch/sparc/kernel/sysfs.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Copyright (C) 2007 David S. Miller <davem@davemloft.net> | 3 | * Copyright (C) 2007 David S. Miller <davem@davemloft.net> |
4 | */ | 4 | */ |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/sysdev.h> | 6 | #include <linux/device.h> |
7 | #include <linux/cpu.h> | 7 | #include <linux/cpu.h> |
8 | #include <linux/smp.h> | 8 | #include <linux/smp.h> |
9 | #include <linux/percpu.h> | 9 | #include <linux/percpu.h> |
@@ -16,13 +16,13 @@ | |||
16 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); | 16 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); |
17 | 17 | ||
18 | #define SHOW_MMUSTAT_ULONG(NAME) \ | 18 | #define SHOW_MMUSTAT_ULONG(NAME) \ |
19 | static ssize_t show_##NAME(struct sys_device *dev, \ | 19 | static ssize_t show_##NAME(struct device *dev, \ |
20 | struct sysdev_attribute *attr, char *buf) \ | 20 | struct device_attribute *attr, char *buf) \ |
21 | { \ | 21 | { \ |
22 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ | 22 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ |
23 | return sprintf(buf, "%lu\n", p->NAME); \ | 23 | return sprintf(buf, "%lu\n", p->NAME); \ |
24 | } \ | 24 | } \ |
25 | static SYSDEV_ATTR(NAME, 0444, show_##NAME, NULL) | 25 | static DEVICE_ATTR(NAME, 0444, show_##NAME, NULL) |
26 | 26 | ||
27 | SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_8k_tte); | 27 | SHOW_MMUSTAT_ULONG(immu_tsb_hits_ctx0_8k_tte); |
28 | SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_8k_tte); | 28 | SHOW_MMUSTAT_ULONG(immu_tsb_ticks_ctx0_8k_tte); |
@@ -58,38 +58,38 @@ SHOW_MMUSTAT_ULONG(dmmu_tsb_hits_ctxnon0_256mb_tte); | |||
58 | SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_256mb_tte); | 58 | SHOW_MMUSTAT_ULONG(dmmu_tsb_ticks_ctxnon0_256mb_tte); |
59 | 59 | ||
60 | static struct attribute *mmu_stat_attrs[] = { | 60 | static struct attribute *mmu_stat_attrs[] = { |
61 | &attr_immu_tsb_hits_ctx0_8k_tte.attr, | 61 | &dev_attr_immu_tsb_hits_ctx0_8k_tte.attr, |
62 | &attr_immu_tsb_ticks_ctx0_8k_tte.attr, | 62 | &dev_attr_immu_tsb_ticks_ctx0_8k_tte.attr, |
63 | &attr_immu_tsb_hits_ctx0_64k_tte.attr, | 63 | &dev_attr_immu_tsb_hits_ctx0_64k_tte.attr, |
64 | &attr_immu_tsb_ticks_ctx0_64k_tte.attr, | 64 | &dev_attr_immu_tsb_ticks_ctx0_64k_tte.attr, |
65 | &attr_immu_tsb_hits_ctx0_4mb_tte.attr, | 65 | &dev_attr_immu_tsb_hits_ctx0_4mb_tte.attr, |
66 | &attr_immu_tsb_ticks_ctx0_4mb_tte.attr, | 66 | &dev_attr_immu_tsb_ticks_ctx0_4mb_tte.attr, |
67 | &attr_immu_tsb_hits_ctx0_256mb_tte.attr, | 67 | &dev_attr_immu_tsb_hits_ctx0_256mb_tte.attr, |
68 | &attr_immu_tsb_ticks_ctx0_256mb_tte.attr, | 68 | &dev_attr_immu_tsb_ticks_ctx0_256mb_tte.attr, |
69 | &attr_immu_tsb_hits_ctxnon0_8k_tte.attr, | 69 | &dev_attr_immu_tsb_hits_ctxnon0_8k_tte.attr, |
70 | &attr_immu_tsb_ticks_ctxnon0_8k_tte.attr, | 70 | &dev_attr_immu_tsb_ticks_ctxnon0_8k_tte.attr, |
71 | &attr_immu_tsb_hits_ctxnon0_64k_tte.attr, | 71 | &dev_attr_immu_tsb_hits_ctxnon0_64k_tte.attr, |
72 | &attr_immu_tsb_ticks_ctxnon0_64k_tte.attr, | 72 | &dev_attr_immu_tsb_ticks_ctxnon0_64k_tte.attr, |
73 | &attr_immu_tsb_hits_ctxnon0_4mb_tte.attr, | 73 | &dev_attr_immu_tsb_hits_ctxnon0_4mb_tte.attr, |
74 | &attr_immu_tsb_ticks_ctxnon0_4mb_tte.attr, | 74 | &dev_attr_immu_tsb_ticks_ctxnon0_4mb_tte.attr, |
75 | &attr_immu_tsb_hits_ctxnon0_256mb_tte.attr, | 75 | &dev_attr_immu_tsb_hits_ctxnon0_256mb_tte.attr, |
76 | &attr_immu_tsb_ticks_ctxnon0_256mb_tte.attr, | 76 | &dev_attr_immu_tsb_ticks_ctxnon0_256mb_tte.attr, |
77 | &attr_dmmu_tsb_hits_ctx0_8k_tte.attr, | 77 | &dev_attr_dmmu_tsb_hits_ctx0_8k_tte.attr, |
78 | &attr_dmmu_tsb_ticks_ctx0_8k_tte.attr, | 78 | &dev_attr_dmmu_tsb_ticks_ctx0_8k_tte.attr, |
79 | &attr_dmmu_tsb_hits_ctx0_64k_tte.attr, | 79 | &dev_attr_dmmu_tsb_hits_ctx0_64k_tte.attr, |
80 | &attr_dmmu_tsb_ticks_ctx0_64k_tte.attr, | 80 | &dev_attr_dmmu_tsb_ticks_ctx0_64k_tte.attr, |
81 | &attr_dmmu_tsb_hits_ctx0_4mb_tte.attr, | 81 | &dev_attr_dmmu_tsb_hits_ctx0_4mb_tte.attr, |
82 | &attr_dmmu_tsb_ticks_ctx0_4mb_tte.attr, | 82 | &dev_attr_dmmu_tsb_ticks_ctx0_4mb_tte.attr, |
83 | &attr_dmmu_tsb_hits_ctx0_256mb_tte.attr, | 83 | &dev_attr_dmmu_tsb_hits_ctx0_256mb_tte.attr, |
84 | &attr_dmmu_tsb_ticks_ctx0_256mb_tte.attr, | 84 | &dev_attr_dmmu_tsb_ticks_ctx0_256mb_tte.attr, |
85 | &attr_dmmu_tsb_hits_ctxnon0_8k_tte.attr, | 85 | &dev_attr_dmmu_tsb_hits_ctxnon0_8k_tte.attr, |
86 | &attr_dmmu_tsb_ticks_ctxnon0_8k_tte.attr, | 86 | &dev_attr_dmmu_tsb_ticks_ctxnon0_8k_tte.attr, |
87 | &attr_dmmu_tsb_hits_ctxnon0_64k_tte.attr, | 87 | &dev_attr_dmmu_tsb_hits_ctxnon0_64k_tte.attr, |
88 | &attr_dmmu_tsb_ticks_ctxnon0_64k_tte.attr, | 88 | &dev_attr_dmmu_tsb_ticks_ctxnon0_64k_tte.attr, |
89 | &attr_dmmu_tsb_hits_ctxnon0_4mb_tte.attr, | 89 | &dev_attr_dmmu_tsb_hits_ctxnon0_4mb_tte.attr, |
90 | &attr_dmmu_tsb_ticks_ctxnon0_4mb_tte.attr, | 90 | &dev_attr_dmmu_tsb_ticks_ctxnon0_4mb_tte.attr, |
91 | &attr_dmmu_tsb_hits_ctxnon0_256mb_tte.attr, | 91 | &dev_attr_dmmu_tsb_hits_ctxnon0_256mb_tte.attr, |
92 | &attr_dmmu_tsb_ticks_ctxnon0_256mb_tte.attr, | 92 | &dev_attr_dmmu_tsb_ticks_ctxnon0_256mb_tte.attr, |
93 | NULL, | 93 | NULL, |
94 | }; | 94 | }; |
95 | 95 | ||
@@ -139,15 +139,15 @@ static unsigned long write_mmustat_enable(unsigned long val) | |||
139 | return sun4v_mmustat_conf(ra, &orig_ra); | 139 | return sun4v_mmustat_conf(ra, &orig_ra); |
140 | } | 140 | } |
141 | 141 | ||
142 | static ssize_t show_mmustat_enable(struct sys_device *s, | 142 | static ssize_t show_mmustat_enable(struct device *s, |
143 | struct sysdev_attribute *attr, char *buf) | 143 | struct device_attribute *attr, char *buf) |
144 | { | 144 | { |
145 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); | 145 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); |
146 | return sprintf(buf, "%lx\n", val); | 146 | return sprintf(buf, "%lx\n", val); |
147 | } | 147 | } |
148 | 148 | ||
149 | static ssize_t store_mmustat_enable(struct sys_device *s, | 149 | static ssize_t store_mmustat_enable(struct device *s, |
150 | struct sysdev_attribute *attr, const char *buf, | 150 | struct device_attribute *attr, const char *buf, |
151 | size_t count) | 151 | size_t count) |
152 | { | 152 | { |
153 | unsigned long val, err; | 153 | unsigned long val, err; |
@@ -163,39 +163,39 @@ static ssize_t store_mmustat_enable(struct sys_device *s, | |||
163 | return count; | 163 | return count; |
164 | } | 164 | } |
165 | 165 | ||
166 | static SYSDEV_ATTR(mmustat_enable, 0644, show_mmustat_enable, store_mmustat_enable); | 166 | static DEVICE_ATTR(mmustat_enable, 0644, show_mmustat_enable, store_mmustat_enable); |
167 | 167 | ||
168 | static int mmu_stats_supported; | 168 | static int mmu_stats_supported; |
169 | 169 | ||
170 | static int register_mmu_stats(struct sys_device *s) | 170 | static int register_mmu_stats(struct device *s) |
171 | { | 171 | { |
172 | if (!mmu_stats_supported) | 172 | if (!mmu_stats_supported) |
173 | return 0; | 173 | return 0; |
174 | sysdev_create_file(s, &attr_mmustat_enable); | 174 | device_create_file(s, &dev_attr_mmustat_enable); |
175 | return sysfs_create_group(&s->kobj, &mmu_stat_group); | 175 | return sysfs_create_group(&s->kobj, &mmu_stat_group); |
176 | } | 176 | } |
177 | 177 | ||
178 | #ifdef CONFIG_HOTPLUG_CPU | 178 | #ifdef CONFIG_HOTPLUG_CPU |
179 | static void unregister_mmu_stats(struct sys_device *s) | 179 | static void unregister_mmu_stats(struct device *s) |
180 | { | 180 | { |
181 | if (!mmu_stats_supported) | 181 | if (!mmu_stats_supported) |
182 | return; | 182 | return; |
183 | sysfs_remove_group(&s->kobj, &mmu_stat_group); | 183 | sysfs_remove_group(&s->kobj, &mmu_stat_group); |
184 | sysdev_remove_file(s, &attr_mmustat_enable); | 184 | device_remove_file(s, &dev_attr_mmustat_enable); |
185 | } | 185 | } |
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ | 188 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ |
189 | static ssize_t show_##NAME(struct sys_device *dev, \ | 189 | static ssize_t show_##NAME(struct device *dev, \ |
190 | struct sysdev_attribute *attr, char *buf) \ | 190 | struct device_attribute *attr, char *buf) \ |
191 | { \ | 191 | { \ |
192 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 192 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
193 | return sprintf(buf, "%lu\n", c->MEMBER); \ | 193 | return sprintf(buf, "%lu\n", c->MEMBER); \ |
194 | } | 194 | } |
195 | 195 | ||
196 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ | 196 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ |
197 | static ssize_t show_##NAME(struct sys_device *dev, \ | 197 | static ssize_t show_##NAME(struct device *dev, \ |
198 | struct sysdev_attribute *attr, char *buf) \ | 198 | struct device_attribute *attr, char *buf) \ |
199 | { \ | 199 | { \ |
200 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 200 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
201 | return sprintf(buf, "%u\n", c->MEMBER); \ | 201 | return sprintf(buf, "%u\n", c->MEMBER); \ |
@@ -209,14 +209,14 @@ SHOW_CPUDATA_UINT_NAME(l1_icache_line_size, icache_line_size); | |||
209 | SHOW_CPUDATA_UINT_NAME(l2_cache_size, ecache_size); | 209 | SHOW_CPUDATA_UINT_NAME(l2_cache_size, ecache_size); |
210 | SHOW_CPUDATA_UINT_NAME(l2_cache_line_size, ecache_line_size); | 210 | SHOW_CPUDATA_UINT_NAME(l2_cache_line_size, ecache_line_size); |
211 | 211 | ||
212 | static struct sysdev_attribute cpu_core_attrs[] = { | 212 | static struct device_attribute cpu_core_attrs[] = { |
213 | _SYSDEV_ATTR(clock_tick, 0444, show_clock_tick, NULL), | 213 | __ATTR(clock_tick, 0444, show_clock_tick, NULL), |
214 | _SYSDEV_ATTR(l1_dcache_size, 0444, show_l1_dcache_size, NULL), | 214 | __ATTR(l1_dcache_size, 0444, show_l1_dcache_size, NULL), |
215 | _SYSDEV_ATTR(l1_dcache_line_size, 0444, show_l1_dcache_line_size, NULL), | 215 | __ATTR(l1_dcache_line_size, 0444, show_l1_dcache_line_size, NULL), |
216 | _SYSDEV_ATTR(l1_icache_size, 0444, show_l1_icache_size, NULL), | 216 | __ATTR(l1_icache_size, 0444, show_l1_icache_size, NULL), |
217 | _SYSDEV_ATTR(l1_icache_line_size, 0444, show_l1_icache_line_size, NULL), | 217 | __ATTR(l1_icache_line_size, 0444, show_l1_icache_line_size, NULL), |
218 | _SYSDEV_ATTR(l2_cache_size, 0444, show_l2_cache_size, NULL), | 218 | __ATTR(l2_cache_size, 0444, show_l2_cache_size, NULL), |
219 | _SYSDEV_ATTR(l2_cache_line_size, 0444, show_l2_cache_line_size, NULL), | 219 | __ATTR(l2_cache_line_size, 0444, show_l2_cache_line_size, NULL), |
220 | }; | 220 | }; |
221 | 221 | ||
222 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | 222 | static DEFINE_PER_CPU(struct cpu, cpu_devices); |
@@ -224,11 +224,11 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
224 | static void register_cpu_online(unsigned int cpu) | 224 | static void register_cpu_online(unsigned int cpu) |
225 | { | 225 | { |
226 | struct cpu *c = &per_cpu(cpu_devices, cpu); | 226 | struct cpu *c = &per_cpu(cpu_devices, cpu); |
227 | struct sys_device *s = &c->sysdev; | 227 | struct device *s = &c->dev; |
228 | int i; | 228 | int i; |
229 | 229 | ||
230 | for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++) | 230 | for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++) |
231 | sysdev_create_file(s, &cpu_core_attrs[i]); | 231 | device_create_file(s, &cpu_core_attrs[i]); |
232 | 232 | ||
233 | register_mmu_stats(s); | 233 | register_mmu_stats(s); |
234 | } | 234 | } |
@@ -237,12 +237,12 @@ static void register_cpu_online(unsigned int cpu) | |||
237 | static void unregister_cpu_online(unsigned int cpu) | 237 | static void unregister_cpu_online(unsigned int cpu) |
238 | { | 238 | { |
239 | struct cpu *c = &per_cpu(cpu_devices, cpu); | 239 | struct cpu *c = &per_cpu(cpu_devices, cpu); |
240 | struct sys_device *s = &c->sysdev; | 240 | struct device *s = &c->dev; |
241 | int i; | 241 | int i; |
242 | 242 | ||
243 | unregister_mmu_stats(s); | 243 | unregister_mmu_stats(s); |
244 | for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++) | 244 | for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++) |
245 | sysdev_remove_file(s, &cpu_core_attrs[i]); | 245 | device_remove_file(s, &cpu_core_attrs[i]); |
246 | } | 246 | } |
247 | #endif | 247 | #endif |
248 | 248 | ||