diff options
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index fec228cd0163..406f308ddead 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -60,7 +60,7 @@ static int smt_snooze_cmdline; | |||
60 | static int __init smt_setup(void) | 60 | static int __init smt_setup(void) |
61 | { | 61 | { |
62 | struct device_node *options; | 62 | struct device_node *options; |
63 | unsigned int *val; | 63 | const unsigned int *val; |
64 | unsigned int cpu; | 64 | unsigned int cpu; |
65 | 65 | ||
66 | if (!cpu_has_feature(CPU_FTR_SMT)) | 66 | if (!cpu_has_feature(CPU_FTR_SMT)) |
@@ -70,8 +70,7 @@ static int __init smt_setup(void) | |||
70 | if (!options) | 70 | if (!options) |
71 | return -ENODEV; | 71 | return -ENODEV; |
72 | 72 | ||
73 | val = (unsigned int *)get_property(options, "ibm,smt-snooze-delay", | 73 | val = get_property(options, "ibm,smt-snooze-delay", NULL); |
74 | NULL); | ||
75 | if (!smt_snooze_cmdline && val) { | 74 | if (!smt_snooze_cmdline && val) { |
76 | for_each_possible_cpu(cpu) | 75 | for_each_possible_cpu(cpu) |
77 | per_cpu(smt_snooze_delay, cpu) = *val; | 76 | per_cpu(smt_snooze_delay, cpu) = *val; |
@@ -231,7 +230,7 @@ static void register_cpu_online(unsigned int cpu) | |||
231 | if (cur_cpu_spec->num_pmcs >= 8) | 230 | if (cur_cpu_spec->num_pmcs >= 8) |
232 | sysdev_create_file(s, &attr_pmc8); | 231 | sysdev_create_file(s, &attr_pmc8); |
233 | 232 | ||
234 | if (cpu_has_feature(CPU_FTR_SMT)) | 233 | if (cpu_has_feature(CPU_FTR_PURR)) |
235 | sysdev_create_file(s, &attr_purr); | 234 | sysdev_create_file(s, &attr_purr); |
236 | } | 235 | } |
237 | 236 | ||
@@ -273,7 +272,7 @@ static void unregister_cpu_online(unsigned int cpu) | |||
273 | if (cur_cpu_spec->num_pmcs >= 8) | 272 | if (cur_cpu_spec->num_pmcs >= 8) |
274 | sysdev_remove_file(s, &attr_pmc8); | 273 | sysdev_remove_file(s, &attr_pmc8); |
275 | 274 | ||
276 | if (cpu_has_feature(CPU_FTR_SMT)) | 275 | if (cpu_has_feature(CPU_FTR_PURR)) |
277 | sysdev_remove_file(s, &attr_purr); | 276 | sysdev_remove_file(s, &attr_purr); |
278 | } | 277 | } |
279 | #endif /* CONFIG_HOTPLUG_CPU */ | 278 | #endif /* CONFIG_HOTPLUG_CPU */ |