aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-01-11 01:44:36 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 01:44:36 -0800
commit3d311cb2e0c88fa555aff6ce67635028241b7440 (patch)
tree120ebfc829bfcb8b2087f8ad04a3c119e1c31e0c /arch
parentd00da3f86a633fa1a767a406e52aa3201717f33a (diff)
downloadhistory-3d311cb2e0c88fa555aff6ce67635028241b7440.tar.gz
[PATCH] ppc64: Fix rtas_set_indicator(9005)
It turns out we were passing in the wrong thing to the rtas_set_indicator call. Luckily we got away with it because it looks like firmware does not check arguments and just inserts or removes the current cpu from the global server group. Fix it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/kernel/pSeries_smp.c3
-rw-r--r--arch/ppc64/kernel/xics.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c
index da4b63fbb7ae0a..f8f2007b888505 100644
--- a/arch/ppc64/kernel/pSeries_smp.c
+++ b/arch/ppc64/kernel/pSeries_smp.c
@@ -265,7 +265,8 @@ static void __devinit smp_xics_setup_cpu(int cpu)
* necessary from a secondary thread as the OF start-cpu interface
* performs this function for us on primary threads.
*/
- rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE, default_distrib_server, 1);
+ rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
+ (1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
#endif
}
diff --git a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c
index dd88142ebf39a1..eca025abe0987b 100644
--- a/arch/ppc64/kernel/xics.c
+++ b/arch/ppc64/kernel/xics.c
@@ -91,6 +91,7 @@ static int xics_irq_8259_cascade_real = 0;
static unsigned int default_server = 0xFF;
/* also referenced in smp.c... */
unsigned int default_distrib_server = 0;
+unsigned int interrupt_server_size = 8;
/*
* XICS only has a single IPI, so encode the messages per CPU
@@ -511,6 +512,10 @@ nextnode:
default_server = ireg[0];
default_distrib_server = ireg[i-1]; /* take last element */
}
+ ireg = (uint *)get_property(np,
+ "ibm,interrupt-server#-size", NULL);
+ if (ireg)
+ interrupt_server_size = *ireg;
break;
}
}
@@ -650,9 +655,9 @@ void xics_migrate_irqs_away(void)
ops->cppr_info(cpu, 0);
iosync();
- /* Refuse any new interrupts... */
+ /* remove ourselves from the global interrupt queue */
status = rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
- hard_smp_processor_id(), 0);
+ (1UL << interrupt_server_size) - 1 - default_distrib_server, 0);
WARN_ON(status != 0);
/* Allow IPIs again... */