summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2015-02-10 00:57:26 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2015-02-10 00:57:26 +0000
commit5e79d149b14a166023390c8dc7fc4c84c1e7c60d (patch)
tree1242333342751ca2fdfb350ed86a57beb8a836b4
parent1e4a004e9c5e8ea54a16473be220e6f044656a91 (diff)
downloadFreeBSD-src-5e79d149b14a166023390c8dc7fc4c84c1e7c60d.zip
FreeBSD-src-5e79d149b14a166023390c8dc7fc4c84c1e7c60d.tar.gz
Add error reporting to interrupt CPU binding.
-rw-r--r--sys/powerpc/pseries/xics.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/powerpc/pseries/xics.c b/sys/powerpc/pseries/xics.c
index f1a3c8b..2d012c5 100644
--- a/sys/powerpc/pseries/xics.c
+++ b/sys/powerpc/pseries/xics.c
@@ -197,12 +197,13 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask)
{
struct xicp_softc *sc = device_get_softc(dev);
cell_t status, cpu;
- int ncpus, i;
+ int ncpus, i, error;
/*
* This doesn't appear to actually support affinity groups, so pick a
* random CPU.
*/
+ ncpus = 0;
CPU_FOREACH(cpu)
if (CPU_ISSET(cpu, &cpumask)) ncpus++;
@@ -217,8 +218,10 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask)
}
- rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, XICP_PRIORITY,
- &status);
+ error = rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu,
+ XICP_PRIORITY, &status);
+ if (error < 0)
+ panic("Cannot bind interrupt %d to CPU %d", irq, cpu);
}
static void
OpenPOWER on IntegriCloud