]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r256994, r257016, r257055, r257059, r257060, r257075
authorian <ian@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 13 May 2014 18:06:26 +0000 (18:06 +0000)
committerian <ian@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 13 May 2014 18:06:26 +0000 (18:06 +0000)
commitea96e04aa45e3beaad57450e5a89298f85a925d3
tree3ed47a96a6001c3efbae46873c17573b47209815
parenta1b829bb651a71f16e0beac8011e523fc2d6e1fb
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@265969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
16 files changed:
sys/conf/files.powerpc
sys/dev/fdt/fdt_common.c
sys/dev/ofw/ofw_bus.h
sys/dev/ofw/ofw_bus_if.m
sys/dev/ofw/ofw_nexus.c [new file with mode: 0644]
sys/dev/ofw/ofw_nexus.h [new file with mode: 0644]
sys/powerpc/include/intr_machdep.h
sys/powerpc/mpc85xx/atpic.c
sys/powerpc/ofw/ofw_pci.c
sys/powerpc/ofw/ofw_pcib_pci.c
sys/powerpc/ofw/ofw_pcibus.c
sys/powerpc/ofw/openpic_ofw.c
sys/powerpc/powerpc/intr_machdep.c
sys/powerpc/powerpc/nexus.c
sys/powerpc/powerpc/pic_if.m
sys/powerpc/pseries/vdevice.c