diff options
author | Matt Evans <matt@ozlabs.au.ibm.com> | 2011-03-31 15:33:08 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-05 02:22:11 -0400 |
commit | c60e65d7863620945d498a8ac60181077879599c (patch) | |
tree | a9cb50bc7b778d95514305e3cf629f466f9ccb5d /arch | |
parent | c1854e00727f50f7ac99e98d26ece04c087ef785 (diff) |
powerpc/pseries: Fix build without CONFIG_HOTPLUG_CPU
Signed-off-by: Matt Evans <matt@ozlabs.au.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index d6479f9738f0..a509c5292a67 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
112 | 112 | ||
113 | /* Fixup atomic count: it exited inside IRQ handler. */ | 113 | /* Fixup atomic count: it exited inside IRQ handler. */ |
114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; | 114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; |
115 | 115 | #ifdef CONFIG_HOTPLUG_CPU | |
116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) | 116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) |
117 | goto out; | 117 | goto out; |
118 | 118 | #endif | |
119 | /* | 119 | /* |
120 | * If the RTAS start-cpu token does not exist then presume the | 120 | * If the RTAS start-cpu token does not exist then presume the |
121 | * cpu is already spinning. | 121 | * cpu is already spinning. |
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | #ifdef CONFIG_HOTPLUG_CPU | ||
133 | out: | 134 | out: |
135 | #endif | ||
134 | return 1; | 136 | return 1; |
135 | } | 137 | } |
136 | 138 | ||
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
144 | vpa_init(cpu); | 146 | vpa_init(cpu); |
145 | 147 | ||
146 | cpumask_clear_cpu(cpu, of_spin_mask); | 148 | cpumask_clear_cpu(cpu, of_spin_mask); |
149 | #ifdef CONFIG_HOTPLUG_CPU | ||
147 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); | 150 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); |
148 | set_default_offline_state(cpu); | 151 | set_default_offline_state(cpu); |
149 | 152 | #endif | |
150 | } | 153 | } |
151 | #endif /* CONFIG_XICS */ | 154 | #endif /* CONFIG_XICS */ |
152 | 155 | ||
153 | static void __devinit smp_pSeries_kick_cpu(int nr) | 156 | static void __devinit smp_pSeries_kick_cpu(int nr) |
154 | { | 157 | { |
155 | long rc; | ||
156 | unsigned long hcpuid; | ||
157 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 158 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
158 | 159 | ||
159 | if (!smp_startup_cpu(nr)) | 160 | if (!smp_startup_cpu(nr)) |
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr) | |||
165 | * the processor will continue on to secondary_start | 166 | * the processor will continue on to secondary_start |
166 | */ | 167 | */ |
167 | paca[nr].cpu_start = 1; | 168 | paca[nr].cpu_start = 1; |
168 | 169 | #ifdef CONFIG_HOTPLUG_CPU | |
169 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); | 170 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); |
170 | 171 | ||
171 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { | 172 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { |
173 | long rc; | ||
174 | unsigned long hcpuid; | ||
175 | |||
172 | hcpuid = get_hard_smp_processor_id(nr); | 176 | hcpuid = get_hard_smp_processor_id(nr); |
173 | rc = plpar_hcall_norets(H_PROD, hcpuid); | 177 | rc = plpar_hcall_norets(H_PROD, hcpuid); |
174 | if (rc != H_SUCCESS) | 178 | if (rc != H_SUCCESS) |
175 | printk(KERN_ERR "Error: Prod to wake up processor %d " | 179 | printk(KERN_ERR "Error: Prod to wake up processor %d " |
176 | "Ret= %ld\n", nr, rc); | 180 | "Ret= %ld\n", nr, rc); |
177 | } | 181 | } |
182 | #endif | ||
178 | } | 183 | } |
179 | 184 | ||
180 | static int smp_pSeries_cpu_bootable(unsigned int nr) | 185 | static int smp_pSeries_cpu_bootable(unsigned int nr) |