diff options
author | ian <ian@FreeBSD.org> | 2014-05-13 18:06:26 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-13 18:06:26 +0000 |
commit | 399f18336611368662b09e65882f98bf17a5587a (patch) | |
tree | 3ed47a96a6001c3efbae46873c17573b47209815 /sys/powerpc/pseries | |
parent | 41e4178a5bf9750ed65445b40e81c0b5f56d0c4e (diff) | |
download | FreeBSD-src-399f18336611368662b09e65882f98bf17a5587a.zip FreeBSD-src-399f18336611368662b09e65882f98bf17a5587a.tar.gz |
MFC r256994, r257016, r257055, r257059, r257060, r257075
Add two new interfaces to ofw_bus:
- ofw_bus_map_intr()
Maps an (iparent, IRQ) tuple to a system-global interrupt number in some
platform dependent way. This is meant to be implemented as a replacement
for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus
hierarchy.
- ofw_bus_config_intr()
Configures an interrupt (previously mapped) based on firmware sense flags.
This replaces manual interpretation of the sense field in bus drivers and
will, in a follow-up, allow that interpretation to be redirected to the PIC
drivers where it belongs. This will eventually replace the tables in
/sys/dev/fdt/fdt_ARCH.c
The PowerPC/AIM code has been converted to use these globally, with an
implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming
OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly
be integrated into pic_if.m and bounced through nexus into the PIC tree.
Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The
sparc64 driver will be modified to use this shortly.
Allow PIC drivers to translate firmware sense codes for themselves. This
is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not
happen quite yet.
Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs,
which would try to treat the previously-mapped interrupts from
fdt_decode_intr() as interrupt line numbers on the same parent PIC.
Remove some of the code required for supporting ssm(4) on SPARC in favor
of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated
into this rework, this should be (trivially) revisited.
Diffstat (limited to 'sys/powerpc/pseries')
-rw-r--r-- | sys/powerpc/pseries/vdevice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/powerpc/pseries/vdevice.c b/sys/powerpc/pseries/vdevice.c index 8ddd531..54cd5dd 100644 --- a/sys/powerpc/pseries/vdevice.c +++ b/sys/powerpc/pseries/vdevice.c @@ -156,7 +156,8 @@ vdevice_attach(device_t dev) for (i = 0; i < nintr; i += icells) { u_int irq = intr[i]; if (iparent != -1) - irq = MAP_IRQ(iparent, intr[i]); + irq = ofw_bus_map_intr(dev, iparent, + intr[i]); resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ, i, irq, irq, i); |