1. 09 3月, 2016 2 次提交
  2. 31 3月, 2015 2 次提交
    • W
      powerpc/powernv: Shift VF resource with an offset · 781a868f
      Wei Yang 提交于
      On PowerNV platform, resource position in M64 BAR implies the PE# the
      resource belongs to. In some cases, adjustment of a resource is necessary
      to locate it to a correct position in M64 BAR .
      
      This patch adds pnv_pci_vf_resource_shift() to shift the 'real' PF IOV BAR
      address according to an offset.
      
      Note:
      
          After doing so, there would be a "hole" in the /proc/iomem when offset
          is a positive value. It looks like the device return some mmio back to
          the system, which actually no one could use it.
      
      [bhelgaas: rework loops, rework overlap check, index resource[]
      conventionally, remove pci_regs.h include, squashed with next patch]
      Signed-off-by: NWei Yang <weiyang@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      781a868f
    • G
      powerpc/pci: Create pci_dn for VFs · a8b2f828
      Gavin Shan 提交于
      pci_dn is the extension of PCI device node and is created from device node.
      Unfortunately, VFs are enabled dynamically by PF's driver and they don't
      have corresponding device nodes and pci_dn, which is required to access
      VFs' config spaces.
      
      The patch creates pci_dn for VFs in pcibios_sriov_enable() on their PF,
      and removes pci_dn for VFs in pcibios_sriov_disable() on their PF. When
      VF's pci_dn is created, it's put to the child list of the pci_dn of PF's
      upstream bridge. The pci_dn is linked to pci_dev during early fixup time
      to setup the fast path.
      
      [bhelgaas: add ifdef around add_one_dev_pci_info(), use dev_printk()]
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a8b2f828
  3. 24 3月, 2015 3 次提交
    • G
      powerpc/eeh: Create eeh_dev from pci_dn instead of device_node · e8e9b34c
      Gavin Shan 提交于
      The patch adds function traverse_pci_dn(), which is similar to
      traverse_pci_devices() except it takes pci_dn, not device_node
      as parameter. The pci_dev.c has been reworked to create eeh_dev
      from pci_dn, instead of device_node.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e8e9b34c
    • G
      powerpc/pci: Trace more information from pci_dn · c035ff1d
      Gavin Shan 提交于
      Originally, EEH probes on device_node or pci_dev and populates the
      corresponding eeh_dev. In the subsequent patches, EEH will probes
      on pci_dn and populates the corresponding eeh_dev. So we have to
      cache some information in pci_dn, either from device_node or SRIOV
      PF's enablement platform hook, to populate the eeh_dev properly.
      
      The motivation to probe pci_dn, instead of device node or pci_dev,
      to populate eeh_dev is SRIOV VFs are dynamically created and we
      don't have the corresponding device nodes for them.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c035ff1d
    • G
      powerpc/pci: Refactor pci_dn · cca87d30
      Gavin Shan 提交于
      Currently, the PCI config accessors are implemented based on device node.
      Unfortunately, SRIOV VFs won't have the corresponding device nodes. pci_dn
      will be used in replacement with device node for SRIOV VFs. So we have to
      use pci_dn in PCI config accessors.
      
      The patch refactors pci_dn in following aspects to make it ready to be used
      in PCI config accessors as we do in subsequent patch:
      
         * pci_dn is organized as a hierarchy tree.  PCI device's pci_dn is
           put to the child list of pci_dn of its upstream bridge or PHB. VF's
           pci_dn will be put to the child list of pci_dn of PF's bridge.
      
         * For one particular PCI device (VF or not), its pci_dn can be
           found from pdev->dev.archdata.pci_data, PCI_DN(devnode), or
           parent's list.  The fast path (fetching pci_dn through PCI device
           instance) is populated during early fixup time.
      
      [bhelgaas: changelog]
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cca87d30
  4. 23 1月, 2015 1 次提交
  5. 14 8月, 2013 1 次提交
  6. 24 5月, 2013 1 次提交
  7. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  8. 25 11月, 2011 1 次提交
    • B
      powerpc/powernv: PCI support for p7IOC under OPAL v2 · 184cd4a3
      Benjamin Herrenschmidt 提交于
      This adds support for p7IOC (and possibly other IODA v1 IO Hubs)
      using OPAL v2 interfaces.
      
      We completely take over resource assignment and assign them using an
      algorithm that hands out device BARs in a way that makes them fit in
      individual segments of the M32 window of the bridge, which enables us
      to assign individual PEs to devices and functions.
      
      The current implementation gives out a PE per functions on PCIe, and a
      PE for the entire bridge for PCIe to PCI-X bridges.
      
      This can be adjusted / fine tuned later.
      
      We also setup DMA resources (32-bit only for now) and MSIs (both 32-bit
      and 64-bit MSI are supported).
      
      The DMA allocation tries to divide the available 256M segments of the
      32-bit DMA address space "fairly" among PEs. This is done using a
      "weight" heuristic which assigns less value to things like OHCI USB
      controllers than, for example SCSI RAID controllers. This algorithm
      will probably want some fine tuning for specific devices or device
      types.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      184cd4a3
  9. 01 11月, 2011 1 次提交
  10. 08 6月, 2011 1 次提交
    • B
      pci/of: Match PCI devices to OF nodes dynamically · 98d9f30c
      Benjamin Herrenschmidt 提交于
      powerpc has two different ways of matching PCI devices to their
      corresponding OF node (if any) for historical reasons. The ppc64 one
      does a scan looking for matching bus/dev/fn, while the ppc32 one does a
      scan looking only for matching dev/fn on each level in order to be
      agnostic to busses being renumbered (which Linux does on some
      platforms).
      
      This removes both and instead moves the matching code to the PCI core
      itself. It's the most logical place to do it: when a pci_dev is created,
      we know the parent and thus can do a single level scan for the matching
      device_node (if any).
      
      The benefit is that all archs now get the matching for free. There's one
      hook the arch might want to provide to match a PHB bus to its device
      node. A default weak implementation is provided that looks for the
      parent device device node, but it's not entirely reliable on powerpc for
      various reasons so powerpc provides its own.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      98d9f30c
  11. 19 5月, 2011 1 次提交
  12. 21 3月, 2011 1 次提交
  13. 05 2月, 2011 1 次提交
    • G
      powerpc/pci: Make both ppc32 and ppc64 use sysdata for pci_controller · b5d937de
      Grant Likely 提交于
      Currently, ppc32 uses sysdata for the pci_controller pointer, and
      ppc64 uses it to hold the device_node pointer.  This patch moves the
      of_node pointer into (struct pci_bus*)->dev.of_node and
      (struct pci_dev*)->dev.of_node so that sysdata can be converted to always
      use the pci_controller pointer instead.  It also fixes up the
      allocating of pci devices so that the of_node pointer gets assigned
      consistently and increments the ref count.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b5d937de
  14. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  15. 21 5月, 2009 1 次提交
  16. 17 1月, 2008 1 次提交
  17. 11 12月, 2007 1 次提交
  18. 19 9月, 2007 1 次提交
    • S
      [POWERPC] Fix section mismatch in PCI code · 7b2c3c5b
      Stephen Rothwell 提交于
      Create a helper function (alloc_maybe_bootmem) that is marked __init_refok
      to limit the chances of mistakenly referring to other __init routines.
      
      WARNING: vmlinux.o(.text+0x2a9c4): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.update_dn_pci_info' and '.pci_dn_reconfig_notifier')
      WARNING: vmlinux.o(.text+0x36430): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.mpic_msi_init_allocator' and '.find_ht_magic_addr')
      WARNING: vmlinux.o(.text+0x5e804): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config')
      WARNING: vmlinux.o(.text+0x5e8e8): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config')
      WARNING: vmlinux.o(.text+0x5e968): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config')
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7b2c3c5b
  19. 13 4月, 2007 1 次提交
  20. 31 7月, 2006 1 次提交
  21. 24 5月, 2006 1 次提交
  22. 14 11月, 2005 1 次提交
  23. 10 11月, 2005 1 次提交
    • L
      [PATCH] ppc64: bugfix: crash on PCI hotplug · 18126f35
      Linas Vepstas 提交于
      09-hotplug-bugfix.patch
      
      In the current 2.6.14-rc2-git6 kernel, performing a Dynamic LPAR Add
      of a hotplug slot will crash the system, with the following (abbreviated)
      stack trace:
      
      cpu 0x3: Vector: 700 (Program Check) at [c000000053dff7f0]
          pc: c0000000004f5974: .__alloc_bootmem+0x0/0xb0
          lr: c0000000000258a0: .update_dn_pci_info+0x108/0x118
              c0000000000257c8 .update_dn_pci_info+0x30/0x118 (unreliable)
              c0000000000258fc .pci_dn_reconfig_notifier+0x4c/0x64
              c000000000060754 .notifier_call_chain+0x68/0x9c
      
      The root cause was that __init __alloc_bootmem() was called long after
      boot had finished, resulting in a crash because this routine is undefined
      after boot time.  The patch below fixes this crash, and adds some docs to
      clarify the code.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      18126f35
  24. 03 11月, 2005 1 次提交
  25. 28 9月, 2005 1 次提交
  26. 09 9月, 2005 1 次提交
    • P
      [PATCH] Separate pci bits out of struct device_node · 1635317f
      Paul Mackerras 提交于
      This patch pulls the PCI-related junk out of struct device_node and
      puts it in a separate structure, struct pci_dn.  The device_node now
      just has a void * pointer in it, which points to a struct pci_dn for
      nodes that represent PCI devices.  It could potentially be used in
      future for device-specific data for other sorts of devices, such as
      virtual I/O devices.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1635317f
  27. 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