1. 08 3月, 2010 2 次提交
  2. 05 1月, 2010 1 次提交
  3. 05 12月, 2009 1 次提交
  4. 07 11月, 2009 1 次提交
    • A
      PCI: derive nearby CPUs from device's instead of bus' NUMA information · e0cd5160
      Andreas Herrmann 提交于
      In case of AMD CPU northbridge functions this NUMA information might
      differ.  Here is an example from a 4-socket system.
      
      Currently Linux shows
      
        root@hagen:/sys/devices/pci0000:00/0000:00:1a.4# cat numa_node
        0
        root@hagen:/sys/devices/pci0000:00/0000:00:1a.4# cat local_cpu*
        0-3
        00000000,0000000f
      
      which is not correct for northbridge functions as the local CPUs
      are those of the same socket.
      
      With this patch and a quirk for AMD CPU NB functions Linux can
      do better and correctly show
      
        root@hagen:/sys/devices/pci0000:00/0000:00:1a.4# cat numa_node
        2
        root@hagen:/sys/devices/pci0000:00/0000:00:1a.4# cat local_cpu*
        8-11
        00000000,00000f00
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      e0cd5160
  5. 10 9月, 2009 1 次提交
  6. 23 4月, 2009 1 次提交
  7. 07 4月, 2009 2 次提交
    • A
      PCI: allow PCI core hotplug to remove PCI root bus · c2ac7cdc
      Alex Chiang 提交于
      There is no reason to prevent removal of root bus devices. A subsequent
      rescan will find them just fine.
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      c2ac7cdc
    • Y
      PCI: Setup disabled bridges even if buses are added · 296ccb08
      Yuji Shimada 提交于
      This patch sets up disabled bridges even if buses have already been
      added.
      
      pci_assign_unassigned_resources is called after buses are added.
      pci_assign_unassigned_resources calls pci_bus_assign_resources.
      pci_bus_assign_resources calls pci_setup_bridge to configure BARs of
      bridges.
      
      Currently pci_setup_bridge returns immediately if the bus have already
      been added. So pci_assign_unassigned_resources can't configure BARs of
      bridges that were added in a disabled state; this patch fixes the issue.
      
      On logical hot-add, we need to prevent the kernel from re-initializing
      bridges that have already been initialized. To achieve this,
      pci_setup_bridge returns immediately if the bridge have already been
      enabled.
      
      We don't need to check whether the specified bus is a root bus or not.
      pci_setup_bridge is not called on a root bus, because a root bus does
      not have a bridge.
      
      The patch adds a new helper function, pci_is_enabled. I made the
      function name similar to pci_is_managed. The codes which use
      enable_cnt directly are changed to use pci_is_enabled.
      Acked-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NYuji Shimada <shimada-yxb@necst.nec.co.jp>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      296ccb08
  8. 21 3月, 2009 4 次提交
  9. 20 3月, 2009 1 次提交
    • I
      PCI/alpha: pci sysfs resources · 10a0ef39
      Ivan Kokshaysky 提交于
      This closes http://bugzilla.kernel.org/show_bug.cgi?id=10893
      which is a showstopper for X development on alpha.
      
      The generic HAVE_PCI_MMAP code (drivers/pci-sysfs.c) is not
      very useful since we have to deal with three different types
      of MMIO address spaces: sparse and dense mappings for old
      ev4/ev5 machines and "normal" 1:1 MMIO space (bwx) for ev56 and
      later.
      Also "write combine" mappings are meaningless on alpha - roughly
      speaking, alpha does write combining, IO reordering and other
      optimizations by default, unless user splits IO accesses
      with memory barriers.
      
      I think the cleanest way to deal with resource files on alpha
      is to convert the default no-op pci_create_resource_files() and
      pci_remove_resource_files() for !HAVE_PCI_MMAP case into __weak
      functions and override them with alpha specific ones.
      
      Another alpha hook is needed for "legacy_" resource files
      to handle sparse addressing (pci_adjust_legacy_attr).
      
      With the "standard" resourceN files on ev56/ev6 libpciaccess
      works "out of the box". Handling of resourceN_sparse/resourceN_dense
      files on older machines obviously requires some userland work.
      
      Sparse/dense stuff has been tested on sx164 (pca56/pyxis, normally
      uses bwx IO) with the kernel hacked into "cia compatible" mode.
      Signed-off-by: NIvan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      10a0ef39
  10. 05 2月, 2009 1 次提交
  11. 08 1月, 2009 5 次提交
  12. 04 1月, 2009 1 次提交
  13. 13 12月, 2008 1 次提交
    • R
      cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and... · 29c0177e
      Rusty Russell 提交于
      cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers.
      
      Impact: change calling convention of existing cpumask APIs
      
      Most cpumask functions started with cpus_: these have been replaced by
      cpumask_ ones which take struct cpumask pointers as expected.
      
      These four functions don't have good replacement names; fortunately
      they're rarely used, so we just change them over.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: paulus@samba.org
      Cc: mingo@redhat.com
      Cc: tony.luck@intel.com
      Cc: ralf@linux-mips.org
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: cl@linux-foundation.org
      Cc: srostedt@redhat.com
      29c0177e
  14. 04 11月, 2008 1 次提交
  15. 21 10月, 2008 3 次提交
  16. 03 10月, 2008 1 次提交
    • L
      Check mapped ranges on sysfs resource files · b5ff7df3
      Linus Torvalds 提交于
      This is loosely based on a patch by Jesse Barnes to check the user-space
      PCI mappings though the sysfs interfaces.  Quoting Jesse's original
      explanation:
      
        It's fairly common for applications to map PCI resources through sysfs.
        However, with the current implementation, it's possible for an application
        to map far more than the range corresponding to the resourceN file it
        opened.  This patch plugs that hole by checking the range at mmap time,
        similar to what is done on platforms like sparc64 in their lower level
        PCI remapping routines.
      
        It was initially put together to help debug the e1000e NVRAM corruption
        problem, since we initially thought an X driver might be walking past the
        end of one of its mappings and clobbering the NVRAM.  It now looks like
        that's not the case, but doing the check is still important for obvious
        reasons.
      
      and this version of the patch differs in that it uses a helper function
      to clarify the code, and does all the checks in pages (instead of bytes)
      in order to avoid overflows when doing "<< PAGE_SHIFT" etc.
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b5ff7df3
  17. 03 7月, 2008 1 次提交
    • B
      PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. · 99cb233d
      Benjamin Li 提交于
      For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
      VPD end tag will hang the device.  This problem was initially
      observed when a vpd entry was created in sysfs
      ('/sys/bus/pci/devices/<id>/vpd').   A read to this sysfs entry
      will dump 32k of data.  Reading a full 32k will cause an access
      beyond the VPD end tag causing the device to hang.  Once the device
      is hung, the bnx2 driver will not be able to reset the device.
      We believe that it is legal to read beyond the end tag and
      therefore the solution is to limit the read/write length.
      
      A majority of this patch is from Matthew Wilcox who gave code for
      reworking the PCI vpd size information.  A PCI quirk added for the
      Broadcom NIC's to limit the read/write's.
      Signed-off-by: NBenjamin Li <benli@broadcom.com>
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      99cb233d
  18. 02 7月, 2008 1 次提交
  19. 13 6月, 2008 1 次提交
  20. 12 6月, 2008 1 次提交
  21. 13 5月, 2008 1 次提交
  22. 21 4月, 2008 2 次提交
    • B
      PCI: Expose PCI VPD through sysfs · 94e61088
      Ben Hutchings 提交于
      Vital Product Data (VPD) may be exposed by PCI devices in several
      ways.  It is generally unsafe to read this information through the
      existing interfaces to user-land because of stateful interfaces.
      
      This adds:
      - abstract operations for VPD access (struct pci_vpd_ops)
      - VPD state information in struct pci_dev (struct pci_vpd)
      - an implementation of the VPD access method specified in PCI 2.2
        (in access.c)
      - a 'vpd' binary file in sysfs directories for PCI devices with VPD
        operations defined
      
      It adds a probe for PCI 2.2 VPD in pci_scan_device() and release of
      VPD state in pci_release_dev().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      94e61088
    • S
      PCI: add PCI Express ASPM support · 7d715a6c
      Shaohua Li 提交于
      PCI Express ASPM defines a protocol for PCI Express components in the D0
      state to reduce Link power by placing their Links into a low power state
      and instructing the other end of the Link to do likewise. This
      capability allows hardware-autonomous, dynamic Link power reduction
      beyond what is achievable by software-only controlled power management.
      However, The device should be configured by software appropriately.
      Enabling ASPM will save power, but will introduce device latency.
      
      This patch adds ASPM support in Linux. It introduces a global policy for
      ASPM, a sysfs file /sys/module/pcie_aspm/parameters/policy can control
      it. The interface can be used as a boot option too. Currently we have
      below setting:
              -default, BIOS default setting
              -powersave, highest power saving mode, enable all available ASPM
      state and clock power management
              -performance, highest performance, disable ASPM and clock power
      management
      By default, the 'default' policy is used currently.
      
      In my test, power difference between powersave mode and performance mode
      is about 1.3w in a system with 3 PCIE links.
      
      Note: some devices might not work well with aspm, either because chipset
      issue or device issue. The patch provide API (pci_disable_link_state),
      driver can disable ASPM for specific device.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7d715a6c
  23. 20 4月, 2008 1 次提交
  24. 03 2月, 2008 1 次提交
  25. 02 2月, 2008 2 次提交
    • G
      PCI: make pci_bus a struct device · fd7d1ced
      Greg Kroah-Hartman 提交于
      This moves the pci_bus class device to be a real struct device and at
      the same time, place it in the device tree in the correct location.
      
      Note, the old "bridge" symlink is now gone, but this was a non-standard
      link and no userspace program used it.  If you need to determine the
      device that the bus is on, follow the standard device symlink, or walk
      up the device tree.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd7d1ced
    • S
      PCI: PCIE ASPM support · 6c723d5b
      Shaohua Li 提交于
      PCI Express ASPM defines a protocol for PCI Express components in the D0
      state to reduce Link power by placing their Links into a low power state
      and instructing the other end of the Link to do likewise. This
      capability allows hardware-autonomous, dynamic Link power reduction
      beyond what is achievable by software-only controlled power management.
      However, The device should be configured by software appropriately.
      Enabling ASPM will save power, but will introduce device latency.
      
      This patch adds ASPM support in Linux. It introduces a global policy for
      ASPM, a sysfs file /sys/module/pcie_aspm/parameters/policy can control
      it. The interface can be used as a boot option too. Currently we have
      below setting:
              -default, BIOS default setting
              -powersave, highest power saving mode, enable all available ASPM
      state
      and clock power management
              -performance, highest performance, disable ASPM and clock power
      management
      By default, the 'default' policy is used currently.
      
      In my test, power difference between powersave mode and performance mode
      is about 1.3w in a system with 3 PCIE links.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6c723d5b
  26. 29 11月, 2007 1 次提交
  27. 17 7月, 2007 1 次提交
    • A
      Remove capability.h from mm.h · aa0ac365
      Alexey Dobriyan 提交于
      I forgot to remove capability.h from mm.h while removing sched.h!  This
      patch remedies that, because the only inline function which was using
      CAP_something was made out of line.
      
      Cross-compile tested without regressions on:
      
      	all powerpc defconfigs
      	all mips defconfigs
      	all m68k defconfigs
      	all arm defconfigs
      	all ia64 defconfigs
      
      	alpha alpha-allnoconfig alpha-defconfig alpha-up
      	arm
      	i386 i386-allnoconfig i386-defconfig i386-up
      	ia64 ia64-allnoconfig ia64-defconfig ia64-up
      	m68k
      	mips
      	parisc parisc-allnoconfig parisc-defconfig parisc-up
      	powerpc powerpc-up
      	s390 s390-allnoconfig s390-defconfig s390-up
      	sparc sparc-allnoconfig sparc-defconfig sparc-up
      	sparc64 sparc64-allnoconfig sparc64-defconfig sparc64-up
      	um-x86_64
      	x86_64 x86_64-allnoconfig x86_64-defconfig x86_64-up
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aa0ac365