1. 07 1月, 2012 1 次提交
  2. 22 5月, 2011 1 次提交
  3. 18 12月, 2010 2 次提交
  4. 13 11月, 2010 1 次提交
    • B
      PCI: fix pci_bus_alloc_resource() hang, prefer positive decode · 82e3e767
      Bjorn Helgaas 提交于
      When a PCI bus has two resources with the same start/end, e.g.,
      
          pci_bus 0000:04: resource 2 [mem 0xd0000000-0xd7ffffff pref]
          pci_bus 0000:04: resource 7 [mem 0xd0000000-0xd7ffffff]
      
      the previous pci_bus_find_resource_prev() implementation would alternate
      between them forever:
      
          pci_bus_find_resource_prev(... [mem 0xd0000000-0xd7ffffff pref])
              returns [mem 0xd0000000-0xd7ffffff]
          pci_bus_find_resource_prev(... [mem 0xd0000000-0xd7ffffff])
              returns [mem 0xd0000000-0xd7ffffff pref]
          pci_bus_find_resource_prev(... [mem 0xd0000000-0xd7ffffff pref])
              returns [mem 0xd0000000-0xd7ffffff]
          ...
      
      This happened because there was no ordering between two resources with the
      same start and end.  A resource that had the same start and end as the
      cursor, but was not itself the cursor, was considered to be before the
      cursor.
      
      This patch fixes the hang by making a fixed ordering between any two
      resources.
      
      In addition, it tries to allocate from positively decoded regions before
      using any subtractively decoded resources.  This means we will use a
      positive decode region before a subtractive decode one, even if it means
      using a smaller address.
      
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=22062Reported-by: NBorislav Petkov <bp@amd64.org>
      Tested-by: NBorislav Petkov <bp@amd64.org>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      82e3e767
  5. 27 10月, 2010 1 次提交
    • B
      PCI: allocate bus resources from the top down · b126b470
      Bjorn Helgaas 提交于
      Allocate space from the highest-address PCI bus resource first, then work
      downward.
      
      Previously, we looked for space in PCI host bridge windows in the order
      we discovered the windows.  For example, given the following windows
      (discovered via an ACPI _CRS method):
      
          pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
          pci_root PNP0A03:00: host bridge window [mem 0x000c0000-0x000effff]
          pci_root PNP0A03:00: host bridge window [mem 0x000f0000-0x000fffff]
          pci_root PNP0A03:00: host bridge window [mem 0xbff00000-0xf7ffffff]
          pci_root PNP0A03:00: host bridge window [mem 0xff980000-0xff980fff]
          pci_root PNP0A03:00: host bridge window [mem 0xff97c000-0xff97ffff]
          pci_root PNP0A03:00: host bridge window [mem 0xfed20000-0xfed9ffff]
      
      we attempted to allocate from [mem 0x000a0000-0x000bffff] first, then
      [mem 0x000c0000-0x000effff], and so on.
      
      With this patch, we allocate from [mem 0xff980000-0xff980fff] first, then
      [mem 0xff97c000-0xff97ffff], [mem 0xfed20000-0xfed9ffff], etc.
      
      Allocating top-down follows Windows practice, so we're less likely to
      trip over BIOS defects in the _CRS description.
      
      On the machine above (a Dell T3500), the [mem 0xbff00000-0xbfffffff] region
      doesn't actually work and is likely a BIOS defect.  The symptom is that we
      move the AHCI controller to 0xbff00000, which leads to "Boot has failed,
      sleeping forever," a BUG in ahci_stop_engine(), or some other boot failure.
      
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=16228#c43
      Reference: https://bugzilla.redhat.com/show_bug.cgi?id=620313
      Reference: https://bugzilla.redhat.com/show_bug.cgi?id=629933Reported-by: NBrian Bloniarz <phunge0@hotmail.com>
      Reported-and-tested-by: NStefan Becker <chemobejk@gmail.com>
      Reported-by: NDenys Vlasenko <dvlasenk@redhat.com>
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b126b470
  6. 18 10月, 2010 1 次提交
  7. 31 7月, 2010 2 次提交
  8. 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
  9. 08 3月, 2010 1 次提交
    • G
      Driver core: create lock/unlock functions for struct device · 8e9394ce
      Greg Kroah-Hartman 提交于
      In the future, we are going to be changing the lock type for struct
      device (once we get the lockdep infrastructure properly worked out)  To
      make that changeover easier, and to possibly burry the lock in a
      different part of struct device, let's create some functions to lock and
      unlock a device so that no out-of-core code needs to be changed in the
      future.
      
      This patch creates the device_lock/unlock/trylock() functions, and
      converts all in-tree users to them.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Magnus Damm <damm@igel.co.jp>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Alex Chiang <achiang@hp.com>
      Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andrew Patterson <andrew.patterson@hp.com>
      Cc: Yu Zhao <yu.zhao@intel.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Wolfram Sang <w.sang@pengutronix.de>
      Cc: CHENG Renquan <rqcheng@smu.edu.sg>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      8e9394ce
  10. 24 2月, 2010 2 次提交
    • B
      PCI: augment bus resource table with a list · 2fe2abf8
      Bjorn Helgaas 提交于
      Previously we used a table of size PCI_BUS_NUM_RESOURCES (16) for resources
      forwarded to a bus by its upstream bridge.  We've increased this size
      several times when the table overflowed.
      
      But there's no good limit on the number of resources because host bridges
      and subtractive decode bridges can forward any number of ranges to their
      secondary buses.
      
      This patch reduces the table to only PCI_BRIDGE_RESOURCE_NUM (4) entries,
      which corresponds to the number of windows a PCI-to-PCI (3) or CardBus (4)
      bridge can positively decode.  Any additional resources, e.g., PCI host
      bridge windows or subtractively-decoded regions, are kept in a list.
      
      I'd prefer a single list rather than this split table/list approach, but
      that requires simultaneous changes to every architecture.  This approach
      only requires immediate changes where we set up (a) host bridges with more
      than four windows and (b) subtractive-decode P2P bridges, and we can
      incrementally change other architectures to use the list.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      2fe2abf8
    • B
      PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs · 89a74ecc
      Bjorn Helgaas 提交于
      No functional change; this converts loops that iterate from 0 to
      PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the
      pci_bus_for_each_resource() iterator instead.
      
      This doesn't change the way resources are stored; it merely removes
      dependencies on the fact that they're in a table.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      89a74ecc
  11. 23 2月, 2010 2 次提交
  12. 17 6月, 2009 1 次提交
  13. 12 6月, 2009 1 次提交
  14. 07 4月, 2009 1 次提交
    • 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
  15. 21 3月, 2009 1 次提交
  16. 20 3月, 2009 1 次提交
  17. 08 1月, 2009 3 次提交
  18. 21 10月, 2008 1 次提交
  19. 21 4月, 2008 2 次提交
  20. 14 3月, 2008 1 次提交
    • G
      PCI: fix issue with busses registering multiple times in sysfs · cc74d96f
      Greg Kroah-Hartman 提交于
      PCI busses can be registered multiple times, so we need to detect if we
      have registered our bus structure in sysfs already.  If so, don't do it
      again.
      
      Thanks to Guennadi Liakhovetski <g.liakhovetski@gmx.de> for reporting
      the problem, and to Linus for poking me to get me to believe that it was
      a real problem.
      
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cc74d96f
  21. 05 3月, 2008 1 次提交
  22. 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
    • A
      PCI: drivers/pci/: remove unused exports · eb003ec2
      Adrian Bunk 提交于
      This patch removes the following unused exports:
      - remove the following unused EXPORT_SYMBOL's:
       - pci-acpi.c: pci_osc_support_set
       - proc.c: pci_proc_detach_bus
      - remove the following unused EXPORT_SYMBOL_GPL's:
        - bus.c: pci_walk_bus
        - probe.c: pci_create_bus
        - setup-res.c: pci_claim_resource
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb003ec2
  23. 03 5月, 2007 1 次提交
    • S
      pci: do not mark exported functions as __devinit · 96bde06a
      Sam Ravnborg 提交于
      Functions marked __devinit will be removed after kernel init.  But being
      exported they are potentially called by a module much later.
      
      So the safer choice seems to be to keep the function even in the non
      CONFIG_HOTPLUG case.
      
      This silence the follwoing section mismatch warnings:
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus'
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      96bde06a
  24. 27 9月, 2006 1 次提交
  25. 28 6月, 2006 1 次提交
  26. 22 6月, 2006 1 次提交
  27. 09 9月, 2005 2 次提交
  28. 03 8月, 2005 1 次提交
    • L
      pci: make bus resource start address override minimum IO address · 688d1918
      Linus Torvalds 提交于
      The reason we have PCIBIOS_MIN_IO and PCIBIOS_MIN_CARDBUS_IO is because
      we want to protect badly documented motherboard PCI resources and thus
      don't want to allocate new resources in low IO/MEM space.
      
      However, if we have already discovered a PCI bridge with a specified
      resource base, that should override that decision.
      
      This change will allow us to move the "careful" region upwards without
      resulting in problems allocating resources in low mappings.  This was
      brought on by us having allocated a bus resource at 0x1000, conflicting
      with a undocumented VAIO Sony PI resources.
      688d1918
  29. 28 6月, 2005 1 次提交
  30. 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