1. 09 5月, 2007 2 次提交
    • D
      [SPARC64] PCI: Use root list of pbm's instead of pci_controller_info's · 34768bc8
      David S. Miller 提交于
      The idea is to move more and more things into the pbm,
      with the eventual goal of eliminating the pci_controller_info
      entirely as there really isn't any need for it.
      
      This stage of the transformations requires some reworking of
      the PCI error interrupt handling.
      
      It might be tricky to get rid of the pci_controller_info parenting for
      a few reasons:
      
      1) When we get an uncorrectable or correctable error we want
         to interrogate the IOMMU and streaming cache of both
         PBMs for error status.  These errors come from the UPA
         front-end which is shared between the two PBM PCI bus
         segments.
      
         Historically speaking this is why I choose the datastructure
         hierarchy of pci_controller_info-->pci_pbm_info
      
      2) The probing does a portid/devhandle match to look for the
         'other' pbm, but this is entirely an artifact and can be
         eliminated trivially.
      
      What we could do to solve #1 is to have a "buddy" pointer from one pbm
      to another.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34768bc8
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
  2. 07 5月, 2007 2 次提交
    • D
      [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/pci.c · a6009dda
      David S. Miller 提交于
      apb_calc_first_last(), apb_fake_ranges(), pci_of_scan_bus(),
      of_scan_pci_bridge(), pci_of_scan_bus(), and pci_scan_one_pbm()
      should all be __devinit.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6009dda
    • D
      [SPARC64]: SUN4U PCI-E controller support. · 861fe906
      David S. Miller 提交于
      Some minor refactoring in the generic code was necessary for
      this:
      
      1) This controller requires 8-byte access to the interrupt map
         and clear register.  They are 64-bits on all the other
         SBUS and PCI controllers anyways, so this was easy to cure.
      
      2) The IMAP register has a different layout and some bits that we
         need to preserve, so use a read/modify/write when making
         changes to the IMAP register in generic code.
      
      3) Flushing the entire IOMMU TLB is best done with a single write
         to a register on this PCI controller, add a iommu->iommu_flushinv
         for this.
      
      Still lacks MSI support, that will come later.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      861fe906
  3. 03 5月, 2007 1 次提交
    • M
      MSI: arch must connect the irq and the msi_desc · 7fe3730d
      Michael Ellerman 提交于
      set_irq_msi() currently connects an irq_desc to an msi_desc. The archs call
      it at some point in their setup routine, and then the generic code sets up the
      reverse mapping from the msi_desc back to the irq.
      
      set_irq_msi() should do both connections, making it the one and only call
      required to connect an irq with it's MSI desc and vice versa.
      
      The arch code MUST call set_irq_msi(), and it must do so only once it's sure
      it's not going to fail the irq allocation.
      
      Given that there's no need for the arch to return the irq anymore, the return
      value from the arch setup routine just becomes 0 for success and anything else
      for failure.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7fe3730d
  4. 26 4月, 2007 10 次提交
  5. 13 4月, 2007 1 次提交
  6. 03 3月, 2007 1 次提交
  7. 27 2月, 2007 1 次提交
  8. 11 2月, 2007 1 次提交
    • D
      [SPARC64]: Add PCI MSI support on Niagara. · 35a17eb6
      David S. Miller 提交于
      This is kind of hokey, we could use the hardware provided facilities
      much better.
      
      MSIs are assosciated with MSI Queues.  MSI Queues generate interrupts
      when any MSI assosciated with it is signalled.  This suggests a
      two-tiered IRQ dispatch scheme:
      
      	MSI Queue interrupt --> queue interrupt handler
      		MSI dispatch --> driver interrupt handler
      
      But we just get one-level under Linux currently.  What I'd like to do
      is possibly stick the IRQ actions into a per-MSI-Queue data structure,
      and dispatch them form there, but the generic IRQ layer doesn't
      provide a way to do that right now.
      
      So, the current kludge is to "ACK" the interrupt by processing the
      MSI Queue data structures and ACK'ing them, then we run the actual
      handler like normal.
      
      We are wasting a lot of useful information, for example the MSI data
      and address are provided with ever MSI, as well as a system tick if
      available.  If we could pass this into the IRQ handler it could help
      with certain things, in particular for PCI-Express error messages.
      
      The MSI entries on sparc64 also tell you exactly which bus/device/fn
      sent the MSI, which would be great for error handling when no
      registered IRQ handler can service the interrupt.
      
      We override the disable/enable IRQ chip methods in sun4v_msi, so we
      have to call {mask,unmask}_msi_irq() directly from there.  This is
      another ugly wart.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      35a17eb6
  9. 02 12月, 2006 1 次提交
  10. 01 7月, 2006 1 次提交
  11. 30 6月, 2006 2 次提交
  12. 28 6月, 2006 1 次提交
  13. 24 6月, 2006 2 次提交
  14. 20 6月, 2006 1 次提交
    • D
      [SPARC64]: Move over to GENERIC_HARDIRQS. · e18e2a00
      David S. Miller 提交于
      This is the long overdue conversion of sparc64 over to
      the generic IRQ layer.
      
      The kernel image is slightly larger, but the BSS is ~60K
      smaller due to the reduced size of struct ino_bucket.
      
      A lot of IRQ implementation details, including ino_bucket,
      were moved out of asm-sparc64/irq.h and are now private to
      arch/sparc64/kernel/irq.c, and most of the code in irq.c
      totally disappeared.
      
      One thing that's different at the moment is IRQ distribution,
      we do it at enable_irq() time.  If the cpu mask is ALL then
      we round-robin using a global rotating cpu counter, else
      we pick the first cpu in the mask to support single cpu
      targetting.  This is similar to what powerpc's XICS IRQ
      support code does.
      
      This works fine on my UP SB1000, and the SMP build goes
      fine and runs on that machine, but lots of testing on
      different setups is needed.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e18e2a00
  15. 18 4月, 2006 1 次提交
  16. 22 3月, 2006 1 次提交
  17. 20 3月, 2006 1 次提交
  18. 09 9月, 2005 2 次提交
    • D
      [PATCH] Make sparc64 use setup-res.c · 085ae41f
      David S. Miller 提交于
      There were three changes necessary in order to allow
      sparc64 to use setup-res.c:
      
      1) Sparc64 roots the PCI I/O and MEM address space using
         parent resources contained in the PCI controller structure.
         I'm actually surprised no other platforms do this, especially
         ones like Alpha and PPC{,64}.  These resources get linked into the
         iomem/ioport tree when PCI controllers are probed.
      
         So the hierarchy looks like this:
      
         iomem --|
      	   PCI controller 1 MEM space --|
      				        device 1
      					device 2
      					etc.
      	   PCI controller 2 MEM space --|
      				        ...
         ioport --|
                  PCI controller 1 IO space --|
      					...
                  PCI controller 2 IO space --|
      					...
      
         You get the idea.  The drivers/pci/setup-res.c code allocates
         using plain iomem_space and ioport_space as the root, so that
         wouldn't work with the above setup.
      
         So I added a pcibios_select_root() that is used to handle this.
         It uses the PCI controller struct's io_space and mem_space on
         sparc64, and io{port,mem}_resource on every other platform to
         keep current behavior.
      
      2) quirk_io_region() is buggy.  It takes in raw BUS view addresses
         and tries to use them as a PCI resource.
      
         pci_claim_resource() expects the resource to be fully formed when
         it gets called.  The sparc64 implementation would do the translation
         but that's absolutely wrong, because if the same resource gets
         released then re-claimed we'll adjust things twice.
      
         So I fixed up quirk_io_region() to do the proper pcibios_bus_to_resource()
         conversion before passing it on to pci_claim_resource().
      
      3) I was mistakedly __init'ing the function methods the PCI controller
         drivers provide on sparc64 to implement some parts of these
         routines.  This was, of course, easy to fix.
      
      So we end up with the following, and that nasty SPARC64 makefile
      ifdef in drivers/pci/Makefile is finally zapped.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      085ae41f
    • J
      [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it · 064b53db
      John W. Linville 提交于
      Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
      (including BARs) when transitioning from D3hot->D0.  This leaves such
      a device in an inaccessible state.  The patch below causes the BARs
      to be restored when enabling such a device, so that its driver will
      be able to access it.
      
      The patch also adds pci_restore_bars as a new global symbol, and adds a
      correpsonding EXPORT_SYMBOL_GPL for that.
      
      Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
      (re)boot.  Most drivers call pci_enable_device very early, so devices
      left in D3hot that lose configuration during the D3hot->D0 transition
      will be inaccessible to their drivers.
      
      Drivers could be modified to account for this, but it would
      be difficult to know which drivers need modification.  This is
      especially true since often many devices are covered by the same
      driver.  It likely would be necessary to replicate code across dozens
      of drivers.
      
      The patch below should trigger only when transitioning from D3hot->D0
      (or at boot), and only for devices that have the "no soft reset" bit
      cleared in the PM control register.  I believe it is safe to include
      this patch as part of the PCI infrastructure.
      
      The cleanest implementation of pci_restore_bars was to call
      pci_update_resource.  Unfortunately, that does not currently exist
      for the sparc64 architecture.  The patch below includes a null
      implemenation of pci_update_resource for sparc64.
      
      Some have expressed interest in making general use of the the
      pci_restore_bars function, so that has been exported to GPL licensed
      modules.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      064b53db
  19. 02 9月, 2005 1 次提交
  20. 25 8月, 2005 1 次提交
  21. 09 8月, 2005 1 次提交
  22. 05 8月, 2005 1 次提交
    • J
      [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it · fec59a71
      John W. Linville 提交于
      Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
      (including BARs) when transitioning from D3hot->D0.  This leaves such
      a device in an inaccessible state.  The patch below causes the BARs
      to be restored when enabling such a device, so that its driver will
      be able to access it.
      
      The patch also adds pci_restore_bars as a new global symbol, and adds a
      correpsonding EXPORT_SYMBOL_GPL for that.
      
      Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
      (re)boot.  Most drivers call pci_enable_device very early, so devices
      left in D3hot that lose configuration during the D3hot->D0 transition
      will be inaccessible to their drivers.
      
      Drivers could be modified to account for this, but it would
      be difficult to know which drivers need modification.  This is
      especially true since often many devices are covered by the same
      driver.  It likely would be necessary to replicate code across dozens
      of drivers.
      
      The patch below should trigger only when transitioning from D3hot->D0
      (or at boot), and only for devices that have the "no soft reset" bit
      cleared in the PM control register.  I believe it is safe to include
      this patch as part of the PCI infrastructure.
      
      The cleanest implementation of pci_restore_bars was to call
      pci_update_resource.  Unfortunately, that does not currently exist
      for the sparc64 architecture.  The patch below includes a null
      implemenation of pci_update_resource for sparc64.
      
      Some have expressed interest in making general use of the the
      pci_restore_bars function, so that has been exported to GPL licensed
      modules.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fec59a71
  23. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4