mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-07 15:04:17 +00:00
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>
This commit is contained in:
parent
c1854e0072
commit
c60e65d786
1 changed files with 11 additions and 6 deletions
|
@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
|
||||||
|
|
||||||
/* Fixup atomic count: it exited inside IRQ handler. */
|
/* Fixup atomic count: it exited inside IRQ handler. */
|
||||||
task_thread_info(paca[lcpu].__current)->preempt_count = 0;
|
task_thread_info(paca[lcpu].__current)->preempt_count = 0;
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
|
if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
|
||||||
goto out;
|
goto out;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* If the RTAS start-cpu token does not exist then presume the
|
* If the RTAS start-cpu token does not exist then presume the
|
||||||
* cpu is already spinning.
|
* cpu is already spinning.
|
||||||
|
@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
out:
|
out:
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu)
|
||||||
vpa_init(cpu);
|
vpa_init(cpu);
|
||||||
|
|
||||||
cpumask_clear_cpu(cpu, of_spin_mask);
|
cpumask_clear_cpu(cpu, of_spin_mask);
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
set_cpu_current_state(cpu, CPU_STATE_ONLINE);
|
set_cpu_current_state(cpu, CPU_STATE_ONLINE);
|
||||||
set_default_offline_state(cpu);
|
set_default_offline_state(cpu);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_XICS */
|
#endif /* CONFIG_XICS */
|
||||||
|
|
||||||
static void __devinit smp_pSeries_kick_cpu(int nr)
|
static void __devinit smp_pSeries_kick_cpu(int nr)
|
||||||
{
|
{
|
||||||
long rc;
|
|
||||||
unsigned long hcpuid;
|
|
||||||
BUG_ON(nr < 0 || nr >= NR_CPUS);
|
BUG_ON(nr < 0 || nr >= NR_CPUS);
|
||||||
|
|
||||||
if (!smp_startup_cpu(nr))
|
if (!smp_startup_cpu(nr))
|
||||||
|
@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
|
||||||
* the processor will continue on to secondary_start
|
* the processor will continue on to secondary_start
|
||||||
*/
|
*/
|
||||||
paca[nr].cpu_start = 1;
|
paca[nr].cpu_start = 1;
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
set_preferred_offline_state(nr, CPU_STATE_ONLINE);
|
set_preferred_offline_state(nr, CPU_STATE_ONLINE);
|
||||||
|
|
||||||
if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) {
|
if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) {
|
||||||
|
long rc;
|
||||||
|
unsigned long hcpuid;
|
||||||
|
|
||||||
hcpuid = get_hard_smp_processor_id(nr);
|
hcpuid = get_hard_smp_processor_id(nr);
|
||||||
rc = plpar_hcall_norets(H_PROD, hcpuid);
|
rc = plpar_hcall_norets(H_PROD, hcpuid);
|
||||||
if (rc != H_SUCCESS)
|
if (rc != H_SUCCESS)
|
||||||
printk(KERN_ERR "Error: Prod to wake up processor %d "
|
printk(KERN_ERR "Error: Prod to wake up processor %d "
|
||||||
"Ret= %ld\n", nr, rc);
|
"Ret= %ld\n", nr, rc);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int smp_pSeries_cpu_bootable(unsigned int nr)
|
static int smp_pSeries_cpu_bootable(unsigned int nr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue