aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sysfs.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-09-24 17:05:59 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-24 17:05:59 -0400
commit02b25fcff676125a88169c8a78d4c6dd647574ed (patch)
tree372fc8e885be41ba1819b2767c8889ecd97ff948 /arch/powerpc/kernel/sysfs.c
parent1694176a210189312e31b083bac1e1688981219a (diff)
parenta68aa1cc6f3203b8a332683ebde67a00f39eec43 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r--arch/powerpc/kernel/sysfs.c9
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;
60static int __init smt_setup(void) 60static 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 */