aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r--arch/powerpc/kernel/sysfs.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index d57818aea081..933e214c33e8 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -66,16 +66,17 @@ static int __init smt_setup(void)
66 if (!cpu_has_feature(CPU_FTR_SMT)) 66 if (!cpu_has_feature(CPU_FTR_SMT))
67 return -ENODEV; 67 return -ENODEV;
68 68
69 options = find_path_device("/options"); 69 options = of_find_node_by_path("/options");
70 if (!options) 70 if (!options)
71 return -ENODEV; 71 return -ENODEV;
72 72
73 val = get_property(options, "ibm,smt-snooze-delay", NULL); 73 val = of_get_property(options, "ibm,smt-snooze-delay", NULL);
74 if (!smt_snooze_cmdline && val) { 74 if (!smt_snooze_cmdline && val) {
75 for_each_possible_cpu(cpu) 75 for_each_possible_cpu(cpu)
76 per_cpu(smt_snooze_delay, cpu) = *val; 76 per_cpu(smt_snooze_delay, cpu) = *val;
77 } 77 }
78 78
79 of_node_put(options);
79 return 0; 80 return 0;
80} 81}
81__initcall(smt_setup); 82__initcall(smt_setup);
@@ -189,12 +190,12 @@ SYSFS_PMCSETUP(purr, SPRN_PURR);
189SYSFS_PMCSETUP(spurr, SPRN_SPURR); 190SYSFS_PMCSETUP(spurr, SPRN_SPURR);
190SYSFS_PMCSETUP(dscr, SPRN_DSCR); 191SYSFS_PMCSETUP(dscr, SPRN_DSCR);
191 192
192SYSFS_PMCSETUP(pa6t_pmc0, PA6T_SPRN_PMC0); 193SYSFS_PMCSETUP(pa6t_pmc0, SPRN_PA6T_PMC0);
193SYSFS_PMCSETUP(pa6t_pmc1, PA6T_SPRN_PMC1); 194SYSFS_PMCSETUP(pa6t_pmc1, SPRN_PA6T_PMC1);
194SYSFS_PMCSETUP(pa6t_pmc2, PA6T_SPRN_PMC2); 195SYSFS_PMCSETUP(pa6t_pmc2, SPRN_PA6T_PMC2);
195SYSFS_PMCSETUP(pa6t_pmc3, PA6T_SPRN_PMC3); 196SYSFS_PMCSETUP(pa6t_pmc3, SPRN_PA6T_PMC3);
196SYSFS_PMCSETUP(pa6t_pmc4, PA6T_SPRN_PMC4); 197SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4);
197SYSFS_PMCSETUP(pa6t_pmc5, PA6T_SPRN_PMC5); 198SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5);
198 199
199 200
200static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); 201static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra);