1. 13 10月, 2007 3 次提交
    • J
      PCI: X86: Introduce and enable PCI domain support · a79e4198
      Jeff Garzik 提交于
      * fix bug in pci_read() and pci_write() which prevented PCI domain
        support from working (hardcoded domain 0).
      
      * unconditionally enable CONFIG_PCI_DOMAINS
      
      * implement pci_domain_nr() and pci_proc_domain(), as required of
        all arches when CONFIG_PCI_DOMAINS is enabled.
      
      * store domain in struct pci_sysdata, as assigned by ACPI
      
      * support "pci=nodomains"
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a79e4198
    • G
      PCI: use _CRS for PCI resource allocation · 62f420f8
      Gary Hade 提交于
      Use _CRS for PCI resource allocation
      
      This patch resolves an issue where incorrect PCI memory and i/o ranges
      are being assigned to hotplugged PCI devices on some IBM systems.  The
      resource mis-allocation not only makes the PCI device unuseable but
      often makes the entire system unuseable due to resulting machine checks.
      
      The hotplug capable PCI slots on the affected systems are not located
      under a standard P2P bridge but are instead located under PCI root
      bridges or subtractive decode P2P bridges.  For example, the IBM x3850
      contains 2 hotplug capable PCI-X slots and 4 hotplug capable PCIe slots
      with the PCI-X slots each located under a PCI root bridge and the PCIe
      slots each located under a subtractive decode P2P bridge.
      
      The current i386/x86_64 PCI resource allocation code does not use _CRS
      returned resource information.  No other resource information source is
      available for slots that are not below a standard P2P bridge so
      incorrect ranges are being allocated from e820 hole causing the bad
      result.
      
      This patch causes the kernel to use _CRS returned resource info.  It is
      roughly based on a change provided by Matthew Wilcox for the ia64 kernel
      in 2005.  Due to possible buggy BIOS factor and possible yet to be
      discovered kernel issues the function is disabled by default and can be
      enabled with pci=use_crs.
      Signed-off-by: NGary Hade <gary.hade@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      62f420f8
    • J
      PCI: i386: Compaq EVO N800c needs PCI bus renumbering · 5b1ea82f
      Juha Laiho 提交于
      Force PCI bus renumbering for Compaq EVO N800c laptop, in order to get
      the cardbus slot recognised.
      Signed-off-by: NJuha Laiho <Juha.Laiho@iki.fi>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      5b1ea82f
  2. 11 10月, 2007 1 次提交
  3. 10 10月, 2007 1 次提交
    • J
      drivers/firmware: const-ify DMI API and internals · 1855256c
      Jeff Garzik 提交于
      Three main sets of changes:
      
      1) dmi_get_system_info() return value should have been marked const,
         since callers should not be changing that data.
      
      2) const-ify DMI internals, since DMI firmware tables should,
         whenever possible, be marked const to ensure we never ever write to
         that data area.
      
      3) const-ify DMI API, to enable marking tables const where possible
         in low-level drivers.
      
      And if we're really lucky, this might enable some additional
      optimizations on the part of the compiler.
      
      The bulk of the changes are #2 and #3, which are interrelated.  #1 could
      have been a separate patch, but it was so small compared to the others,
      it was easier to roll it into this changeset.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1855256c
  4. 12 8月, 2007 1 次提交
    • M
      finish i386 and x86-64 sysdata conversion · 73c59afc
      Muli Ben-Yehuda 提交于
      This patch finishes the i386 and x86-64 ->sysdata conversion and hopefully
      also fixes Riku's and Andy's observed bugs.  It is based on Yinghai Lu's
      and Andy Whitcroft's patches (thanks!) with some changes:
      
      - introduce pci_scan_bus_with_sysdata() and use it instead of
        pci_scan_bus() where appropriate. pci_scan_bus_with_sysdata() will
        allocate the sysdata structure and then call pci_scan_bus().
      - always allocate pci_sysdata dynamically. The whole point of this
        sysdata work is to make it easy to do root-bus specific things
        (e.g., support PCI domains and IOMMU's). I dislike using a default
        struct pci_sysdata in some places and a dynamically allocated
        pci_sysdata elsewhere - the potential for someone indavertantly
        changing the default structure is too high.
      - this patch only makes the minimal changes necessary, i.e., the NUMA node is
        always initialized to -1. Patches to do the right thing with regards
        to the NUMA node can build on top of this (either add a 'node'
        parameter to pci_scan_bus_with_sysdata() or just update the node
        when it becomes known).
      
      The patch was compile tested with various configurations (e.g., NUMAQ,
      VISWS) and run-time tested on i386 and x86-64.  Unfortunately none of my
      machines exhibited the bugs so caveat emptor.
      
      Andy, could you please see if this fixes the NUMA issues you've seen?
      Riku, does this fix "pci=noacpi" on your laptop?
      Signed-off-by: NMuli Ben-Yehuda <muli@il.ibm.com>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Cc: <riku.seppala@kymp.net>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73c59afc
  5. 22 7月, 2007 1 次提交
  6. 29 3月, 2007 1 次提交
  7. 27 3月, 2007 1 次提交
  8. 17 2月, 2007 1 次提交
  9. 02 12月, 2006 1 次提交
  10. 03 11月, 2006 1 次提交
  11. 19 10月, 2006 1 次提交
    • M
      PCI: optionally sort device lists breadth-first · 6b4b78fe
      Matt Domsch 提交于
      Problem:
      New Dell PowerEdge servers have 2 embedded ethernet ports, which are
      labeled NIC1 and NIC2 on the chassis, in the BIOS setup screens, and
      in the printed documentation.  Assuming no other add-in ethernet ports
      in the system, Linux 2.4 kernels name these eth0 and eth1
      respectively.  Many people have come to expect this naming.  Linux 2.6
      kernels name these eth1 and eth0 respectively (backwards from
      expectations).  I also have reports that various Sun and HP servers
      have similar behavior.
      
      
      Root cause:
      Linux 2.4 kernels walk the pci_devices list, which happens to be
      sorted in breadth-first order (or pcbios_find_device order on i386,
      which most often is breadth-first also).  2.6 kernels have both the
      pci_devices list and the pci_bus_type.klist_devices list, the latter
      is what is walked at driver load time to match the pci_id tables; this
      klist happens to be in depth-first order.
      
      On systems where, for physical routing reasons, NIC1 appears on a
      lower bus number than NIC2, but NIC2's bridge is discovered first in
      the depth-first ordering, NIC2 will be discovered before NIC1.  If the
      list were sorted breadth-first, NIC1 would be discovered before NIC2.
      
      A PowerEdge 1955 system has the following topology which easily
      exhibits the difference between depth-first and breadth-first device
      lists.
      
      -[0000:00]-+-00.0  Intel Corporation 5000P Chipset Memory Controller Hub
                 +-02.0-[0000:03-08]--+-00.0-[0000:04-07]--+-00.0-[0000:05-06]----00.0-[0000:06]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC2, 2.4 kernel name eth1, 2.6 kernel name eth0)
                 +-1c.0-[0000:01-02]----00.0-[0000:02]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC1, 2.4 kernel name eth0, 2.6 kernel name eth1)
      
      
      Other factors, such as device driver load order and the presence of
      PCI slots at various points in the bus hierarchy further complicate
      this problem; I'm not trying to solve those here, just restore the
      device order, and thus basic behavior, that 2.4 kernels had.
      
      
      Solution:
      
      The solution can come in multiple steps.
      
      Suggested fix #1: kernel
      Patch below optionally sorts the two device lists into breadth-first
      ordering to maintain compatibility with 2.4 kernels.  It adds two new
      command line options:
        pci=bfsort
        pci=nobfsort
      to force the sort order, or not, as you wish.  It also adds DMI checks
      for the specific Dell systems which exhibit "backwards" ordering, to
      make them "right".
      
      
      Suggested fix #2: udev rules from userland
      Many people also have the expectation that embedded NICs are always
      discovered before add-in NICs (which this patch does not try to do).
      Using the PCI IRQ Routing Table provided by system BIOS, it's easy to
      determine which PCI devices are embedded, or if add-in, which PCI slot
      they're in.  I'm working on a tool that would allow udev to name
      ethernet devices in ascending embedded, slot 1 .. slot N order,
      subsort by PCI bus/dev/fn breadth-first.  It'll be possible to use it
      independent of udev as well for those distributions that don't use
      udev in their installers.
      
      Suggested fix #3: system board routing rules
      One can constrain the system board layout to put NIC1 ahead of NIC2
      regardless of breadth-first or depth-first discovery order.  This adds
      a significant level of complexity to board routing, and may not be
      possible in all instances (witness the above systems from several
      major manufacturers).  I don't want to encourage this particular train
      of thought too far, at the expense of not doing #1 or #2 above.
      
      
      Feedback appreciated.  Patch tested on a Dell PowerEdge 1955 blade
      with 2.6.18.
      
      You'll also note I took some liberty and temporarily break the klist
      abstraction to simplify and speed up the sort algorithm.  I think
      that's both safe and appropriate in this instance.
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      6b4b78fe
  12. 26 9月, 2006 1 次提交
    • A
      [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1 · 0637a70a
      Andi Kleen 提交于
      Some buggy systems can machine check when config space accesses
      happen for some non existent devices.  i386/x86-64 do some early
      device scans that might trigger this. Allow pci=noearly to disable
      this. Also when type 1 is disabling also don't do any early
      accesses which are always type1.
      
      This moves the pci= configuration parsing to be a early parameter.
      I don't think this can break anything because it only changes
      a single global that is only used by PCI.
      
      Cc: gregkh@suse.de
      Cc: Trammell Hudson <hudson@osresearch.net>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      0637a70a
  13. 19 9月, 2006 1 次提交
    • L
      Revert mmiocfg heuristics and blacklist changes · 79e453d4
      Linus Torvalds 提交于
      This reverts commits 11012d41 and
      40dd2d20, which allowed us to use the
      MMIO accesses for PCI config cycles even without the area being marked
      reserved in the e820 memory tables.
      
      Those changes were needed for EFI-environment Intel macs, but broke some
      newer Intel 965 boards, so for now it's better to revert to our old
      2.6.17 behaviour and at least avoid introducing any new breakage.
      
      Andi Kleen has a set of patches that work with both EFI and the broken
      Intel 965 boards, which will be applied once they get wider testing.
      
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Edgar Hucek <hostmaster@ed-soft.at>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      79e453d4
  14. 31 8月, 2006 1 次提交
  15. 13 7月, 2006 1 次提交
  16. 22 6月, 2006 1 次提交
    • R
      [PATCH] PCI: i386/x86_84: disable PCI resource decode on device disable · 53e4d30d
      Rajesh Shah 提交于
      When a PCI device is disabled via pci_disable_device(), it's still
      left decoding its BAR resource ranges even though its driver
      will have likely released those regions (and may even have
      unloaded). pci_enable_device() already explicitly enables
      BAR resource decode for the device being enabled. This patch
      disables resource decode for the PCI device being disabled,
      making it symmetric with the enable call.
      
      I saw this while doing something else, not because of a
      problem report. Still, seems to be the correct thing to do.
      Signed-off-by: NRajesh Shah <rajesh.shah@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      53e4d30d
  17. 24 3月, 2006 1 次提交
    • B
      [PATCH] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix · 8c4b2cf9
      Bernhard Kaindl 提交于
      "In some cases, especially on modern laptops with a lot of PCI and cardbus
      bridges, we're unable to assign correct secondary/subordinate bus numbers
      to all cardbus bridges due to BIOS limitations unless we are using
      "pci=assign-busses" boot option." -- Ivan Kokshaysky (from a patch comment)
      
      Without it, Cardbus cards inserted are never seen by PCI because the parent
      PCI-PCI Bridge of the Cardbus bridge will not pass and translate Type 1 PCI
      configuration cycles correctly and the system will fail to find and
      initialise the PCI devices in the system.
      
      Reference: PCI-PCI Bridges: PCI Configuration Cycles and PCI Bus Numbering:
      http://www.science.unitn.it/~fiorella/guidelinux/tlk/node72.html
      
      The reason for this is that:
       ``All PCI busses located behind a PCI-PCI bridge must reside between the
      secondary bus number and the subordinate bus number (inclusive).''
      
      "pci=assign-busses" makes pcibios_assign_all_busses return 1 and this
      turns on PCI renumbering during PCI probing.
      
      Alan suggested to use DMI automatically set assign-busses on problem systems.
      
      The only question for me was where to put it.  I put it directly before
      scanning PCI bus into pcibios_scan_root() because it's called from legacy,
      acpi and numa and so it can be one place for all systems and configurations
      which may need it.
      
      AMD64 Laptops are also affected and fixed by assign-busses, and the code is
      also incuded from arch/x86_64/pci/ that place will also work for x86_64
      kernels, I only ifdef'-ed the x86-only Laptop in this example.
      
      Affected and known or assumed to be fixed with it are (found by googling):
      
      * ASUS Z71V and L3s
      * Samsung X20
      * Compaq R3140us and all Compaq R3000 series laptops with TI1620 Controller,
        also Compaq R4000 series (from a kernel.org bugreport)
      * HP zv5000z (AMD64 3700+, known that fixup_parent_subordinate_busnr fixes it)
      * HP zv5200z
      * IBM ThinkPad 240
      * An IBM ThinkPad (1.8 GHz Pentium M) debugged by Pavel Machek
        gives the correspondig message which detects the possible problem.
      * MSI S260 / Medion SIM 2100 MD 95600
      
      The patch also expands the "try pci=assign-busses" warning so testers will
      help us to update the DMI table.
      
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8c4b2cf9
  18. 24 11月, 2005 1 次提交
  19. 31 8月, 2005 1 次提交
    • I
      [PATCH] x86: pci_assign_unassigned_resources() update · 81d4af13
      Ivan Kokshaysky 提交于
      I had some time to think about PCI assign issues in 2.6.13-rc series.
      
      The major problem here is that we call pci_assign_unassigned_resources()
      way too early - at subsys_initcall level. Therefore we give no chances
      to ACPI and PnP routines (called at fs_initcall level) to reserve their
      respective resources properly, as the comments in drivers/pnp/system.c
      and drivers/acpi/motherboard.c suggest:
      
       /**
        * Reserve motherboard resources after PCI claim BARs,
        * but before PCI assign resources for uninitialized PCI devices
        */
      
      So I moved the pci_assign_unassigned_resources() call to
      pcibios_assign_resources() (fs_initcall), which should hopefully fix a
      lot of problems and make PCIBIOS_MIN_IO tweaks unnecessary.
      
      Other changes:
      - remove resource assignment code from pcibios_assign_resources(), since
        it duplicates pci_assign_unassigned_resources() functionality and
        actually does nothing in 2.6.13;
      - modify ROM assignment code as per Ben's suggestion: try to use firmware
        settings by default (if PCI_ASSIGN_ROMS is not set);
      - set CARDBUS_IO_SIZE back to 4K as it's a wonderful stress test for
        various setups.
      
      Confirmed by Tero Roponen <teanropo@cc.jyu.fi> (who had problems with
      the 4kB CardBus IO size previously).
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      81d4af13
  20. 30 7月, 2005 1 次提交
  21. 02 7月, 2005 1 次提交
    • I
      [PATCH] PCI: pci_assign_unassigned_resources() on x86 · 299de034
      Ivan Kokshaysky 提交于
      - Add sanity check for io[port,mem]_resource in setup-bus.c. These
        resources look like "free" as they have no parents, but obviously
        we must not touch them.
      - In i386.c:pci_allocate_bus_resources(), if a bridge resource cannot be
        allocated for some reason, then clear its flags. This prevents any child
        allocations in this range, so the setup-bus code will work with a clean
        resource sub-tree.
      - i386.c:pcibios_enable_resources() doesn't enable bridges, as it checks
        only resources 0-5, which looks like a clear bug to me. I suspect it
        might break hotplug as well in some cases.
      
      From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      299de034
  22. 28 6月, 2005 2 次提交
    • R
      [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add · c431ada4
      Rajesh Shah 提交于
      When you hot-plug a (root) bridge hierarchy, it may have p2p bridges and
      devices attached to it that have not been configured by firmware.  In this
      case, we need to configure the devices before starting them.  This patch
      separates device start from device scan so that we can introduce the
      configuration step in the middle.
      
      I kept the existing semantics for pci_scan_bus() since there are a huge number
      of callers to that function.
      
      Also, I have no way of testing the changes I made to the parisc files, so this
      needs review by those folks.  Sorry for the massive cross-post, this touches
      files in many different places.
      Signed-off-by: NRajesh Shah <rajesh.shah@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c431ada4
    • J
      [PATCH] PCI Allow OutOfRange PIRQ table address · 120bb424
      jayalk@intworks.biz 提交于
      I updated this to remove unnecessary variable initialization, make
      check_routing be inline only and not __init, switch to strtoul, and
      formatting fixes as per Randy Dunlap's recommendations.
      
      I updated this to change pirq_table_addr to a long, and to add a warning
      msg if the PIRQ table wasn't found at the specified address, as per thread
      with Matthew Wilcox.
      
      In our hardware situation, the BIOS is unable to store or generate it's PIRQ
      table in the F0000h-100000h standard range. This patch adds a pci kernel
      parameter, pirqaddr to allow the bootloader (or BIOS based loader) to inform
      the kernel where the PIRQ table got stored. A beneficial side-effect is that,
      if one's BIOS uses a static address each time for it's PIRQ table, then
      pirqaddr can be used to avoid the $pirq search through that address block each
      time at boot for normal PIRQ BIOSes.
      Signed-off-by: NJaya Kumar <jayalk@intworks.biz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      120bb424
  23. 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