summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-14 14:17:51 +0000
committerian <ian@FreeBSD.org>2014-05-14 14:17:51 +0000
commit1baea4807a7a800ea024080ecb08d8018d423b35 (patch)
tree8bba76de8ef5301e1c8c1469cba379463335efa1 /sys/sparc64
parent796f2c87ad85df08fa64cd699bc66b9054363166 (diff)
downloadFreeBSD-src-1baea4807a7a800ea024080ecb08d8018d423b35.zip
FreeBSD-src-1baea4807a7a800ea024080ecb08d8018d423b35.tar.gz
MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,
r259199, r259484, r259513, r259514, r259516 The kernel stack guard pages are only below the stack pointer, not above. Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Rearchitect platform memory map parsing to make it less Open Firmware-centric. Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Return the correct IEEE 1275 code for "nextprop". Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt. Configure interrupt sense based on device tree information. Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/ebus/ebus.c3
-rw-r--r--sys/sparc64/isa/ofw_isa.c3
-rw-r--r--sys/sparc64/pci/fire.c3
-rw-r--r--sys/sparc64/pci/ofw_pcib_subr.c3
-rw-r--r--sys/sparc64/pci/psycho.c3
-rw-r--r--sys/sparc64/pci/schizo.c3
6 files changed, 6 insertions, 12 deletions
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c
index 677e31d..93ad342 100644
--- a/sys/sparc64/ebus/ebus.c
+++ b/sys/sparc64/ebus/ebus.c
@@ -638,7 +638,6 @@ ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node)
uint64_t start;
uint32_t rintr;
int i, nintr, nreg, rv;
- uint8_t maskbuf[sizeof(reg) + sizeof(intr)];
edi = malloc(sizeof(*edi), M_DEVBUF, M_ZERO | M_WAITOK);
if (ofw_bus_gen_setup_devinfo(&edi->edi_obdinfo, node) != 0) {
@@ -673,7 +672,7 @@ ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node)
intr = intrs[i];
rv = ofw_bus_lookup_imap(node, &sc->sc_iinfo, &reg,
sizeof(reg), &intr, sizeof(intr), &rintr,
- sizeof(rintr), NULL, maskbuf);
+ sizeof(rintr), NULL);
#ifndef SUN4V
if (rv != 0)
rintr = INTMAP_VEC(sc->sc_ign, rintr);
diff --git a/sys/sparc64/isa/ofw_isa.c b/sys/sparc64/isa/ofw_isa.c
index 0d0f5b6..dbe5d8a 100644
--- a/sys/sparc64/isa/ofw_isa.c
+++ b/sys/sparc64/isa/ofw_isa.c
@@ -129,7 +129,6 @@ ofw_isa_route_intr(device_t bridge, phandle_t node, struct ofw_bus_iinfo *ii,
ofw_isa_intr_t intr)
{
struct isa_regs reg;
- uint8_t maskbuf[sizeof(reg) + sizeof(intr)];
device_t pbridge;
ofw_isa_intr_t mintr;
@@ -139,7 +138,7 @@ ofw_isa_route_intr(device_t bridge, phandle_t node, struct ofw_bus_iinfo *ii,
* fully specified, so we may not continue to map.
*/
if (!ofw_bus_lookup_imap(node, ii, &reg, sizeof(reg),
- &intr, sizeof(intr), &mintr, sizeof(mintr), NULL, maskbuf)) {
+ &intr, sizeof(intr), &mintr, sizeof(mintr), NULL)) {
/* Try routing at the parent bridge. */
mintr = PCIB_ROUTE_INTERRUPT(pbridge, bridge, intr);
}
diff --git a/sys/sparc64/pci/fire.c b/sys/sparc64/pci/fire.c
index 4209f84..84526f0 100644
--- a/sys/sparc64/pci/fire.c
+++ b/sys/sparc64/pci/fire.c
@@ -1472,13 +1472,12 @@ fire_route_interrupt(device_t bridge, device_t dev, int pin)
struct fire_softc *sc;
struct ofw_pci_register reg;
ofw_pci_intr_t pintr, mintr;
- uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
sc = device_get_softc(bridge);
pintr = pin;
if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo,
&reg, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
- NULL, maskbuf) != 0)
+ NULL) != 0)
return (mintr);
device_printf(bridge, "could not route pin %d for device %d.%d\n",
diff --git a/sys/sparc64/pci/ofw_pcib_subr.c b/sys/sparc64/pci/ofw_pcib_subr.c
index 2ffb32d..14fa72b 100644
--- a/sys/sparc64/pci/ofw_pcib_subr.c
+++ b/sys/sparc64/pci/ofw_pcib_subr.c
@@ -70,7 +70,6 @@ ofw_pcib_gen_route_interrupt(device_t bridge, device_t dev, int intpin)
struct ofw_bus_iinfo *ii;
struct ofw_pci_register reg;
ofw_pci_intr_t pintr, mintr;
- uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
sc = device_get_softc(bridge);
ii = &sc->ops_iinfo;
@@ -78,7 +77,7 @@ ofw_pcib_gen_route_interrupt(device_t bridge, device_t dev, int intpin)
pintr = intpin;
if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, &reg,
sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
- NULL, maskbuf)) {
+ NULL)) {
/*
* If we've found a mapping, return it and don't map
* it again on higher levels - that causes problems
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 8717426..4881d1f 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -1048,13 +1048,12 @@ psycho_route_interrupt(device_t bridge, device_t dev, int pin)
struct ofw_pci_register reg;
bus_addr_t intrmap;
ofw_pci_intr_t pintr, mintr;
- uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
sc = device_get_softc(bridge);
pintr = pin;
if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo,
&reg, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
- NULL, maskbuf))
+ NULL))
return (mintr);
/*
* If this is outside of the range for an intpin, it's likely a full
diff --git a/sys/sparc64/pci/schizo.c b/sys/sparc64/pci/schizo.c
index f92aa78..b89c7c0 100644
--- a/sys/sparc64/pci/schizo.c
+++ b/sys/sparc64/pci/schizo.c
@@ -1121,13 +1121,12 @@ schizo_route_interrupt(device_t bridge, device_t dev, int pin)
struct schizo_softc *sc;
struct ofw_pci_register reg;
ofw_pci_intr_t pintr, mintr;
- uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
sc = device_get_softc(bridge);
pintr = pin;
if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo,
&reg, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
- NULL, maskbuf))
+ NULL))
return (mintr);
device_printf(bridge, "could not route pin %d for device %d.%d\n",
OpenPOWER on IntegriCloud