Skip to content

Commit c60e65d

Browse files
Matt Evansozbenh
authored andcommitted
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>
1 parent c1854e0 commit c60e65d

File tree

1 file changed

+11
-6
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+11
-6
lines changed

arch/powerpc/platforms/pseries/smp.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
112112

113113
/* Fixup atomic count: it exited inside IRQ handler. */
114114
task_thread_info(paca[lcpu].__current)->preempt_count = 0;
115-
115+
#ifdef CONFIG_HOTPLUG_CPU
116116
if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
117117
goto out;
118-
118+
#endif
119119
/*
120120
* If the RTAS start-cpu token does not exist then presume the
121121
* cpu is already spinning.
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
130130
return 0;
131131
}
132132

133+
#ifdef CONFIG_HOTPLUG_CPU
133134
out:
135+
#endif
134136
return 1;
135137
}
136138

@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu)
144146
vpa_init(cpu);
145147

146148
cpumask_clear_cpu(cpu, of_spin_mask);
149+
#ifdef CONFIG_HOTPLUG_CPU
147150
set_cpu_current_state(cpu, CPU_STATE_ONLINE);
148151
set_default_offline_state(cpu);
149-
152+
#endif
150153
}
151154
#endif /* CONFIG_XICS */
152155

153156
static void __devinit smp_pSeries_kick_cpu(int nr)
154157
{
155-
long rc;
156-
unsigned long hcpuid;
157158
BUG_ON(nr < 0 || nr >= NR_CPUS);
158159

159160
if (!smp_startup_cpu(nr))
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
165166
* the processor will continue on to secondary_start
166167
*/
167168
paca[nr].cpu_start = 1;
168-
169+
#ifdef CONFIG_HOTPLUG_CPU
169170
set_preferred_offline_state(nr, CPU_STATE_ONLINE);
170171

171172
if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) {
173+
long rc;
174+
unsigned long hcpuid;
175+
172176
hcpuid = get_hard_smp_processor_id(nr);
173177
rc = plpar_hcall_norets(H_PROD, hcpuid);
174178
if (rc != H_SUCCESS)
175179
printk(KERN_ERR "Error: Prod to wake up processor %d "
176180
"Ret= %ld\n", nr, rc);
177181
}
182+
#endif
178183
}
179184

180185
static int smp_pSeries_cpu_bootable(unsigned int nr)

0 commit comments

Comments
 (0)