17 Mar, 2016

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "PCI changes for v4.6:

    Enumeration:
    - Disable IO/MEM decoding for devices with non-compliant BARs (Bjorn Helgaas)
    - Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs (Bjorn Helgaas

    Resource management:
    - Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED (Bjorn Helgaas)
    - Don't assign or reassign immutable resources (Bjorn Helgaas)
    - Don't enable/disable ROM BAR if we're using a RAM shadow copy (Bjorn Helgaas)
    - Set ROM shadow location in arch code, not in PCI core (Bjorn Helgaas)
    - Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs (Bjorn Helgaas)
    - ia64: Use ioremap() instead of open-coded equivalent (Bjorn Helgaas)
    - ia64: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - MIPS: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY (Bjorn Helgaas)
    - Don't leak memory if sysfs_create_bin_file() fails (Bjorn Helgaas)
    - rcar: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)
    - designware: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)

    Virtualization:
    - Wait for up to 1000ms after FLR reset (Alex Williamson)
    - Support SR-IOV on any function type (Kelly Zytaruk)
    - Add ACS quirk for all Cavium devices (Manish Jaggi)

    AER:
    - Rename pci_ops_aer to aer_inj_pci_ops (Bjorn Helgaas)
    - Restore pci_ops pointer while calling original pci_ops (David Daney)
    - Fix aer_inject error codes (Jean Delvare)
    - Use dev_warn() in aer_inject (Jean Delvare)
    - Log actual error causes in aer_inject (Jean Delvare)
    - Log aer_inject error injections (Jean Delvare)

    VPD:
    - Prevent VPD access for buggy devices (Babu Moger)
    - Move pci_read_vpd() and pci_write_vpd() close to other VPD code (Bjorn Helgaas)
    - Move pci_vpd_release() from header file to pci/access.c (Bjorn Helgaas)
    - Remove struct pci_vpd_ops.release function pointer (Bjorn Helgaas)
    - Rename VPD symbols to remove unnecessary "pci22" (Bjorn Helgaas)
    - Fold struct pci_vpd_pci22 into struct pci_vpd (Bjorn Helgaas)
    - Sleep rather than busy-wait for VPD access completion (Bjorn Helgaas)
    - Update VPD definitions (Hannes Reinecke)
    - Allow access to VPD attributes with size 0 (Hannes Reinecke)
    - Determine actual VPD size on first access (Hannes Reinecke)

    Generic host bridge driver:
    - Move structure definitions to separate header file (David Daney)
    - Add pci_host_common_probe(), based on gen_pci_probe() (David Daney)
    - Expose pci_host_common_probe() for use by other drivers (David Daney)

    Altera host bridge driver:
    - Fix altera_pcie_link_is_up() (Ley Foon Tan)

    Cavium ThunderX host bridge driver:
    - Add PCIe host driver for ThunderX processors (David Daney)
    - Add driver for ThunderX-pass{1,2} on-chip devices (David Daney)

    Freescale i.MX6 host bridge driver:
    - Add DT bindings to configure PHY Tx driver settings (Justin Waters)
    - Move imx6_pcie_reset_phy() near other PHY handling functions (Lucas Stach)
    - Move PHY reset into imx6_pcie_establish_link() (Lucas Stach)
    - Remove broken Gen2 workaround (Lucas Stach)
    - Move link up check into imx6_pcie_wait_for_link() (Lucas Stach)

    Freescale Layerscape host bridge driver:
    - Add "fsl,ls2085a-pcie" compatible ID (Yang Shi)

    Intel VMD host bridge driver:
    - Attach VMD resources to parent domain's resource tree (Jon Derrick)
    - Set bus resource start to 0 (Keith Busch)

    Microsoft Hyper-V host bridge driver:
    - Add fwnode_handle to x86 pci_sysdata (Jake Oshins)
    - Look up IRQ domain by fwnode_handle (Jake Oshins)
    - Add paravirtual PCI front-end for Microsoft Hyper-V VMs (Jake Oshins)

    NVIDIA Tegra host bridge driver:
    - Add pci_ops.{add,remove}_bus() callbacks (Thierry Reding)
    - Implement ->{add,remove}_bus() callbacks (Thierry Reding)
    - Remove unused struct tegra_pcie.num_ports field (Thierry Reding)
    - Track bus -> CPU mapping (Thierry Reding)
    - Remove misleading PHYS_OFFSET (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Depend on ARCH_RENESAS, not ARCH_SHMOBILE (Simon Horman)

    Synopsys DesignWare host bridge driver:
    - ARC: Add PCI support (Joao Pinto)
    - Add generic dw_pcie_wait_for_link() (Joao Pinto)
    - Add default link up check if sub-driver doesn't override (Joao Pinto)
    - Add driver for prototyping kits based on ARC SDP (Joao Pinto)

    TI Keystone host bridge driver:
    - Defer probing if devm_phy_get() returns -EPROBE_DEFER (Shawn Lin)

    Xilinx AXI host bridge driver:
    - Use of_pci_get_host_bridge_resources() to parse DT (Bharat Kumar Gogada)
    - Remove dependency on ARM-specific struct hw_pci (Bharat Kumar Gogada)
    - Don't call pci_fixup_irqs() on Microblaze (Bharat Kumar Gogada)
    - Update Zynq binding with Microblaze node (Bharat Kumar Gogada)
    - microblaze: Support generic Xilinx AXI PCIe Host Bridge IP driver (Bharat Kumar Gogada)

    Xilinx NWL host bridge driver:
    - Add support for Xilinx NWL PCIe Host Controller (Bharat Kumar Gogada)

    Miscellaneous:
    - Check device_attach() return value always (Bjorn Helgaas)
    - Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h (Bjorn Helgaas)
    - Remove includes of empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - ARM64: Remove generated include of asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove includes of asm/pci-bridge.h (Bjorn Helgaas)
    - Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h (Bjorn Helgaas)
    - unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition (Bjorn Helgaas)
    - Cleanup pci/pcie/Kconfig whitespace (Andreas Ziegler)
    - Include pci/hotplug Kconfig directly from pci/Kconfig (Bjorn Helgaas)
    - Include pci/pcie/Kconfig directly from pci/Kconfig (Bogicevic Sasa)
    - frv: Remove stray pci_{alloc,free}_consistent() declaration (Christoph Hellwig)
    - Move pci_dma_* helpers to common code (Christoph Hellwig)
    - Add PCI_CLASS_SERIAL_USB_DEVICE definition (Heikki Krogerus)
    - Add QEMU top-level IDs for (sub)vendor & device (Robin H. Johnson)
    - Fix broken URL for Dell biosdevname (Naga Venkata Sai Indubhaskar Jupudi)"

    * tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (94 commits)
    PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition
    PCI: designware: Add driver for prototyping kits based on ARC SDP
    PCI: designware: Add default link up check if sub-driver doesn't override
    PCI: designware: Add generic dw_pcie_wait_for_link()
    PCI: Cleanup pci/pcie/Kconfig whitespace
    PCI: Simplify pci_create_attr() control flow
    PCI: Don't leak memory if sysfs_create_bin_file() fails
    PCI: Simplify sysfs ROM cleanup
    PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY
    MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource
    MIPS: Loongson 3: Use temporary struct resource * to avoid repetition
    ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource
    ia64/PCI: Use ioremap() instead of open-coded equivalent
    ia64/PCI: Use temporary struct resource * to avoid repetition
    PCI: Clean up pci_map_rom() whitespace
    PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs
    PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices
    PCI: thunder: Add PCIe host driver for ThunderX processors
    PCI: generic: Expose pci_host_common_probe() for use by other drivers
    PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()
    ...

    Linus Torvalds
     

15 Mar, 2016

2 commits

  • …tualization' and 'pci/vpd' into next

    * pci/aer:
    PCI/AER: Log aer_inject error injections
    PCI/AER: Log actual error causes in aer_inject
    PCI/AER: Use dev_warn() in aer_inject
    PCI/AER: Fix aer_inject error codes

    * pci/enumeration:
    PCI: Fix broken URL for Dell biosdevname

    * pci/kconfig:
    PCI: Cleanup pci/pcie/Kconfig whitespace
    PCI: Include pci/hotplug Kconfig directly from pci/Kconfig
    PCI: Include pci/pcie/Kconfig directly from pci/Kconfig

    * pci/misc:
    PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition
    PCI: Add QEMU top-level IDs for (sub)vendor & device
    unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition
    PCI: Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h
    PCI: Move pci_dma_* helpers to common code
    frv/PCI: Remove stray pci_{alloc,free}_consistent() declaration

    * pci/virtualization:
    PCI: Wait for up to 1000ms after FLR reset
    PCI: Support SR-IOV on any function type

    * pci/vpd:
    PCI: Prevent VPD access for buggy devices
    PCI: Sleep rather than busy-wait for VPD access completion
    PCI: Fold struct pci_vpd_pci22 into struct pci_vpd
    PCI: Rename VPD symbols to remove unnecessary "pci22"
    PCI: Remove struct pci_vpd_ops.release function pointer
    PCI: Move pci_vpd_release() from header file to pci/access.c
    PCI: Move pci_read_vpd() and pci_write_vpd() close to other VPD code
    PCI: Determine actual VPD size on first access
    PCI: Use bitfield instead of bool for struct pci_vpd_pci22.busy
    PCI: Allow access to VPD attributes with size 0
    PCI: Update VPD definitions

    Bjorn Helgaas
     
  • Clean up style issues in drivers/pci/pcie/Kconfig, in particular all
    indentation is now done using tabs, not spaces, and the definition of
    PCIEASPM_DEBUG is now separated from the definition of PCIEASPM with a
    newline.

    Signed-off-by: Andreas Ziegler
    Signed-off-by: Bjorn Helgaas

    Andreas Ziegler
     

09 Mar, 2016

4 commits

  • Log successful error injections so that injected errors can be
    differentiated from real errors.

    Suggested-by: Bjorn Helgaas
    Signed-off-by: Jean Delvare
    Signed-off-by: Bjorn Helgaas
    CC: Borislav Petkov

    Jean Delvare
     
  • The aer_inject driver is very quiet. In most cases, it merely returns an
    error code to user-space, leaving the user with little clue about the
    actual reason for the failure.

    So, log error messages for 4 of the most frequent causes of failure:
    * Can't find the root port of the specified device.
    * Device doesn't support AER.
    * Root port doesn't support AER.
    * AER device not found.

    This gives the user a chance to understand why aer-inject failed.

    Based on a preliminary patch by Thomas Renninger.

    Signed-off-by: Jean Delvare
    Signed-off-by: Bjorn Helgaas
    CC: Borislav Petkov
    CC: Thomas Renninger

    Jean Delvare
     
  • dev_warn() is better than printk(LOG_WARNING...) as it records which device
    the message relates to. Also add a prefix "aer_inject:" to help
    differentiate real errors from injected errors.

    Signed-off-by: Jean Delvare
    Signed-off-by: Bjorn Helgaas
    CC: Borislav Petkov

    Jean Delvare
     
  • EPERM means "Operation not permitted", which doesn't reflect the lack of
    support for AER. EPROTONOSUPPORT (Protocol not supported) is a better
    choice of error code if the device or its root port lack support for AER.

    Likewise, EINVAL means "Invalid argument", which is not suitable for cases
    where the AER error device is missing or unusable. ENODEV and
    EPROTONOSUPPORT, respectively, fit better.

    Suggested-by: Borislav Petkov
    Signed-off-by: Jean Delvare
    Signed-off-by: Bjorn Helgaas
    CC: Borislav Petkov
    CC: Prarit Bhargava

    Jean Delvare
     

10 Feb, 2016

1 commit

  • * pci/aer:
    PCI/AER: Use list_first_entry_or_null() to simplify code
    PCI/AER: Restore pci_ops pointer while calling original pci_ops
    PCI/AER: Rename pci_ops_aer to aer_inj_pci_ops

    * pci/misc:
    PCI: Remove includes of asm/pci-bridge.h
    PCI: Remove empty asm-generic/pci-bridge.h
    ARM64: PCI: Remove generated include of asm-generic/pci-bridge.h
    PCI: Remove includes of empty asm-generic/pci-bridge.h
    PCI: Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h
    PCI/PME: Restructure pcie_pme_suspend() to prevent compiler warning
    PCI/PME: Remove redundant port lookup
    PCI: Check device_attach() return value always

    * pci/virtualization:
    PCI: Add ACS quirk for all Cavium devices

    Bjorn Helgaas
     

06 Feb, 2016

2 commits

  • Previously we had this:

    if (wakeup)
    ret = enable_irq_wake(...);
    if (!wakeup || ret)
    ...

    "ret" is only evaluated when "wakeup" is true, and it is always initialized
    in that case, but gcc isn't smart enough to figure that out and warns:

    drivers/pci/pcie/pme.c:414:14: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

    Restructure the code slightly to make it easier for gcc (and maybe for
    humans as well).

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com

    Bjorn Helgaas
     
  • We've already looked up srv->port a few lines earlier, and there's no need
    to do it again. Remove the redundant lookup.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com

    Bjorn Helgaas
     

05 Feb, 2016

3 commits

  • Use list_first_entry_or_null() instead of list_empty() + list_entry() to
    simplify the code.

    Signed-off-by: Geliang Tang
    Signed-off-by: Bjorn Helgaas

    Geliang Tang
     
  • The aer_inject module intercepts config space accesses by replacing the
    bus->ops pointer. If it forwards accesses to the original pci_ops, and
    those original ops use bus->ops, they see the aer_pci_ops instead of their
    own pci_ops, which can cause a crash.

    For example, pci_generic_config_read() uses the bus->ops->map_bus pointer.
    If bus->ops is set to aer_pci_ops, which doesn't supply .map_bus,
    pci_generic_config_read() will dereference an invalid pointer and cause a
    crash.

    Temporarily restore the original bus->ops pointer while calling ops->read()
    or ops->write(). Callers of these functions already hold pci_lock, which
    prevents other users of bus->ops until we're finished.

    [bhelgaas: changelog]
    Signed-off-by: David Daney
    Signed-off-by: Bjorn Helgaas

    David Daney
     
  • Rename

    pci_ops_aer to aer_inj_pci_ops
    pci_read_aer() to aer_inj_read_config()
    pci_write_aer() to aer_inj_write_config()

    This is more conventional and more informative. No functional change.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

26 Jan, 2016

1 commit

  • A Root Port's AER structure (rpc) contains a queue of events. aer_irq()
    enqueues AER status information and schedules aer_isr() to dequeue and
    process it. When we remove a device, aer_remove() waits for the queue to
    be empty, then frees the rpc struct.

    But aer_isr() references the rpc struct after dequeueing and possibly
    emptying the queue, which can cause a use-after-free error as in the
    following scenario with two threads, aer_isr() on the left and a
    concurrent aer_remove() on the right:

    Thread A Thread B
    -------- --------
    aer_irq():
    rpc->prod_idx++
    aer_remove():
    wait_event(rpc->prod_idx == rpc->cons_idx)
    # now blocked until queue becomes empty
    aer_isr(): # ...
    rpc->cons_idx++ # unblocked because queue is now empty
    ... kfree(rpc)
    mutex_unlock(&rpc->rpc_mutex)

    To prevent this problem, use flush_work() to wait until the last scheduled
    instance of aer_isr() has completed before freeing the rpc struct in
    aer_remove().

    I reproduced this use-after-free by flashing a device FPGA and
    re-enumerating the bus to find the new device. With SLUB debug, this
    crashes with 0x6b bytes (POISON_FREE, the use-after-free magic number) in
    GPR25:

    pcieport 0000:00:00.0: AER: Multiple Corrected error received: id=0000
    Unable to handle kernel paging request for data at address 0x27ef9e3e
    Workqueue: events aer_isr
    GPR24: dd6aa000 6b6b6b6b 605f8378 605f8360 d99b12c0 604fc674 606b1704 d99b12c0
    NIP [602f5328] pci_walk_bus+0xd4/0x104

    [bhelgaas: changelog, stable tag]
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Bjorn Helgaas
    CC: stable@vger.kernel.org

    Sebastian Andrzej Siewior
     

16 Jan, 2016

2 commits

  • * pci/host-vmd:
    x86/PCI: Add driver for Intel Volume Management Device (VMD)
    PCI/AER: Use 32 bit PCI domain numbers
    x86/PCI: Allow DMA ops specific to a PCI domain
    irqdomain: Export irq_domain_set_info() for module use
    genirq/MSI: Relax msi_domain_alloc() to support parentless MSI irqdomains

    Bjorn Helgaas
     
  • The Intel Volume Management Device (VMD) supports 32-bit domain numbers.
    To accommodate this, use u32 instead of u16 to store domain numbers.

    [bhelgaas: changelog]
    Signed-off-by: Keith Busch
    Signed-off-by: Bjorn Helgaas

    Keith Busch
     

11 Dec, 2015

2 commits

  • * pci/aspm:
    PCI/ASPM: Make sysfs link_state_store() consistent with link_state_show()

    * pci/hotplug:
    PCI: pciehp: Always protect pciehp_disable_slot() with hotplug mutex

    * pci/misc:
    x86/PCI: Simplify pci_bios_{read,write}
    PCI: Simplify config space size computation
    PCI: Limit config space size for Netronome NFP6000 family
    PCI: Add Netronome vendor and device IDs
    PCI: Support PCIe devices with short cfg_size
    x86/PCI: Clarify AMD Fam10h config access restrictions comment
    PCI: Print warnings for all invalid expansion ROM headers
    PCI: Check for PCI_HEADER_TYPE_BRIDGE equality, not bitmask

    * pci/msi:
    PCI/MSI: Remove empty pci_msi_init_pci_dev()
    PCI/MSI: Initialize MSI capability for all architectures

    Bjorn Helgaas
     
  • Bit 7 of the "Header Type" register indicates a multi-function device when
    set. Bits 0-6 contain encoded values, where 0x1 indicates a PCI-PCI
    bridge. It is incorrect to test this as though it were a mask.

    For example, while the PCI 3.0 spec only defines values 0x0, 0x1, and 0x2,
    it's conceivable that a future spec could define 0x3 to mean something
    else; then tests for "(hdr_type & 0x7f) & PCI_HEADER_TYPE_BRIDGE" would
    incorrectly succeed for this new 0x3 header type.

    Test bits 0-6 of the Header Type for equality with PCI_HEADER_TYPE_BRIDGE.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

04 Dec, 2015

1 commit

  • If CONFIG_PCIEASPM_DEBUG is set, then PCI devices have a link_state
    attribute. Reading that attribute shows the state as a bit mask: 1
    means L0S upstream, 2 means L0S downstream, and 4 means L1.

    Oddly, writing to link_state is inconsistent and gets translated, leading
    to mysterious results in which the value you store isn't comparable the
    value you load back out.

    Fix it by making link_state_store() match link_state_show().

    [bhelgaas: Check "aspm_disabled" *before* validating input. When
    "aspm_disabled" is set, this changes the error for invalid input from
    -EINVAL to -EPERM.]

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Bjorn Helgaas

    Andy Lutomirski
     

17 Sep, 2015

1 commit

  • AER errors might be recorded when powering-on devices. These errors can be
    ignored, so firmware usually clears them before the OS enumerates devices.
    However, firmware is not involved when devices are added via hotplug, so
    the OS may discover power-up errors that should be ignored. The same may
    happen when powering up devices when resuming after suspend.

    Clear the AER error status registers during enumeration and resume.

    [bhelgaas: changelog, remove repetitive comments]
    Signed-off-by: Taku Izumi
    Signed-off-by: Bjorn Helgaas

    Taku Izumi
     

15 Jul, 2015

1 commit


11 Jun, 2015

1 commit


30 May, 2015

1 commit

  • Previously we assumed that PCIe Root Ports and Downstream Ports had Links
    on their secondary side. That is true in most systems, but it is possible
    to connect a switch with either an Upstream or a Downstream Port leading
    downstream.

    Instead of relying on the component type to identify devices that have
    links leading downstream, use the "dev->has_secondary_link" field.

    [bhelgaas: changelog]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     

27 May, 2015

1 commit

  • We allocate pcie_link_state for the component at the upstream end of a
    Link. Previously we did this by allocating pcie_link_state for Root Ports
    and Downstream Ports. This works fine for the typical topology:

    00:1c.0 Root Port [bridge to bus 02]
    02:00.0 Upstream Port [bridge to bus 03]
    03:00.0 Downstream Port [bridge to bus 04]
    04:00.0 Endpoint or Switch Port

    However, it is possible to have a Root Port connected to a Downstream Port
    instead of an Upstream Port, as in Robert White's ATCA system:

    00:1c.0 Root Port [bridge to bus 02]
    02:00.0 Downstream Port [bridge to bus 03]
    03:01.0 Downstream Port [bridge to bus 04]
    04:00.0 Endpoint or Switch Port

    In this topology, we wrongly allocated pcie_link_state for the 02:00.0
    Downstream Port, which is actually the *downstream* end of a link. This
    led to the following NULL pointer dereference when we tried to connect this
    link into the tree of links starting at the 00:1c.0 Root Port:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
    IP: [] pcie_aspm_init_link_state+0x744/0x850
    Hardware name: Kontron B3001/B3001, BIOS 4.6.3 08/07/2012
    Call Trace:
    [] pci_scan_slot+0xd5/0x120
    [] pci_scan_child_bus+0x2d/0xd0
    ...

    Instead of relying on the component type to identify the upstream end of a
    link, use the "dev->has_secondary_link" field.

    This means it's now possible for an Upstream Port to have a link on its
    secondary side, so alloc_pcie_link_state() needs to connect links
    originating from both Upstream and Downstream Ports into the tree.

    [bhelgaas: changelog, add comment]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=94361
    Link: http://lkml.kernel.org/r/54EB81B2.4050904@pobox.com
    Reported-by: Robert White
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     

21 May, 2015

2 commits


14 Apr, 2015

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Enumeration
    - Read capability list as dwords, not bytes (Sean O. Stalley)

    Resource management
    - Don't check for PNP overlaps with unassigned PCI BARs (Bjorn Helgaas)
    - Mark invalid BARs as unassigned (Bjorn Helgaas)
    - Show driver, BAR#, and resource on pci_ioremap_bar() failure (Bjorn Helgaas)
    - Fail pci_ioremap_bar() on unassigned resources (Bjorn Helgaas)
    - Assign resources before drivers claim devices (Yijing Wang)
    - Claim bus resources before pci_bus_add_devices() (Yijing Wang)

    Power management
    - Optimize device state transition delays (Aaron Lu)
    - Don't clear ASPM bits when the FADT declares it's unsupported (Matthew Garrett)

    Virtualization
    - Add ACS quirks for Intel 1G NICs (Alex Williamson)

    IOMMU
    - Add ptr to OF node arg to of_iommu_configure() (Murali Karicheri)
    - Move of_dma_configure() to device.c to help re-use (Murali Karicheri)
    - Fix size when dma-range is not used (Murali Karicheri)
    - Add helper functions pci_get[put]_host_bridge_device() (Murali Karicheri)
    - Add of_pci_dma_configure() to update DMA configuration (Murali Karicheri)
    - Update DMA configuration from DT (Murali Karicheri)
    - dma-mapping: limit IOMMU mapping size (Murali Karicheri)
    - Calculate device DMA masks based on DT dma-range size (Murali Karicheri)

    ARM Versatile host bridge driver
    - Check for devm_ioremap_resource() failures (Jisheng Zhang)

    Broadcom iProc host bridge driver
    - Add Broadcom iProc PCIe driver (Ray Jui)

    Marvell MVEBU host bridge driver
    - Add suspend/resume support (Thomas Petazzoni)

    Renesas R-Car host bridge driver
    - Fix position of MSI enable bit (Nobuhiro Iwamatsu)
    - Write zeroes to reserved PCIEPARL bits (Nobuhiro Iwamatsu)
    - Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR (Nobuhiro Iwamatsu)
    - Verify that mem_res is 64K-aligned (Nobuhiro Iwamatsu)

    Samsung Exynos host bridge driver
    - Fix INTx enablement statement termination error (Jaehoon Chung)

    Miscellaneous
    - Make a shareable UUID for PCI firmware ACPI _DSM (Aaron Lu)
    - Clarify policy for vendor IDs in pci.txt (Michael S. Tsirkin)"

    * tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (36 commits)
    PCI: Read capability list as dwords, not bytes
    PCI: layerscape: Simplify platform_get_resource_byname() failure checking
    PCI: keystone: Don't dereference possible NULL pointer
    PCI: versatile: Check for devm_ioremap_resource() failures
    PCI: Don't clear ASPM bits when the FADT declares it's unsupported
    PCI: Clarify policy for vendor IDs in pci.txt
    PCI/ACPI: Optimize device state transition delays
    PCI: Export pci_find_host_bridge() for use inside PCI core
    PCI: Make a shareable UUID for PCI firmware ACPI _DSM
    PCI: Fix typo in Thunderbolt kernel message
    PCI: exynos: Fix INTx enablement statement termination error
    PCI: iproc: Add Broadcom iProc PCIe support
    PCI: iproc: Add DT docs for Broadcom iProc PCIe driver
    PCI: Export symbols required for loadable host driver modules
    PCI: Add ACS quirks for Intel 1G NICs
    PCI: mvebu: Add suspend/resume support
    PCI: Cleanup control flow
    sparc/PCI: Claim bus resources before pci_bus_add_devices()
    PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
    PCI: Fail pci_ioremap_bar() on unassigned resources
    ...

    Linus Torvalds
     

10 Apr, 2015

1 commit


07 Mar, 2015

1 commit

  • Commit fab4c256a58b ("PCI/AER: Add a TLP header print helper") introduced
    the helper function __print_tlp_header(), but contrary to the intention,
    the behaviour did change: Since we're taking the address of the parameter
    t, the first 4 or 8 bytes printed will be the value of the pointer t
    itself, and the remaining 12 or 8 bytes will be who-knows-what (something
    from the stack).

    We want to show the values of the four members of the struct
    aer_header_log_regs; that can be done without ugly and error-prone casts.
    On little-endian this should produce the same output as originally
    intended, and since no-one has complained about getting garbage output so
    far, I think big-endian should be ok too.

    Fixes: fab4c256a58b ("PCI/AER: Add a TLP header print helper")
    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Bjorn Helgaas
    Acked-by: Borislav Petkov
    CC: stable@vger.kernel.org # v3.14+

    Rasmus Villemoes
     

20 Feb, 2015

1 commit

  • Pull kconfig updates from Michal Marek:
    "Yann E Morin was supposed to take over kconfig maintainership, but
    this hasn't happened. So I'm sending a few kconfig patches that I
    collected:

    - Fix for missing va_end in kconfig
    - merge_config.sh displays used if given too few arguments
    - s/boolean/bool/ in Kconfig files for consistency, with the plan to
    only support bool in the future"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: use va_end to match corresponding va_start
    merge_config.sh: Display usage if given too few arguments
    kconfig: use bool instead of boolean for type definition attributes

    Linus Torvalds
     

10 Jan, 2015

1 commit


07 Jan, 2015

1 commit


04 Dec, 2014

1 commit

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so quite a few
    depend on CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PCI core code.

    Reviewed-by: Ulf Hansson
    Acked-by: Bjorn Helgaas
    Acked-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

24 Oct, 2014

1 commit

  • If the irqchip handling the PCIe PME interrupt is not able
    to enable interrupt wakeup we should properly reflect this
    in the PME suspend status.

    This fixes a kernel warning on resume, where it would try
    to disable the irq wakeup that failed to be activated while
    suspending, for example:

    WARNING: CPU: 0 PID: 609 at kernel/irq/manage.c:536 irq_set_irq_wake+0xc0/0xf8()
    Unbalanced IRQ 384 wake disable

    Fixes: 76cde7e49590 (PCI / PM: Make PCIe PME interrupts wake up from suspend-to-idle)
    Reported-and-tested-by: Richard Zhu
    Signed-off-by: Lucas Stach
    Signed-off-by: Rafael J. Wysocki

    Lucas Stach
     

10 Oct, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "Features-wise, to me the most important this time is a rework of
    wakeup interrupts handling in the core that makes them work
    consistently across all of the available sleep states, including
    suspend-to-idle. Many thanks to Thomas Gleixner for his help with
    this work.

    Second is an update of the generic PM domains code that has been in
    need of some care for quite a while. Unused code is being removed, DT
    support is being added and domains are now going to be attached to
    devices in bus type code in analogy with the ACPI PM domain. The
    majority of work here was done by Ulf Hansson who also has been the
    most active developer this time.

    Apart from this we have a traditional ACPICA update, this time to
    upstream version 20140828 and a few ACPI wakeup interrupts handling
    patches on top of the general rework mentioned above. There also are
    several cpufreq commits including renaming the cpufreq-cpu0 driver to
    cpufreq-dt, as this is what implements generic DT-based cpufreq
    support, and a new DT-based idle states infrastructure for cpuidle.

    In addition to that, the ACPI LPSS driver is updated, ACPI support for
    Apple machines is improved, a few bugs are fixed and a few cleanups
    are made all over.

    Finally, the Adaptive Voltage Scaling (AVS) subsystem now has a tree
    maintained by Kevin Hilman that will be merged through the PM tree.

    Numbers-wise, the generic PM domains update takes the lead this time
    with 32 non-merge commits, second is cpufreq (15 commits) and the 3rd
    place goes to the wakeup interrupts handling rework (13 commits).

    Specifics:

    - Rework the handling of wakeup IRQs by the IRQ core such that all of
    them will be switched over to "wakeup" mode in suspend_device_irqs()
    and in that mode the first interrupt will abort system suspend in
    progress or wake up the system if already in suspend-to-idle (or
    equivalent) without executing any interrupt handlers. Among other
    things that eliminates the wakeup-related motivation to use the
    IRQF_NO_SUSPEND interrupt flag with interrupts which don't really
    need it and should not use it (Thomas Gleixner and Rafael Wysocki)

    - Switch over ACPI to handling wakeup interrupts with the help of the
    new mechanism introduced by the above IRQ core rework (Rafael Wysocki)

    - Rework the core generic PM domains code to eliminate code that's
    not used, add DT support and add a generic mechanism by which
    devices can be added to PM domains automatically during enumeration
    (Ulf Hansson, Geert Uytterhoeven and Tomasz Figa).

    - Add debugfs-based mechanics for debugging generic PM domains
    (Maciej Matraszek).

    - ACPICA update to upstream version 20140828. Included are updates
    related to the SRAT and GTDT tables and the _PSx methods are in the
    METHOD_NAME list now (Bob Moore and Hanjun Guo).

    - Add _OSI("Darwin") support to the ACPI core (unfortunately, that
    can't really be done in a straightforward way) to prevent
    Thunderbolt from being turned off on Apple systems after boot (or
    after resume from system suspend) and rework the ACPI Smart Battery
    Subsystem (SBS) driver to work correctly with Apple platforms
    (Matthew Garrett and Andreas Noever).

    - ACPI LPSS (Low-Power Subsystem) driver update cleaning up the code,
    adding support for 133MHz I2C source clock on Intel Baytrail to it
    and making it avoid using UART RTS override with Auto Flow Control
    (Heikki Krogerus).

    - ACPI backlight updates removing the video_set_use_native_backlight
    quirk which is not necessary any more, making the code check the
    list of output devices returned by the _DOD method to avoid
    creating acpi_video interfaces that won't work and adding a quirk
    for Lenovo Ideapad Z570 (Hans de Goede, Aaron Lu and Stepan Bujnak)

    - New Win8 ACPI OSI quirks for some Dell laptops (Edward Lin)

    - Assorted ACPI code cleanups (Fabian Frederick, Rasmus Villemoes,
    Sudip Mukherjee, Yijing Wang, and Zhang Rui)

    - cpufreq core updates and cleanups (Viresh Kumar, Preeti U Murthy,
    Rasmus Villemoes)

    - cpufreq driver updates: cpufreq-cpu0/cpufreq-dt (driver name change
    among other things), ppc-corenet, powernv (Viresh Kumar, Preeti U
    Murthy, Shilpasri G Bhat, Lucas Stach)

    - cpuidle support for DT-based idle states infrastructure, new ARM64
    cpuidle driver, cpuidle core cleanups (Lorenzo Pieralisi, Rasmus
    Villemoes)

    - ARM big.LITTLE cpuidle driver updates: support for DT-based
    initialization and Exynos5800 compatible string (Lorenzo Pieralisi,
    Kevin Hilman)

    - Rework of the test_suspend kernel command line argument and a new
    trace event for console resume (Srinivas Pandruvada, Todd E Brandt)

    - Second attempt to optimize swsusp_free() (hibernation core) to make
    it avoid going through all PFNs which may be way too slow on some
    systems (Joerg Roedel)

    - devfreq updates (Paul Bolle, Punit Agrawal, Ãrjan Eide).

    - rockchip-io Adaptive Voltage Scaling (AVS) driver and AVS entry
    update in MAINTAINERS (Heiko Stübner, Kevin Hilman)

    - PM core fix related to clock management (Geert Uytterhoeven)

    - PM core's sysfs code cleanup (Johannes Berg)"

    * tag 'pm+acpi-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (105 commits)
    ACPI / fan: printk replacement
    PM / clk: Fix crash in clocks management code if !CONFIG_PM_RUNTIME
    PM / Domains: Rename cpu_data to cpuidle_data
    cpufreq: cpufreq-dt: fix potential double put of cpu OF node
    cpufreq: cpu0: rename driver and internals to 'cpufreq_dt'
    PM / hibernate: Iterate over set bits instead of PFNs in swsusp_free()
    cpufreq: ppc-corenet: remove duplicate update of cpu_data
    ACPI / sleep: Rework the handling of ACPI GPE wakeup from suspend-to-idle
    PM / sleep: Rename platform suspend/resume functions in suspend.c
    PM / sleep: Export dpm_suspend_late/noirq() and dpm_resume_early/noirq()
    ACPICA: Introduce acpi_enable_all_wakeup_gpes()
    ACPICA: Clear all non-wakeup GPEs in acpi_hw_enable_wakeup_gpe_block()
    ACPI / video: check _DOD list when creating backlight devices
    PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
    cpufreq: Replace strnicmp with strncasecmp
    cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec
    cpufreq: powernv: Set the pstate of the last hotplugged out cpu in policy->cpus to minimum
    cpufreq: Allow stop CPU callback to be used by all cpufreq drivers
    PM / devfreq: exynos: Enable building exynos PPMU as module
    PM / devfreq: Export helper functions for drivers
    ...

    Linus Torvalds
     

02 Oct, 2014

1 commit


25 Sep, 2014

1 commit


03 Sep, 2014

1 commit

  • Since commit de7d5f729c72 ("PCI/PM: Disable runtime PM of PCIe ports") the
    runtime PM support code for PCIe ports in portdrv_pci.c has never been
    used, so drop it entirely.

    If we are to support runtime PM of PCIe ports, it will have to be done in a
    different way most likely anyway.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Bjorn Helgaas

    Rafael J. Wysocki
     

01 Sep, 2014

1 commit

  • To make PCIe PME interrupts wake up the system from suspend to idle,
    make the PME driver use enable_irq_wake() on the IRQ during system
    suspend (if there are any wakeup devices below the given PCIe port)
    without disabling PME interrupts. This way, an interrupt will still
    trigger if a wakeup event happens and the system will be woken up (or
    system suspend in progress will be aborted) by means of the new
    mechanics introduced previously.

    This change allows Wake-on-LAN to be used for wakeup from
    suspend-to-idle on my MSI Wind tesbed netbook.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

05 Aug, 2014

1 commit

  • Pull RAS updates from Ingo Molnar:
    "The main changes in this cycle are:

    - RAS tracing/events infrastructure, by Gong Chen.

    - Various generalizations of the APEI code to make it available to
    non-x86 architectures, by Tomasz Nowicki"

    * 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/ras: Fix build warnings in
    acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context.
    acpi, apei, ghes: Make NMI error notification to be GHES architecture extension.
    apei, mce: Factor out APEI architecture specific MCE calls.
    RAS, extlog: Adjust init flow
    trace, eMCA: Add a knob to adjust where to save event log
    trace, RAS: Add eMCA trace event interface
    RAS, debugfs: Add debugfs interface for RAS subsystem
    CPER: Adjust code flow of some functions
    x86, MCE: Robustify mcheck_init_device
    trace, AER: Move trace into unified interface
    trace, RAS: Add basic RAS trace event
    x86, MCE: Kill CPU_POST_DEAD

    Linus Torvalds