aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2014-05-11 16:49:31 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2014-05-11 16:49:31 +0000
commit0d1381bb569d8b1d52217e9a92a8278dca1f4c15 (patch)
tree8952ddedc1a08ed5978b5c17374b5d92c3dbf5b9 /sys
parent76902266ae6bd08d20532316b9c031e1f34ee232 (diff)
downloadsrc-0d1381bb569d8b1d52217e9a92a8278dca1f4c15.tar.gz
src-0d1381bb569d8b1d52217e9a92a8278dca1f4c15.zip
Fix interrupt allocation after changes to nexus. This makes PS3 boot
multiuser again (this commit comes from the PS3 itself). Some problems still exist with SMP, apparently, as I had to boot a non-SMP kernel to get here.
Notes
Notes: svn path=/head/; revision=265883
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/ps3/ps3bus.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/powerpc/ps3/ps3bus.c b/sys/powerpc/ps3/ps3bus.c
index 65e11534f509..d7659e44f5d4 100644
--- a/sys/powerpc/ps3/ps3bus.c
+++ b/sys/powerpc/ps3/ps3bus.c
@@ -127,6 +127,7 @@ static device_method_t ps3bus_methods[] = {
struct ps3bus_softc {
struct rman sc_mem_rman;
+ struct rman sc_intr_rman;
struct mem_region *regions;
int rcount;
};
@@ -328,7 +329,11 @@ ps3bus_attach(device_t self)
sc = device_get_softc(self);
sc->sc_mem_rman.rm_type = RMAN_ARRAY;
sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O";
+ sc->sc_intr_rman.rm_type = RMAN_ARRAY;
+ sc->sc_intr_rman.rm_descr = "PS3Bus Interrupts";
rman_init(&sc->sc_mem_rman);
+ rman_init(&sc->sc_intr_rman);
+ rman_manage_region(&sc->sc_intr_rman, 0, ~0);
/* Get memory regions for DMA */
mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount);
@@ -562,8 +567,13 @@ ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid,
rm = &sc->sc_mem_rman;
break;
case SYS_RES_IRQ:
- return (resource_list_alloc(&dinfo->resources, bus, child,
- type, rid, start, end, count, flags));
+ rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ,
+ *rid);
+ rm = &sc->sc_intr_rman;
+ adjstart = rle->start;
+ adjcount = ulmax(count, rle->count);
+ adjend = ulmax(rle->end, rle->start + adjcount - 1);
+ break;
default:
device_printf(bus, "unknown resource request from %s\n",
device_get_nameunit(child));