summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/arm/arm/gic.c2
-rw-r--r--sys/arm/mv/mv_pci.c2
-rw-r--r--sys/dev/ofw/ofwbus.c8
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c
index 265c6e7..4e7f3bb 100644
--- a/sys/arm/arm/gic.c
+++ b/sys/arm/arm/gic.c
@@ -273,7 +273,7 @@ arm_gic_attach(device_t dev)
arm_config_irq = gic_config_irq;
icciidr = gic_c_read_4(GICC_IIDR);
- device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x sc->nirqs %u\n",
+ device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n",
icciidr>>20, (icciidr>>16) & 0xF, (icciidr>>12) & 0xf,
(icciidr & 0xfff), sc->nirqs);
diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c
index 012b31b..8ac6c76 100644
--- a/sys/arm/mv/mv_pci.c
+++ b/sys/arm/mv/mv_pci.c
@@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t child, int count,
for (i = start; i < start + count; i++) {
setbit(&sc->sc_msi_bitmap, i);
- irqs[i] = MSI_IRQ + i;
+ *irqs++ = MSI_IRQ + i;
}
debugf("%s: start: %x count: %x\n", __func__, start, count);
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index ac0f788..e135513 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -399,11 +399,17 @@ ofwbus_adjust_resource(device_t bus, device_t child __unused, int type,
}
static int
-ofwbus_release_resource(device_t bus __unused, device_t child, int type,
+ofwbus_release_resource(device_t bus, device_t child, int type,
int rid, struct resource *r)
{
+ struct resource_list_entry *rle;
int error;
+ /* Clean resource list entry */
+ rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid);
+ if (rle != NULL)
+ rle->res = NULL;
+
if ((rman_get_flags(r) & RF_ACTIVE) != 0) {
error = bus_deactivate_resource(child, type, rid, r);
if (error)
OpenPOWER on IntegriCloud