diff options
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 0f0c3a9ae2e5..73560ef6f802 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -65,20 +65,20 @@ static int __init smt_setup(void) | |||
65 | unsigned int cpu; | 65 | unsigned int cpu; |
66 | 66 | ||
67 | if (!cpu_has_feature(CPU_FTR_SMT)) | 67 | if (!cpu_has_feature(CPU_FTR_SMT)) |
68 | return 1; | 68 | return -ENODEV; |
69 | 69 | ||
70 | options = find_path_device("/options"); | 70 | options = find_path_device("/options"); |
71 | if (!options) | 71 | if (!options) |
72 | return 1; | 72 | return -ENODEV; |
73 | 73 | ||
74 | val = (unsigned int *)get_property(options, "ibm,smt-snooze-delay", | 74 | val = (unsigned int *)get_property(options, "ibm,smt-snooze-delay", |
75 | NULL); | 75 | NULL); |
76 | if (!smt_snooze_cmdline && val) { | 76 | if (!smt_snooze_cmdline && val) { |
77 | for_each_cpu(cpu) | 77 | for_each_possible_cpu(cpu) |
78 | per_cpu(smt_snooze_delay, cpu) = *val; | 78 | per_cpu(smt_snooze_delay, cpu) = *val; |
79 | } | 79 | } |
80 | 80 | ||
81 | return 1; | 81 | return 0; |
82 | } | 82 | } |
83 | __initcall(smt_setup); | 83 | __initcall(smt_setup); |
84 | 84 | ||
@@ -93,7 +93,7 @@ static int __init setup_smt_snooze_delay(char *str) | |||
93 | smt_snooze_cmdline = 1; | 93 | smt_snooze_cmdline = 1; |
94 | 94 | ||
95 | if (get_option(&str, &snooze)) { | 95 | if (get_option(&str, &snooze)) { |
96 | for_each_cpu(cpu) | 96 | for_each_possible_cpu(cpu) |
97 | per_cpu(smt_snooze_delay, cpu) = snooze; | 97 | per_cpu(smt_snooze_delay, cpu) = snooze; |
98 | } | 98 | } |
99 | 99 | ||
@@ -347,7 +347,7 @@ static int __init topology_init(void) | |||
347 | 347 | ||
348 | register_cpu_notifier(&sysfs_cpu_nb); | 348 | register_cpu_notifier(&sysfs_cpu_nb); |
349 | 349 | ||
350 | for_each_cpu(cpu) { | 350 | for_each_possible_cpu(cpu) { |
351 | struct cpu *c = &per_cpu(cpu_devices, cpu); | 351 | struct cpu *c = &per_cpu(cpu_devices, cpu); |
352 | 352 | ||
353 | #ifdef CONFIG_NUMA | 353 | #ifdef CONFIG_NUMA |