Commit b12db24d authored by Joel Schopp's avatar Joel Schopp Committed by Linus Torvalds

[PATCH] ppc64: cpu hotplug fix

On Power4 and earlier hardware there is no need to clear the CPPR (see RPAp
479 section 18.5.4.7.2 for what little info there is on the CPPR) when
stopping a cpu.  On hardware that uses Power5 an undocumented change has
been made that requires the CPPR to be cleared if an isolate is to be done
on the stopped cpu.  So the following patch lets cpu hotplug work on the
recent hardware.

I sent this patch to the ppc64-dev list back in mid April and Suse picked
it up then for SLES9 so it has been well tested for several months.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 14bb1c15
......@@ -300,6 +300,10 @@ void __cpu_die(unsigned int cpu)
void cpu_die(void)
{
local_irq_disable();
/* Some hardware requires clearing the CPPR, while other hardware does not
* it is safe either way
*/
pSeriesLP_cppr_info(0, 0);
rtas_stop_self();
/* Should never get here... */
BUG();
......
......@@ -190,7 +190,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
val64);
}
static void pSeriesLP_cppr_info(int n_cpu, u8 value)
void pSeriesLP_cppr_info(int n_cpu, u8 value)
{
unsigned long lpar_rc;
......
......@@ -19,6 +19,9 @@ int xics_get_irq(struct pt_regs *);
void xics_setup_cpu(void);
void xics_cause_IPI(int cpu);
/* first argument is ignored for now*/
void pSeriesLP_cppr_info(int n_cpu, u8 value);
struct xics_ipi_struct {
volatile unsigned long value;
} ____cacheline_aligned;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment