26 Feb, 2013

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug
    - Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
    - Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
    - Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
    - Stop caching _PRT and make independent of bus numbers (Yinghai Lu)

    PCI device hotplug
    - Clean up cpqphp dead code (Sasha Levin)
    - Disable ARI unless device and upstream bridge support it (Yijing Wang)
    - Initialize all hot-added devices (not functions 0-7) (Yijing Wang)

    Power management
    - Don't touch ASPM if disabled (Joe Lawrence)
    - Fix ASPM link state management (Myron Stowe)

    Miscellaneous
    - Fix PCI_EXP_FLAGS accessor (Alex Williamson)
    - Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
    - Document hotplug resource and MPS parameters (Yijing Wang)
    - Add accessor for PCIe capabilities (Myron Stowe)
    - Drop pciehp suspend/resume messages (Paul Bolle)
    - Make pci_slot built-in only (not a module) (Jiang Liu)
    - Remove unused PCI/ACPI bind ops (Jiang Liu)
    - Removed used pci_root_bus (Bjorn Helgaas)"

    * tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
    PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
    PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
    ACPI / PCI: Make pci_slot built-in only, not a module
    PCI/PM: Clear state_saved during suspend
    PCI: Use atomic_inc_return() rather than atomic_add_return()
    PCI: Catch attempts to disable already-disabled devices
    PCI: Disable Bus Master unconditionally in pci_device_shutdown()
    PCI: acpiphp: Remove dead code for PCI host bridge hotplug
    PCI: acpiphp: Create companion ACPI devices before creating PCI devices
    PCI: Remove unused "rc" in virtfn_add_bus()
    PCI: pciehp: Drop suspend/resume ENTRY messages
    PCI/ASPM: Don't touch ASPM if forcibly disabled
    PCI/ASPM: Deallocate upstream link state even if device is not PCIe
    PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
    PCI: Document hpiosize= and hpmemsize= resource reservation parameters
    PCI: Use PCI Express Capability accessor
    PCI: Introduce accessor to retrieve PCIe Capabilities Register
    PCI: Put pci_dev in device tree as early as possible
    PCI: Skip attaching driver in device_add()
    PCI: acpiphp: Keep driver loaded even if no slots found
    ...

    Linus Torvalds
     

04 Jan, 2013

2 commits

  • 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, __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
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Peter Zijlstra
    Cc: Daniel Drake
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • pci_root_bus is unused, so remove all references to it.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

07 Jan, 2012

1 commit

  • This doesn't change any functionality, but it makes a subsequent patch
    slightly simpler.

    pci_scan_bus(NULL, ...) and pci_scan_bus_parented() are identical except
    that pci_scan_bus() also calls pci_bus_add_devices():

    pci_scan_bus_parented
    pci_create_bus
    pci_scan_child_bus

    pci_scan_bus
    pci_create_bus
    pci_scan_child_bus
    pci_bus_add_devices

    All callers of pcibios_scan_root() call pci_bus_add_devices() explicitly,
    and we don't pass a parent device, so we might as well use pci_scan_bus().

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     

01 Nov, 2011

1 commit

  • These files were implicitly getting EXPORT_SYMBOL via device.h
    which was including module.h, but that will be fixed up shortly.

    By fixing these now, we can avoid seeing things like:

    arch/x86/kernel/rtc.c:29: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
    arch/x86/kernel/pci-dma.c:20: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
    arch/x86/kernel/e820.c:69: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’

    [ with input from Randy Dunlap and also
    from Stephen Rothwell ]

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

31 Jul, 2010

1 commit

  • pcibios_scan_specific_bus calls pci_scan_bus_on_node which is
    __devinit. Mark pcibios_scan_specific_bus __devinit as well since
    all users are now __init or __devinit.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Jesse Barnes

    Jiri Slaby
     

10 May, 2010

3 commits

  • Signed-off-by: Stephen Rothwell
    Signed-off-by: Mauro Carvalho Chehab

    Stephen Rothwell
     
  • This code changes the detection procedure of i7core_edac. Instead of
    directly probing for MC registers, it probes for another register found
    on Nehalem. If found, it tries to pick the first MC PCI BUS. This should
    work fine with Xeon 35xx, but, on Xeon 55xx, this is at bus 254 and 255
    that are not properly detected by the non-legacy PCI methods.

    The new detection code scans specifically at buses 254 and 255 for the
    Xeon 55xx devices.

    This code has not tested yet. After working, a change at the code will
    be needed, since the i7core is not yet ready for working with 2 sets of
    MC.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This patch adds a probing code that seeks for an specific pci bus. It
    still needs testing, but it is hoped that this will help to identify the
    memory controller with Xeon 55xx series.

    Signed-off-by: Aristeu Sergio
    Signed-off-by: Mauro Carvalho Chehab

    Aristeu Rozanski
     

20 Feb, 2010

2 commits

  • Moorestown wants to reuse pcibios_init_irq but needs to provide its
    own implementation of pci_enable_irq. After we distangled the init we
    can move the init_irq call to x86_init and remove the pci_enable_irq
    != NULL check in pcibios_init_irq. pci_enable_irq is compile time
    initialized to pirq_enable_irq and the special cases which override it
    (visws and acpi) set the x86_init function pointer to noop. That
    allows MSRT to override pci_enable_irq and otherwise run
    pcibios_init_irq unmodified.

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Acked-by: Jesse Barnes
    Signed-off-by: Jacob Pan
    Signed-off-by: H. Peter Anvin

    Thomas Gleixner
     
  • The PCI initialization in pci_subsys_init() is a mess. pci_numaq_init,
    pci_acpi_init, pci_visws_init and pci_legacy_init are called and each
    implementation checks and eventually modifies the global variable
    pcibios_scanned.

    x86_init functions allow us to do this more elegant. The pci.init
    function pointer is preset to pci_legacy_init. numaq, acpi and visws
    can modify the pointer in their early setup functions. The functions
    return 0 when they did the full initialization including bus scan. A
    non zero return value indicates that pci_legacy_init needs to be
    called either because the selected function failed or wants the
    generic bus scan in pci_legacy_init to happen (e.g. visws).

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Acked-by: Jesse Barnes
    Signed-off-by: Jacob Pan
    Signed-off-by: H. Peter Anvin

    Thomas Gleixner
     

27 Mar, 2009

1 commit

  • Impact: scan more peer root buses even acpi is used

    Move pci_bios_fixup_peer_bridges out of pci_legacy_init and into
    pci_subsys_init. This allows pci_bios_fixup_peer_bridges to be called
    even pci_apci_init is driving PCI initialization.

    Signed-off-by: Yinghai Lu
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     

30 Dec, 2008

1 commit

  • Impact: cleanup

    Now that arch/x86/pci/pci.h is used in a number of other places as well,
    move the lowlevel x86 pci definitions into the architecture include files.
    (not to be confused with the existing arch/x86/include/asm/pci.h file,
    which provides public details about x86 PCI)

    Tested on: X86_32_UP, X86_32_SMP and X86_64_SMP

    Signed-off-by: Jaswinder Singh Rajput
    Acked-by: Jesse Barnes
    Signed-off-by: Ingo Molnar

    Jaswinder Singh Rajput
     

12 Aug, 2008

1 commit


12 Jul, 2008

3 commits


11 Jul, 2008

2 commits


09 Jul, 2008

1 commit

  • So far subsys_initcalls has been executed in this order depending on
    the object order in the Makefile:

    arch/x86/pci/visws.c:subsys_initcall(pcibios_init);
    arch/x86/pci/numa.c:subsys_initcall(pci_numa_init);
    arch/x86/pci/acpi.c:subsys_initcall(pci_acpi_init);
    arch/x86/pci/legacy.c:subsys_initcall(pci_legacy_init);
    arch/x86/pci/irq.c:subsys_initcall(pcibios_irq_init);
    arch/x86/pci/common.c:subsys_initcall(pcibios_init);

    This patch removes the ordering dependency. There is now only one
    subsys_initcall function that contains subsystem initialization code
    with a defined order.

    Signed-off-by: Robert Richter
    Acked-by: Jesse Barnes
    Signed-off-by: Ingo Molnar

    Robert Richter
     

27 Apr, 2008

1 commit

  • Currently, on an amd k8 system with multi ht chains, the numa_node of
    pci devices under /sys/devices/pci0000:80/* is always 0, even if that
    chain is on node 1 or 2 or 3.

    Workaround: pcibus_to_node(bus) is used when we want to get the node that
    pci_device is on.

    In struct device, we already have numa_node member, and we could use
    dev_to_node()/set_dev_node() to get and set numa_node in the device.
    set_dev_node is called in pci_device_add() with pcibus_to_node(bus),
    and pcibus_to_node uses bus->sysdata for nodeid.

    The problem is when pci_add_device is called, bus->sysdata is not assigned
    correct nodeid yet. The result is that numa_node will always be 0.

    pcibios_scan_root and pci_scan_root could take sysdata. So we need to get
    mp_bus_to_node mapping before these two are called, and thus
    get_mp_bus_to_node could get correct node for sysdata in root bus.

    In scanning of the root bus, all child busses will take parent bus sysdata.
    So all pci_device->dev.numa_node will be assigned correctly and automatically.

    Later we could use dev_to_node(&pci_dev->dev) to get numa_node, and we
    could also could make other bus specific device get the correct numa_node
    too.

    This is an updated version of pci_sysdata and Jeff's pci_domain patch.

    [ mingo@elte.hu: build fix ]

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Yinghai Lu
     

11 Feb, 2008

1 commit

  • We want to allow different implementations of pci_raw_ops for standard
    and extended config space on x86. Rather than clutter generic code with
    knowledge of this, we make pci_raw_ops private to x86 and use it to
    implement the new raw interface -- raw_pci_read() and raw_pci_write().

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

11 Oct, 2007

1 commit