1. 21 4月, 2008 2 次提交
  2. 05 3月, 2008 1 次提交
    • S
      PCI: fix section mismatch warning in pci_scan_child_bus · 0ab2b57f
      Sam Ravnborg 提交于
      Fix following warning:
      WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus()
      
      We had plenty of functions that could be annotated __devinit but due to
      the former restriction that exported symbols could not be annotated
      they were not so.  So annotate these function and fix the references
      from the pci/hotplug/* code to silence the resuting warnings.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ab2b57f
  3. 06 2月, 2008 2 次提交
  4. 03 2月, 2008 3 次提交
    • S
      PCI: fix 4x section mismatch warnings · 451124a7
      Sam Ravnborg 提交于
      The following warnings were issued during build of
      drivers/pci with an allyesconfig build:
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xdaf): Section mismatch in reference from the function pci_add_new_bus() to the function .devinit.text:pci_alloc_child_bus()
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x15e2): Section mismatch in reference from the function pci_scan_single_device() to the function .devinit.text:pci_scan_device()
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b0c5): Section mismatch in reference from the function pci_bus_assign_resources() to the function .devinit.text:pci_setup_bridge()
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b32d): Section mismatch in reference from the function pci_bus_size_bridges() to the function .devinit.text:pci_bus_size_cardbus()
      
      Investigating each case closer it looked like all
      referred functions are only used in the init phase
      or during hotplug.
      So to avoid wasting too much memory in the non-hotplug
      case the simpler fix was to allow the fuctions to
      use code/data from the __devinit sections.
      This was done in all four case by adding the __ref
      annotation.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      451124a7
    • S
      PCI: fix section mismatch warnings referring to pci_do_scan_bus · 4105717b
      Sam Ravnborg 提交于
      Fix following warnings:
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xb054): Section mismatch in reference from the function cpci_configure_slot() to the function .devinit.text:pci_do_scan_bus()
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x153ab): Section mismatch in reference from the function shpchp_configure_device() to the function .devinit.text:pci_do_scan_bus()
      WARNING: o-x86_64/drivers/pci/built-in.o(__ksymtab+0xc0): Section mismatch in reference from the variable __ksymtab_pci_do_scan_bus to the function .devinit.text:pci_do_scan_bus()
      
      PCI hotplug were the only user of pci_do_scan_bus()
      so moving this function to a separate file that is build
      only when we enable CONFIG_HOTPLUG_PCI.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4105717b
    • G
      Revert "PCI: PCIE ASPM support" · cc3a1378
      Greg Kroah-Hartman 提交于
      This reverts commit 6c723d5b.
      
      It caused build errors on non-x86 platforms, config file confusion, and
      even some boot errors on some x86-64 boxes.  All around, not quite ready
      for prime-time :(
      
      Cc: Shaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cc3a1378
  5. 02 2月, 2008 6 次提交
  6. 25 1月, 2008 1 次提交
    • G
      driver core: add way to get to bus device klist · b249072e
      Greg Kroah-Hartman 提交于
      This allows an easier way to get to the device klist associated with a
      struct bus_type (you have three to choose from...)  This will make it
      easier to move these fields to be dynamic in a future patch.
      
      The only user of this is the PCI core which horribly abuses this
      interface to rearrange the order of the pci devices.  This should be
      done using the existing bus device walking functions, but that's left
      for future patches.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b249072e
  7. 28 12月, 2007 1 次提交
    • L
      [PCI] Do not enable CRS Software Visibility by default · ad7edfe0
      Linus Torvalds 提交于
      It appears that some PCI-E bridges do the wrong thing in the presense of
      CRS Software Visibility and MMCONFIG.  In particular, it looks like an
      ATI bridge (device ID 7936) will return 0001 in the vendor ID field of
      any bridged devices indefinitely.
      
      Not enabling CRS SV avoids the problem, and as we currently do not
      really make good use of the feature anyway (we just time out rather than
      do any threaded discovery as suggested by the CRS specs), we're better
      off just not enabling it.
      
      This should fix a slew of problem reports with random devices (generally
      graphics adapters or fairly high-performance networking cards, since it
      only affected PCI-E) not getting properly recognized on these AMD systems.
      
      If we really want to use CRS-SV, we may end up eventually needing a
      whitelist of systems where this should be enabled, along with some kind
      of "pcibios_enable_crs()" query to call the system-specific code.
      Suggested-by: NLoic Prylli <loic@myri.com>
      Tested-by: NKai Ruhnau <kai@tragetaschen.dyndns.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ad7edfe0
  8. 18 12月, 2007 1 次提交
  9. 10 12月, 2007 1 次提交
  10. 22 10月, 2007 1 次提交
    • K
      Intel IOMMU: PCI generic helper function · 994a65e2
      Keshavamurthy, Anil S 提交于
      When devices are under a p2p bridge, upstream transactions get replaced by the
      device id of the bridge as it owns the PCIE transaction.  Hence its necessary
      to setup translations on behalf of the bridge as well.  Due to this limitation
      all devices under a p2p share the same domain in a DMAR.
      
      We just cache the type of device, if its a native PCIe device
      or not for later use.
      
      [akpm@linux-foundation.org: BUG_ON -> WARN_ON+recover]
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      994a65e2
  11. 13 10月, 2007 4 次提交
    • G
      PCI: modify PCI bridge control ISA flag for clarity · 11949255
      Gary Hade 提交于
      Modify PCI Bridge Control ISA flag for clarity
      
      This patch changes PCI_BRIDGE_CTL_NO_ISA to PCI_BRIDGE_CTL_ISA
      and modifies it's clarifying comment and locations where used.
      The change reduces the chance of future confusion since it makes
      the set/unset meaning of the bit the same in both the bridge
      control register and bridge_ctl field of the pci_bus struct.
      Signed-off-by: NGary Hade <garyhade@us.ibm.com>
      Acked-by: NLinas Vepstas <linas@austin.ibm.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      11949255
    • G
      PCI: avoid P2P prefetch window for expansion ROMs · fd64cb46
      Gary Hade 提交于
      Avoid creating P2P prefetch window for expansion ROMs
      
      Because of the future possibility that P2P prefetch windows will contain
      address ranges above 4GB some BIOSes are providing space in the P2P
      non-prefetch windows for expansion ROMs.  This is due to expansion ROM
      BAR 32-bit limitation.  When expansion ROM BARs without BIOS assigned
      address(es) are currently found behind a P2P bridge, the kernel attempts
      to create a P2P prefetch window for them even though space for them has
      already been provided in the non-prefetch window.  _CRS on some systems
      with certain resource conservation conscious BIOSes may not provide the
      extra 1MB or more memory resource needed for the expansion ROM motivated
      prefetch window causing resource allocation errors.
      
      This change corrects the problem by removing IORESOURCE_PREFETCH from
      the expansion ROM flags initialization.  It also removes
      IORESOURCE_CACHEABLE which seems inappropriate if only non-cacheable
      memory is available.
      Signed-off-by: NGary Hade <gary.hade@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd64cb46
    • G
      PCI: skip ISA ioresource alignment on some systems · 036fff4c
      Gary Hade 提交于
      Skip ISA ioresource alignment on some systems
      
      To conserve limited PCI i/o resource on some IBM multi-node systems, the
      BIOS allocates (via _CRS) and expects the kernel to use addresses in
      ranges currently excluded by pcibios_align_resource() [i386/pci/i386.c].
      This change allows the kernel to use the currently excluded address
      ranges on the IBM x3800, x3850, and x3950.
      Signed-off-by: NGary Hade <gary.hade@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      036fff4c
    • Y
      PCI: fix IDE legacy mode resources · fd6e7321
      Yoichi Yuasa 提交于
      I got the following error on MIPS Cobalt.
      
      PCI: Unable to reserve I/O region #1:8@f00001f0 for device 0000:00:09.1
      pata_via 0000:00:09.1: failed to request/iomap BARs for port 0 (errno=-16)
      PCI: Unable to reserve I/O region #3:8@f0000170 for device 0000:00:09.1
      pata_via 0000:00:09.1: failed to request/iomap BARs for port 1 (errno=-16)
      pata_via 0000:00:09.1: no available native port
      
      The legacy mode IDE resources set the following order.
      
      pci_setup_device()
          Legacy mode ATA controllers have fixed addresses.
          IDE resources: 0x1F0-0x1F7, 0x3F6, 0x170-0x177, 0x376
          |
          V
      pcibios_fixup_bus()
          MIPS Cobalt PCI bus regions have the -0x10000000 offset from PCI resources.
          pcibios_fixup_bus() fix PCI bus regions.
          0x1F0 - 0x10000000 = 0xF00001F0
          |
          V
      ata_pci_init_one()
          PCI: Unable to reserve I/O region #1:8@f00001f0 for device 0000:00:09.1
      
      In some architectures, PCI bus regions have the offset from PCI resources. 
      For this reason, pci_setup_device() should set PCI bus regions to
      dev->resource[].
      
      [akpm@linux-foundation.org: use struct initialiser]
      Signed-off-by: NYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd6e7321
  12. 11 9月, 2007 1 次提交
    • R
      PCI: remove devinit from pci_read_bridge_bases · e365c3e7
      Ralf Baechle 提交于
      On MIPS with PCI && !HOTPLUG, I'm currently getting the following modpost
      warning:
      
        MODPOST vmlinux.o
      WARNING: vmlinux.o(.text+0x1ce128): Section mismatch: reference to .init.text:pci_read_bridge_bases (between 'pcibios_fixup_bus' and 'pcibios_enable_device')
      
      On MIPS I have the call chains pci_scan_child_bus -> pcibios_fixup_bus ->
      pci_read_bridge_bases.  pci_scan_child_bus can't be __devinit because it
      it is an exported symbol, thus pcibios_fixup_bus and pci_read_bridge_bases
      can't be either.
      
      For some reason I don't see this issue on x86; I blame compiler differences.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e365c3e7
  13. 23 8月, 2007 1 次提交
    • B
      PCI: lets kill the 'PCI hidden behind bridge' message · d55bef51
      Bernhard Kaindl 提交于
      Adrian Bunk wrote:
      > Alois Nešpor wrote
      >> PCI: Bus #0b (-#0e) is hidden behind transparent bridge #0a (-#0b) (try 'pci=assign-busses')
      >> Please report the result to linux-kernel to fix this permanently"
      >>
      >> dmesg:
      >> "Yenta: Raising subordinate bus# of parent bus (#0a) from #0b to #0e"
      >> without pci=assign-busses and nothing with pci=assign-busses.
      > 
      > Bernhard?
      
      Ok, lets kill the message. As Alois Nešpor also saw, that's fixed up by Yenta,
      so PCI does not have to warn about it. PCI could still warn about it if
      is_cardbus is 0 in that instance of pci_scan_bridge(), but so far I have
      not seen a report where this would have been the case so I think we can
      spare the kernel of that check (removes ~300 lines of asm) unless debugging
      is done.
      
      History: The whole check was added in the days before we had the fixup
      for this in Yenta and pci=assign-busses was the only way to get CardBus
      cards detected on many (not all) of the machines which give this warning.
      
      In theory, there could be cases when this warning would be triggered and
      it's not cardbus, then the warning should still apply, but I think this
      should only be the case when working on a completely broken PCI setup,
      but one may have already enabled the debug code in drivers/pci and the
      patched check would then trigger.
      
      I do not sign this off yet because it's completely untested so far, but
      everyone is free to test it (with the #ifdef DEBUG replaced by #if 1 and
      pr_debug( changed to printk(.
      
      We may also dump the whole check (remove everything within the #ifdef from
      the source) if that's perferred.
      
      On Alois Nešpor's machine this would then (only when debugging) this message:
      
      "PCI: Bus #0b (-#0e) is partially hidden behind transparent bridge #0a (-#0b)"
      
      "partially" should be in the message on his machine because #0b of #0b-#0e 
      is reachable behind #0a-#0b, but not #0c-#0e.
      
      But that differentiation is now moot anyway because the fixup in Yenta takes
      care of it as far as I could see so far, which means that unless somebody
      is debugging a totally broken PCI setup, this message is not needed anymore,
      not even for debugging PCI.
      
      
      Ok, here the patch with the following changes:
      
      * Refined to say that the bus is only partially hidden when the parent
        bus numbers are not totally way off (outside of) the child bus range
      * remove the reference to pci=assign-busses and the plea to report it
      
      We could add a pure source code-only comment to keep a reference to
      pci=assign-busses the in case when this is triggered by someone who
      is debugging the cause of this message and looking the way to solve it.
      
      From: Bernhard Kaindl <bk@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d55bef51
  14. 17 7月, 2007 1 次提交
  15. 12 7月, 2007 3 次提交
  16. 03 5月, 2007 4 次提交
    • M
      MSI: Use a list instead of the custom link structure · 4aa9bc95
      Michael Ellerman 提交于
      The msi descriptors are linked together with what looks a lot like
      a linked list, but isn't a struct list_head list. Make it one.
      
      The only complication is that previously we walked a list of irqs, and
      got the descriptor for each with get_irq_msi(). Now we have a list of
      descriptors and need to get the irq out of it, so it needs to be in the
      actual struct msi_desc. We use 0 to indicate no irq is setup.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4aa9bc95
    • M
      PCI: Convert to alloc_pci_dev() · bab41e9b
      Michael Ellerman 提交于
      Convert code that allocs a struct pci_dev to use alloc_pci_dev().
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bab41e9b
    • M
      PCI: Create alloc_pci_dev(), the one true way to create a struct pci_dev · 65891215
      Michael Ellerman 提交于
      There are currently several places in the kernel where we kmalloc()
      a struct pci_dev and start initialising it. It'd be preferable to
      have an allocator so we can ensure the pci_dev is correctly initialised
      in one place.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65891215
    • 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
  17. 24 4月, 2007 1 次提交
  18. 04 3月, 2007 1 次提交
  19. 08 2月, 2007 2 次提交
  20. 31 12月, 2006 1 次提交
  21. 21 12月, 2006 1 次提交
    • R
      PCI legacy resource fix · fb0f2b40
      Ralf Baechle 提交于
      Since commit 368c73d4 the kernel will try
      to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if
      pci_assign_unassigned_resources() is used to do full resource assignment of
      the bus.  This fails because in the PIIX4 these BAR registers have
      implicitly assumed values and read back as zero; it used to work because
      the kernel used to just write zero to that register the read back value did
      match what was written.
      
      The fix is a new resource flag IORESOURCE_PCI_FIXED used to mark a resource
      as non-movable.  This will also be useful to keep other import system
      resources from being moved around - for example system consoles on PCI
      busses.
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fb0f2b40
  22. 08 12月, 2006 1 次提交
    • C
      [PATCH] add numa node information to struct device · 87348136
      Christoph Hellwig 提交于
      For node-aware skb allocations we need information about the node in struct
      net_device or struct device.  Davem suggested to put it into struct device
      which this patch does.
      
      In particular:
      
       - struct device gets a new int numa_node member if CONFIG_NUMA is set
       - there are two new helpers, dev_to_node and set_dev_node to
         transparently deal with the non-numa case
       - for pci devices the node-info is set to the value we get from
         pcibus_to_node.
      
      Note that for some architectures pcibus_to_node doesn't work yet at the time
      we call it currently.  This is harmless and will just mean skb allocations
      aren't node-local on this architectures until the implementation of
      pcibus_to_node on these architectures have been updated (There are patches for
      x86 and x86_64 floating around)
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87348136