1. 23 7月, 2007 2 次提交
  2. 29 6月, 2007 7 次提交
  3. 14 6月, 2007 3 次提交
    • B
      [POWERPC] Rewrite IO allocation & mapping on powerpc64 · 3d5134ee
      Benjamin Herrenschmidt 提交于
      This rewrites pretty much from scratch the handling of MMIO and PIO
      space allocations on powerpc64.  The main goals are:
      
       - Get rid of imalloc and use more common code where possible
       - Simplify the current mess so that PIO space is allocated and
         mapped in a single place for PCI bridges
       - Handle allocation constraints of PIO for all bridges including
         hot plugged ones within the 2GB space reserved for IO ports,
         so that devices on hotplugged busses will now work with drivers
         that assume IO ports fit in an int.
       - Cleanup and separate tracking of the ISA space in the reserved
         low 64K of IO space. No ISA -> Nothing mapped there.
      
      I booted a cell blade with IDE on PIO and MMIO and a dual G5 so
      far, that's it :-)
      
      With this patch, all allocations are done using the code in
      mm/vmalloc.c, though we use the low level __get_vm_area with
      explicit start/stop constraints in order to manage separate
      areas for vmalloc/vmap, ioremap, and PCI IOs.
      
      This greatly simplifies a lot of things, as you can see in the
      diffstat of that patch :-)
      
      A new pair of functions pcibios_map/unmap_io_space() now replace
      all of the previous code that used to manipulate PCI IOs space.
      The allocation is done at mapping time, which is now called from
      scan_phb's, just before the devices are probed (instead of after,
      which is by itself a bug fix). The only other caller is the PCI
      hotplug code for hot adding PCI-PCI bridges (slots).
      
      imalloc is gone, as is the "sub-allocation" thing, but I do beleive
      that hotplug should still work in the sense that the space allocation
      is always done by the PHB, but if you unmap a child bus of this PHB
      (which seems to be possible), then the code should properly tear
      down all the HPTE mappings for that area of the PHB allocated IO space.
      
      I now always reserve the first 64K of IO space for the bridge with
      the ISA bus on it. I have moved the code for tracking ISA in a separate
      file which should also make it smarter if we ever are capable of
      hot unplugging or re-plugging an ISA bridge.
      
      This should have a side effect on platforms like powermac where VGA IOs
      will no longer work. This is done on purpose though as they would have
      worked semi-randomly before. The idea at this point is to isolate drivers
      that might need to access those and fix them by providing a proper
      function to obtain an offset to the legacy IOs of a given bus.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3d5134ee
    • L
      [POWERPC] Show EEH per-device false positives · 858955bd
      Linas Vepstas 提交于
      Track and report the number of times we read an all-1s value (0xff,
      0xffff or 0xffffffff) from each device which is valid data, not
      indicating EEH isolation.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
       arch/powerpc/platforms/pseries/eeh.c       |    5 +++++
       arch/powerpc/platforms/pseries/eeh_sysfs.c |    3 +++
       include/asm-powerpc/pci-bridge.h           |    1 +
       3 files changed, 9 insertions(+)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      858955bd
    • L
      [POWERPC] pseries: asm/pci-bridge.h CONFIG_ minor cleanup · c2e221e8
      Linas Vepstas 提交于
      Use the correct CONFIG_ option to mark off the EEH bits.
      Move the EEH bits to the bottom of the struct.
      The config_space array is used by EEH only; it does not
      need to be part of the struct for non-pseries machines.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
      Revised patch, per commments from Michael Ellerman.
      
       include/asm-powerpc/pci-bridge.h |   16 +++++++++-------
       1 file changed, 9 insertions(+), 7 deletions(-)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c2e221e8
  4. 24 1月, 2007 1 次提交
  5. 08 12月, 2006 1 次提交
    • B
      [POWERPC] Fix mmap of PCI resource with hack for X · 396a1a58
      Benjamin Herrenschmidt 提交于
      The powerpc version of pci_resource_to_user() and associated hooks
      used by /proc/bus/pci and /sys/bus/pci mmap have been broken for some
      time on machines that don't have a 1:1 mapping of devices (basically
      on non-PowerMacs) and have PCI devices above 32 bits.
      
      This attempts to fix it as well as possible.
      
      The rule is supposed to be that pci_resource_to_user() always converts
      the resources back into a BAR values since that's what the /proc
      interface was supposed to deal with. However, for X to work on
      platforms where PCI MMIO is not mapped 1:1, it became a habit of
      platforms like powerpc to pass "fixed up" values there since X expects
      to be able to use values from /proc/bus/pci/devices as offsets to mmap
      of /dev/mem...
      
      So we keep that contraption here, causing also /sys/*/resource to
      expose fully absolute MMIO addresses instead of BAR values, which is
      ugly, but should still work as long as those are only used to calculate
      alignment within a page.
      
      X is still broken when built 32 bits on machines where PCI MMIO can be
      above 32-bit space unfortunately.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      396a1a58
  6. 04 12月, 2006 1 次提交
  7. 04 10月, 2006 1 次提交
  8. 15 6月, 2006 1 次提交
  9. 24 5月, 2006 3 次提交
  10. 12 1月, 2006 1 次提交
  11. 10 1月, 2006 2 次提交
  12. 09 1月, 2006 6 次提交
  13. 19 11月, 2005 1 次提交
  14. 16 11月, 2005 1 次提交
    • B
      [PATCH] powerpc: pci_64 fixes & cleanups · b5166cc2
      Benjamin Herrenschmidt 提交于
      I discovered that in some cases (PowerMac for example) we wouldn't
      properly map the PCI IO space on recent kernels. In addition, the code
      for initializing PCI host bridges was scattered all over the place with
      some duplication between platforms.
      
      This patch fixes the problem and does a small cleanup by creating a
      pcibios_alloc_controller() in pci_64.c that is similar to the one in
      pci_32.c (just takes an additional device node argument) that takes care
      of all the grunt allocation and initialisation work. It should work for
      both boot time and dynamically allocated PHBs.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b5166cc2
  15. 10 11月, 2005 1 次提交
  16. 22 10月, 2005 1 次提交
  17. 20 10月, 2005 1 次提交
    • P
      powerpc/ppc/ppc64: Various compile fixes. · 17a6392d
      Paul Mackerras 提交于
      This declares powersave_nap in system.h and makes it an int everywhere,
      fixes typos for the maple platform, fixes a couple of places where
      I missed removing the last two arguments from a message_pass function,
      and makes ppc64 consistent with ppc32 in the type of the
      pci_bridge.cfg_data field.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      17a6392d
  18. 14 10月, 2005 3 次提交
  19. 10 10月, 2005 2 次提交
  20. 28 9月, 2005 1 次提交