@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
112
112
113
113
/* Fixup atomic count: it exited inside IRQ handler. */
114
114
task_thread_info (paca [lcpu ].__current )-> preempt_count = 0 ;
115
-
115
+ #ifdef CONFIG_HOTPLUG_CPU
116
116
if (get_cpu_current_state (lcpu ) == CPU_STATE_INACTIVE )
117
117
goto out ;
118
-
118
+ #endif
119
119
/*
120
120
* If the RTAS start-cpu token does not exist then presume the
121
121
* cpu is already spinning.
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
130
130
return 0 ;
131
131
}
132
132
133
+ #ifdef CONFIG_HOTPLUG_CPU
133
134
out :
135
+ #endif
134
136
return 1 ;
135
137
}
136
138
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu)
144
146
vpa_init (cpu );
145
147
146
148
cpumask_clear_cpu (cpu , of_spin_mask );
149
+ #ifdef CONFIG_HOTPLUG_CPU
147
150
set_cpu_current_state (cpu , CPU_STATE_ONLINE );
148
151
set_default_offline_state (cpu );
149
-
152
+ #endif
150
153
}
151
154
#endif /* CONFIG_XICS */
152
155
153
156
static void __devinit smp_pSeries_kick_cpu (int nr )
154
157
{
155
- long rc ;
156
- unsigned long hcpuid ;
157
158
BUG_ON (nr < 0 || nr >= NR_CPUS );
158
159
159
160
if (!smp_startup_cpu (nr ))
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
165
166
* the processor will continue on to secondary_start
166
167
*/
167
168
paca [nr ].cpu_start = 1 ;
168
-
169
+ #ifdef CONFIG_HOTPLUG_CPU
169
170
set_preferred_offline_state (nr , CPU_STATE_ONLINE );
170
171
171
172
if (get_cpu_current_state (nr ) == CPU_STATE_INACTIVE ) {
173
+ long rc ;
174
+ unsigned long hcpuid ;
175
+
172
176
hcpuid = get_hard_smp_processor_id (nr );
173
177
rc = plpar_hcall_norets (H_PROD , hcpuid );
174
178
if (rc != H_SUCCESS )
175
179
printk (KERN_ERR "Error: Prod to wake up processor %d "
176
180
"Ret= %ld\n" , nr , rc );
177
181
}
182
+ #endif
178
183
}
179
184
180
185
static int smp_pSeries_cpu_bootable (unsigned int nr )
0 commit comments