diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
commit | e86908614f2c7fec401827e5cefd7a6ea9407f85 (patch) | |
tree | fcb5d9e52422b37bdaf0e647126ebdfc1680f162 /arch/powerpc/kernel/sysfs.c | |
parent | 547307420931344a868275bd7ea7a30f117a15a9 (diff) | |
parent | 9b4b8feb962f4b3e74768b7205f1f8f6cce87238 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
[POWERPC] Add memchr() to the bootwrapper
[POWERPC] Implement logging of unhandled signals
[POWERPC] Add legacy serial support for OPB with flattened device tree
[POWERPC] Use 1TB segments
[POWERPC] XilinxFB: Allow fixed framebuffer base address
[POWERPC] XilinxFB: Add support for custom screen resolution
[POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
[POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
[POWERPC] 4xx: Kilauea defconfig file
[POWERPC] 4xx: Kilauea DTS
[POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
[POWERPC] 4xx: Add AMCC 405EX support to cputable.c
[POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
[POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
[POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
[POWERPC] 85xx: Killed <asm/mpc85xx.h>
[POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
[POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
[POWERPC] mpc8272ads: Remove muram from the CPM reg property.
[POWERPC] Make clockevents work on PPC601 processors
...
Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 55d29ed4b7a0..25d9a96484dd 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -197,6 +197,36 @@ SYSFS_PMCSETUP(pa6t_pmc3, SPRN_PA6T_PMC3); | |||
197 | SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4); | 197 | SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4); |
198 | SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5); | 198 | SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5); |
199 | 199 | ||
200 | #ifdef CONFIG_DEBUG_KERNEL | ||
201 | SYSFS_PMCSETUP(hid0, SPRN_HID0); | ||
202 | SYSFS_PMCSETUP(hid1, SPRN_HID1); | ||
203 | SYSFS_PMCSETUP(hid4, SPRN_HID4); | ||
204 | SYSFS_PMCSETUP(hid5, SPRN_HID5); | ||
205 | SYSFS_PMCSETUP(ima0, SPRN_PA6T_IMA0); | ||
206 | SYSFS_PMCSETUP(ima1, SPRN_PA6T_IMA1); | ||
207 | SYSFS_PMCSETUP(ima2, SPRN_PA6T_IMA2); | ||
208 | SYSFS_PMCSETUP(ima3, SPRN_PA6T_IMA3); | ||
209 | SYSFS_PMCSETUP(ima4, SPRN_PA6T_IMA4); | ||
210 | SYSFS_PMCSETUP(ima5, SPRN_PA6T_IMA5); | ||
211 | SYSFS_PMCSETUP(ima6, SPRN_PA6T_IMA6); | ||
212 | SYSFS_PMCSETUP(ima7, SPRN_PA6T_IMA7); | ||
213 | SYSFS_PMCSETUP(ima8, SPRN_PA6T_IMA8); | ||
214 | SYSFS_PMCSETUP(ima9, SPRN_PA6T_IMA9); | ||
215 | SYSFS_PMCSETUP(imaat, SPRN_PA6T_IMAAT); | ||
216 | SYSFS_PMCSETUP(btcr, SPRN_PA6T_BTCR); | ||
217 | SYSFS_PMCSETUP(pccr, SPRN_PA6T_PCCR); | ||
218 | SYSFS_PMCSETUP(rpccr, SPRN_PA6T_RPCCR); | ||
219 | SYSFS_PMCSETUP(der, SPRN_PA6T_DER); | ||
220 | SYSFS_PMCSETUP(mer, SPRN_PA6T_MER); | ||
221 | SYSFS_PMCSETUP(ber, SPRN_PA6T_BER); | ||
222 | SYSFS_PMCSETUP(ier, SPRN_PA6T_IER); | ||
223 | SYSFS_PMCSETUP(sier, SPRN_PA6T_SIER); | ||
224 | SYSFS_PMCSETUP(siar, SPRN_PA6T_SIAR); | ||
225 | SYSFS_PMCSETUP(tsr0, SPRN_PA6T_TSR0); | ||
226 | SYSFS_PMCSETUP(tsr1, SPRN_PA6T_TSR1); | ||
227 | SYSFS_PMCSETUP(tsr2, SPRN_PA6T_TSR2); | ||
228 | SYSFS_PMCSETUP(tsr3, SPRN_PA6T_TSR3); | ||
229 | #endif /* CONFIG_DEBUG_KERNEL */ | ||
200 | 230 | ||
201 | static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); | 231 | static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); |
202 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); | 232 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); |
@@ -228,6 +258,36 @@ static struct sysdev_attribute pa6t_attrs[] = { | |||
228 | _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3), | 258 | _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3), |
229 | _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4), | 259 | _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4), |
230 | _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5), | 260 | _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5), |
261 | #ifdef CONFIG_DEBUG_KERNEL | ||
262 | _SYSDEV_ATTR(hid0, 0600, show_hid0, store_hid0), | ||
263 | _SYSDEV_ATTR(hid1, 0600, show_hid1, store_hid1), | ||
264 | _SYSDEV_ATTR(hid4, 0600, show_hid4, store_hid4), | ||
265 | _SYSDEV_ATTR(hid5, 0600, show_hid5, store_hid5), | ||
266 | _SYSDEV_ATTR(ima0, 0600, show_ima0, store_ima0), | ||
267 | _SYSDEV_ATTR(ima1, 0600, show_ima1, store_ima1), | ||
268 | _SYSDEV_ATTR(ima2, 0600, show_ima2, store_ima2), | ||
269 | _SYSDEV_ATTR(ima3, 0600, show_ima3, store_ima3), | ||
270 | _SYSDEV_ATTR(ima4, 0600, show_ima4, store_ima4), | ||
271 | _SYSDEV_ATTR(ima5, 0600, show_ima5, store_ima5), | ||
272 | _SYSDEV_ATTR(ima6, 0600, show_ima6, store_ima6), | ||
273 | _SYSDEV_ATTR(ima7, 0600, show_ima7, store_ima7), | ||
274 | _SYSDEV_ATTR(ima8, 0600, show_ima8, store_ima8), | ||
275 | _SYSDEV_ATTR(ima9, 0600, show_ima9, store_ima9), | ||
276 | _SYSDEV_ATTR(imaat, 0600, show_imaat, store_imaat), | ||
277 | _SYSDEV_ATTR(btcr, 0600, show_btcr, store_btcr), | ||
278 | _SYSDEV_ATTR(pccr, 0600, show_pccr, store_pccr), | ||
279 | _SYSDEV_ATTR(rpccr, 0600, show_rpccr, store_rpccr), | ||
280 | _SYSDEV_ATTR(der, 0600, show_der, store_der), | ||
281 | _SYSDEV_ATTR(mer, 0600, show_mer, store_mer), | ||
282 | _SYSDEV_ATTR(ber, 0600, show_ber, store_ber), | ||
283 | _SYSDEV_ATTR(ier, 0600, show_ier, store_ier), | ||
284 | _SYSDEV_ATTR(sier, 0600, show_sier, store_sier), | ||
285 | _SYSDEV_ATTR(siar, 0600, show_siar, store_siar), | ||
286 | _SYSDEV_ATTR(tsr0, 0600, show_tsr0, store_tsr0), | ||
287 | _SYSDEV_ATTR(tsr1, 0600, show_tsr1, store_tsr1), | ||
288 | _SYSDEV_ATTR(tsr2, 0600, show_tsr2, store_tsr2), | ||
289 | _SYSDEV_ATTR(tsr3, 0600, show_tsr3, store_tsr3), | ||
290 | #endif /* CONFIG_DEBUG_KERNEL */ | ||
231 | }; | 291 | }; |
232 | 292 | ||
233 | 293 | ||
@@ -380,12 +440,14 @@ int cpu_add_sysdev_attr_group(struct attribute_group *attrs) | |||
380 | { | 440 | { |
381 | int cpu; | 441 | int cpu; |
382 | struct sys_device *sysdev; | 442 | struct sys_device *sysdev; |
443 | int ret; | ||
383 | 444 | ||
384 | mutex_lock(&cpu_mutex); | 445 | mutex_lock(&cpu_mutex); |
385 | 446 | ||
386 | for_each_possible_cpu(cpu) { | 447 | for_each_possible_cpu(cpu) { |
387 | sysdev = get_cpu_sysdev(cpu); | 448 | sysdev = get_cpu_sysdev(cpu); |
388 | sysfs_create_group(&sysdev->kobj, attrs); | 449 | ret = sysfs_create_group(&sysdev->kobj, attrs); |
450 | WARN_ON(ret != 0); | ||
389 | } | 451 | } |
390 | 452 | ||
391 | mutex_unlock(&cpu_mutex); | 453 | mutex_unlock(&cpu_mutex); |