Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2011 20:58:38 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/powerpc/include intr_machdep.h openpicvar.h src/sys/powerpc/mambo mambo_openpic.c src/sys/powerpc/mpc85xx atpic.c isa.c openpic_fdt.c pci_fdt.c src/sys/powerpc/powermac cpcht.c hrowpic.c openpic_macio.c src/sys/powerpc/powerpc ...
Message-ID:  <201101292058.p0TKww6S062969@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2011-01-29 20:58:38 UTC

  FreeBSD src repository

  Modified files:
    sys/powerpc/include  intr_machdep.h openpicvar.h 
    sys/powerpc/mambo    mambo_openpic.c 
    sys/powerpc/mpc85xx  atpic.c isa.c openpic_fdt.c pci_fdt.c 
    sys/powerpc/powermac cpcht.c hrowpic.c openpic_macio.c 
    sys/powerpc/powerpc  intr_machdep.c openpic.c pic_if.m 
    sys/powerpc/ps3      ps3pic.c 
    sys/powerpc/psim     openpic_iobus.c 
  Log:
  SVN rev 218075 on 2011-01-29 20:58:38Z by marcel
  
  Fix the interrupt code, broken 7 months ago. The interrupt framework
  already supported nested PICs, but was limited to having a nested
  AT-PIC only. With G5 support the need for nested OpenPIC controllers
  needed to be added. This was done the wrong way and broke the MPC8555
  eval system in the process.
  
  OFW, as well as FDT, describe the interrupt routing in terms of a
  controller and an interrupt pin on it. This needs to be mapped to a
  flat and global resource: the IRQ. The IRQ is the same as the PCI
  intline and as such needs to be representable in 8 bits. Secondly,
  ISA support pretty much dictates that IRQ 0-15 should be reserved
  for ISA interrupts, because of the internal workins of south bridges.
  Both were broken.
  
  This change reverts revision 209298 for a big part and re-implements
  it simpler. In particular:
  o   The id() method of the PIC I/F is removed again. It's not needed.
  o   The openpic_attach() function has been changed to take the OFW
      or FDT phandle of the controller as a second argument. All bus
      attachments that previously used openpic_attach() as the attach
      method of the device I/F now implement as bus-specific method
      and pass the phandle_t to the renamed openpic_attach().
  o   Change powerpc_register_pic() to take a few more arguments. In
      particular:
      -   Pass the number of IPIs specificly. The number of IRQs carved
          out for a PIC is the sum of the number of int. pins and IPIs.
      -   Pass a flag indicating whether the PIC is an AT-PIC or not.
          This tells the interrupt framework whether to assign IRQ 0-15
          or some other range.
  o   Until we implement proper multi-pass bus enumeration, we have to
      handle the case where we need to map from PIC+pin to IRQ *before*
      the PIC gets registered. This is done in a similar way as before,
      but rather than carving out 256 IRQs per PIC, we carve out 128
      IRQs (124 pins + 4 IPIs). This is supposed to handle the G5 case,
      but should really be fixed properly using multiple passes.
  o   Have the interrupt framework set root_pic in most cases and not
      put that burden in PIC drivers (for the most part).
  o   Remove powerpc_ign_lookup() and replace it with powerpc_get_irq().
      Remove IGN_SHIFT, INTR_INTLINE and INTR_IGN.
  
  Related to the above, fix the Freescale PCI controller driver, broken
  by the FDT code. Besides not attaching properly, bus numbers were
  assigned improperly and enumeration was broken in general. This
  prevented the AT PIC from being discovered and interrupt routing to
  work properly. Consequently, the ata(4) controller stopped functioning.
  
  Fix the driver, and FDT PCI support, enough to get the MPC8555CDS
  going again. The FDT PCI code needs a whole lot more work.
  
  No breakages are expected, but lackiong G5 hardware, it's possible
  that there are unpleasant side-effects. At least MPC85xx support is
  back to where it was 7 months ago -- it's amazing how badly support
  can be broken in just 7 months...
  
  Sponsored by: Juniper Networks
  
  Revision  Changes    Path
  1.18      +4 -8      src/sys/powerpc/include/intr_machdep.h
  1.11      +1 -1      src/sys/powerpc/include/openpicvar.h
  1.2       +10 -11    src/sys/powerpc/mambo/mambo_openpic.c
  1.8       +2 -13     src/sys/powerpc/mpc85xx/atpic.c
  1.3       +1 -7      src/sys/powerpc/mpc85xx/isa.c
  1.2       +5 -6      src/sys/powerpc/mpc85xx/openpic_fdt.c
  1.2       +32 -77    src/sys/powerpc/mpc85xx/pci_fdt.c
  1.10      +4 -12     src/sys/powerpc/powermac/cpcht.c
  1.20      +1 -12     src/sys/powerpc/powermac/hrowpic.c
  1.17      +6 -7      src/sys/powerpc/powermac/openpic_macio.c
  1.35      +84 -28    src/sys/powerpc/powerpc/intr_machdep.c
  1.32      +2 -3      src/sys/powerpc/powerpc/openpic.c
  1.9       +0 -4      src/sys/powerpc/powerpc/pic_if.m
  1.2       +1 -12     src/sys/powerpc/ps3/ps3pic.c
  1.13      +9 -1      src/sys/powerpc/psim/openpic_iobus.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101292058.p0TKww6S062969>