15 Mar, 2019

1 commit


01 Mar, 2019

1 commit


11 Feb, 2019

1 commit


31 Jan, 2019

1 commit


24 Jan, 2019

1 commit

  • When a VM is terminated, the VFIO driver detaches all pass-through
    devices from VFIO domain by clearing domain id and page table root
    pointer from each device table entry (DTE), and then invalidates
    the DTE. Then, the VFIO driver unmap pages and invalidate IOMMU pages.

    Currently, the IOMMU driver keeps track of which IOMMU and how many
    devices are attached to the domain. When invalidate IOMMU pages,
    the driver checks if the IOMMU is still attached to the domain before
    issuing the invalidate page command.

    However, since VFIO has already detached all devices from the domain,
    the subsequent INVALIDATE_IOMMU_PAGES commands are being skipped as
    there is no IOMMU attached to the domain. This results in data
    corruption and could cause the PCI device to end up in indeterministic
    state.

    Fix this by invalidate IOMMU pages when detach a device, and
    before decrementing the per-domain device reference counts.

    Cc: Boris Ostrovsky
    Suggested-by: Joerg Roedel
    Co-developed-by: Brijesh Singh
    Signed-off-by: Brijesh Singh
    Signed-off-by: Suravee Suthikulpanit
    Fixes: 6de8ad9b9ee0 ('x86/amd-iommu: Make iommu_flush_pages aware of multiple IOMMUs')
    Signed-off-by: Joerg Roedel

    Suravee Suthikulpanit
     

22 Jan, 2019

2 commits

  • In the error path of map_sg there is an incorrect if condition
    for breaking out of the loop that searches the scatterlist
    for mapped pages to unmap. Instead of breaking out of the
    loop once all the pages that were mapped have been unmapped,
    it will break out of the loop after it has unmapped 1 page.
    Fix the condition, so it breaks out of the loop only after
    all the mapped pages have been unmapped.

    Fixes: 80187fd39dcb ("iommu/amd: Optimize map_sg and unmap_sg")
    Cc: Joerg Roedel
    Signed-off-by: Jerry Snitselaar
    Signed-off-by: Joerg Roedel

    Jerry Snitselaar
     
  • In the error path of map_sg, free_iova_fast is being called with
    address instead of the pfn. This results in a bad value getting into
    the rcache, and can result in hitting a BUG_ON when
    iova_magazine_free_pfns is called.

    Cc: Joerg Roedel
    Cc: Suravee Suthikulpanit
    Signed-off-by: Jerry Snitselaar
    Fixes: 80187fd39dcb ("iommu/amd: Optimize map_sg and unmap_sg")
    Signed-off-by: Joerg Roedel

    Jerry Snitselaar
     

02 Jan, 2019

1 commit

  • Pull IOMMU updates from Joerg Roedel:

    - Page table code for AMD IOMMU now supports large pages where smaller
    page-sizes were mapped before. VFIO had to work around that in the
    past and I included a patch to remove it (acked by Alex Williamson)

    - Patches to unmodularize a couple of IOMMU drivers that would never
    work as modules anyway.

    - Work to unify the the iommu-related pointers in 'struct device' into
    one pointer. This work is not finished yet, but will probably be in
    the next cycle.

    - NUMA aware allocation in iommu-dma code

    - Support for r8a774a1 and r8a774c0 in the Renesas IOMMU driver

    - Scalable mode support for the Intel VT-d driver

    - PM runtime improvements for the ARM-SMMU driver

    - Support for the QCOM-SMMUv2 IOMMU hardware from Qualcom

    - Various smaller fixes and improvements

    * tag 'iommu-updates-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (78 commits)
    iommu: Check for iommu_ops == NULL in iommu_probe_device()
    ACPI/IORT: Don't call iommu_ops->add_device directly
    iommu/of: Don't call iommu_ops->add_device directly
    iommu: Consolitate ->add/remove_device() calls
    iommu/sysfs: Rename iommu_release_device()
    dmaengine: sh: rcar-dmac: Use device_iommu_mapped()
    xhci: Use device_iommu_mapped()
    powerpc/iommu: Use device_iommu_mapped()
    ACPI/IORT: Use device_iommu_mapped()
    iommu/of: Use device_iommu_mapped()
    driver core: Introduce device_iommu_mapped() function
    iommu/tegra: Use helper functions to access dev->iommu_fwspec
    iommu/qcom: Use helper functions to access dev->iommu_fwspec
    iommu/of: Use helper functions to access dev->iommu_fwspec
    iommu/mediatek: Use helper functions to access dev->iommu_fwspec
    iommu/ipmmu-vmsa: Use helper functions to access dev->iommu_fwspec
    iommu/dma: Use helper functions to access dev->iommu_fwspec
    iommu/arm-smmu: Use helper functions to access dev->iommu_fwspec
    ACPI/IORT: Use helper functions to access dev->iommu_fwspec
    iommu: Introduce wrappers around dev->iommu_fwspec
    ...

    Linus Torvalds
     

14 Dec, 2018

1 commit


07 Dec, 2018

1 commit

  • The parameter is still there but it's ignored. We need to check its
    value before deciding to go into passthrough mode for AMD IOMMU v2
    capable device.

    We occasionally use this parameter to force v2 capable device into
    translation mode to debug memory corruption that we suspect is
    caused by DMA writes.

    To address the following comment from Joerg Roedel on the first
    version, v2 capability of device is completely ignored.
    > This breaks the iommu_v2 use-case, as it needs a direct mapping for the
    > devices that support it.

    And from Documentation/admin-guide/kernel-parameters.txt:
    This option does not override iommu=pt

    Fixes: aafd8ba0ca74 ("iommu/amd: Implement add_device and remove_device")

    Signed-off-by: Yu Zhao
    Signed-off-by: Joerg Roedel

    Yu Zhao
     

06 Dec, 2018

1 commit

  • Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let
    the core dma-mapping code handle the rest.

    Note that the existing code used AMD_IOMMU_MAPPING_ERROR to check from
    a 0 return from the IOVA allocator, which is replaced with an explicit
    0 as in the implementation and other users of that interface.

    Signed-off-by: Christoph Hellwig
    Acked-by: Linus Torvalds

    Christoph Hellwig
     

28 Nov, 2018

3 commits


15 Nov, 2018

6 commits


11 Oct, 2018

1 commit


08 Oct, 2018

1 commit

  • Recent gcc warns about switching on an enumeration, but not having
    an explicit case statement for all members of the enumeration. To
    show the compiler this is intentional, we simply add a default case
    with nothing more than a break statement.

    Signed-off-by: Lu Baolu
    Signed-off-by: Joerg Roedel

    Lu Baolu
     

05 Oct, 2018

1 commit

  • Boris Ostrovsky reported a memory leak with device passthrough when SME
    is active.

    The VFIO driver uses iommu_iova_to_phys() to get the physical address for
    an iova. This physical address is later passed into vfio_unmap_unpin() to
    unpin the memory. The vfio_unmap_unpin() uses pfn_valid() before unpinning
    the memory. The pfn_valid() check was failing because encryption mask was
    part of the physical address returned. This resulted in the memory not
    being unpinned and therefore leaked after the guest terminates.

    The memory encryption mask must be cleared from the physical address in
    iommu_iova_to_phys().

    Fixes: 2543a786aa25 ("iommu/amd: Allow the AMD IOMMU to work with memory encryption")
    Reported-by: Boris Ostrovsky
    Cc: Tom Lendacky
    Cc: Joerg Roedel
    Cc:
    Cc: Borislav Petkov
    Cc: Paolo Bonzini
    Cc: Radim Krčmář
    Cc: kvm@vger.kernel.org
    Cc: Boris Ostrovsky
    Cc: # 4.14+
    Signed-off-by: Brijesh Singh
    Signed-off-by: Joerg Roedel

    Singh, Brijesh
     

26 Sep, 2018

1 commit

  • ACPI HID devices do not actually have an alias for
    them in the IVRS. But dev_data->alias is still used
    for indexing into the IOMMU device table for devices
    being handled by the IOMMU. So for ACPI HID devices,
    we simply return the corresponding devid as an alias,
    as parsed from IVRS table.

    Signed-off-by: Arindam Nath
    Fixes: 2bf9a0a12749 ('iommu/amd: Add iommu support for ACPI HID devices')
    Signed-off-by: Joerg Roedel

    Arindam Nath
     

25 Aug, 2018

1 commit

  • Pull IOMMU updates from Joerg Roedel:

    - PASID table handling updates for the Intel VT-d driver. It implements
    a global PASID space now so that applications usings multiple devices
    will just have one PASID.

    - A new config option to make iommu passthroug mode the default.

    - New sysfs attribute for iommu groups to export the type of the
    default domain.

    - A debugfs interface (for debug only) usable by IOMMU drivers to
    export internals to user-space.

    - R-Car Gen3 SoCs support for the ipmmu-vmsa driver

    - The ARM-SMMU now aborts transactions from unknown devices and devices
    not attached to any domain.

    - Various cleanups and smaller fixes all over the place.

    * tag 'iommu-updates-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (42 commits)
    iommu/omap: Fix cache flushes on L2 table entries
    iommu: Remove the ->map_sg indirection
    iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel
    iommu/arm-smmu-v3: Prevent any devices access to memory without registration
    iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
    iommu/ipmmu-vmsa: Clarify supported platforms
    iommu/ipmmu-vmsa: Fix allocation in atomic context
    iommu: Add config option to set passthrough as default
    iommu: Add sysfs attribyte for domain type
    iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register
    iommu/arm-smmu: Error out only if not enough context interrupts
    iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE
    iommu/io-pgtable-arm: Fix pgtable allocation in selftest
    iommu/vt-d: Remove the obsolete per iommu pasid tables
    iommu/vt-d: Apply per pci device pasid table in SVA
    iommu/vt-d: Allocate and free pasid table
    iommu/vt-d: Per PCI device pasid table interfaces
    iommu/vt-d: Add for_each_device_domain() helper
    iommu/vt-d: Move device_domain_info to header
    iommu/vt-d: Apply global PASID in SVA
    ...

    Linus Torvalds
     

18 Aug, 2018

1 commit

  • The CMA memory allocator doesn't support standard gfp flags for memory
    allocation, so there is no point having it as a parameter for
    dma_alloc_from_contiguous() function. Replace it by a boolean no_warn
    argument, which covers all the underlaying cma_alloc() function
    supports.

    This will help to avoid giving false feeling that this function supports
    standard gfp flags and callers can pass __GFP_ZERO to get zeroed buffer,
    what has already been an issue: see commit dd65a941f6ba ("arm64:
    dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag").

    Link: http://lkml.kernel.org/r/20180709122020eucas1p21a71b092975cb4a3b9954ffc63f699d1~-sqUFoa-h2939329393eucas1p2Y@eucas1p2.samsung.com
    Signed-off-by: Marek Szyprowski
    Acked-by: Michał Nazarewicz
    Acked-by: Vlastimil Babka
    Reviewed-by: Christoph Hellwig
    Cc: Laura Abbott
    Cc: Michal Hocko
    Cc: Joonsoo Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marek Szyprowski
     

08 Aug, 2018

2 commits


20 Jul, 2018

1 commit

  • The WARN_ON() was introduced in commit 272e4f99e966 ("iommu/amd: WARN
    when __[attach|detach]_device are called with irqs enabled") to ensure
    that the domain->lock is taken in proper irqs disabled context. This
    is required, because the domain->lock is taken as well in irq
    context.

    The proper context check by the WARN_ON() is redundant, because it is
    already covered by LOCKDEP. When working with locks and changing
    context, a run with LOCKDEP is required anyway and would detect the
    wrong lock context.

    Furthermore all callers for those functions are within the same file
    and all callers acquire another lock which already disables interrupts.

    Signed-off-by: Anna-Maria Gleixner
    Signed-off-by: Joerg Roedel

    Anna-Maria Gleixner
     

06 Jul, 2018

3 commits

  • The AMD IOMMU XT mode enables interrupt remapping with 32-bit destination
    APIC ID, which is required for x2APIC. The feature is available when
    the XTSup bit is set in the IOMMU Extended Feature register
    and/or the IVHD Type 10h IOMMU Feature Reporting field.

    For more information, please see section "IOMMU x2APIC Support" of
    the AMD I/O Virtualization Technology (IOMMU) Specification.

    Cc: Joerg Roedel
    Signed-off-by: Suravee Suthikulpanit
    Signed-off-by: Joerg Roedel

    Suravee Suthikulpanit
     
  • Although the mapping has already been removed in the page table, it maybe
    still exist in TLB. Suppose the freed IOVAs is reused by others before the
    flush operation completed, the new user can not correctly access to its
    meomory.

    Signed-off-by: Zhen Lei
    Fixes: b1516a14657a ('iommu/amd: Implement flush queue')
    Signed-off-by: Joerg Roedel

    Zhen Lei
     
  • Argument "page_size" passing to function "fetch_pte" could be
    uninitialized if the function returns NULL

    The caller "iommu_unmap_page" checks the return value but the page_size is
    used outside the if block.

    Signed-off-by: yzhai003@ucr.edu
    Signed-off-by: Joerg Roedel

    yzhai003@ucr.edu
     

12 Jun, 2018

1 commit

  • This reverts commit b468620f2a1dfdcfddfd6fa54367b8bcc1b51248.

    It turns out that this broke drm on AMD platforms. Quoting Gabriel C:
    "I can confirm reverting b468620f2a1dfdcfddfd6fa54367b8bcc1b51248 fixes
    that issue for me.

    The GPU is working fine with SME enabled.

    Now with working GPU :) I can also confirm performance is back to
    normal without doing any other workarounds"

    Christan König analyzed it partially:
    "As far as I analyzed it we now get an -ENOMEM from dma_alloc_attrs()
    in drivers/gpu/drm/ttm/ttm_page_alloc_dma.c when IOMMU is enabled"

    and Christoph Hellwig responded:
    "I think the prime issue is that dma_direct_alloc respects the dma
    mask. Which we don't need if actually using the iommu. This would be
    mostly harmless exept for the the SEV bit high in the address that
    makes the checks fail.

    For now I'd say revert this commit for 4.17/4.18-rc and I'll look into
    addressing these issues properly"

    Reported-and-bisected-by: Gabriel C
    Acked-by: Christoph Hellwig
    Cc: Christian König
    Cc: Michel Dänzer
    Cc: Joerg Roedel
    Cc: Tom Lendacky
    Cc: Andrew Morton
    Cc: stable@kernel.org # v4.17
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

11 Jun, 2018

1 commit

  • Pull x86 updates and fixes from Thomas Gleixner:

    - Fix the (late) fallout from the vector management rework causing
    hlist corruption and irq descriptor reference leaks caused by a
    missing sanity check.

    The straight forward fix triggered another long standing issue to
    surface. The pre rework code hid the issue due to being way slower,
    but now the chance that user space sees an EBUSY error return when
    updating irq affinities is way higher, though quite a bunch of
    userspace tools do not handle it properly despite the fact that EBUSY
    could be returned for at least 10 years.

    It turned out that the EBUSY return can be avoided completely by
    utilizing the existing delayed affinity update mechanism for irq
    remapped scenarios as well. That's a bit more error handling in the
    kernel, but avoids fruitless fingerpointing discussions with tool
    developers.

    - Decouple PHYSICAL_MASK from AMD SME as its going to be required for
    the upcoming Intel memory encryption support as well.

    - Handle legacy device ACPI detection properly for newer platforms

    - Fix the wrong argument ordering in the vector allocation tracepoint

    - Simplify the IDT setup code for the APIC=n case

    - Use the proper string helpers in the MTRR code

    - Remove a stale unused VDSO source file

    - Convert the microcode update lock to a raw spinlock as its used in
    atomic context.

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/intel_rdt: Enable CMT and MBM on new Skylake stepping
    x86/apic/vector: Print APIC control bits in debugfs
    genirq/affinity: Defer affinity setting if irq chip is busy
    x86/platform/uv: Use apic_ack_irq()
    x86/ioapic: Use apic_ack_irq()
    irq_remapping: Use apic_ack_irq()
    x86/apic: Provide apic_ack_irq()
    genirq/migration: Avoid out of line call if pending is not set
    genirq/generic_pending: Do not lose pending affinity update
    x86/apic/vector: Prevent hlist corruption and leaks
    x86/vector: Fix the args of vector_alloc tracepoint
    x86/idt: Simplify the idt_setup_apic_and_irq_gates()
    x86/platform/uv: Remove extra parentheses
    x86/mm: Decouple dynamic __PHYSICAL_MASK from AMD SME
    x86: Mark native_set_p4d() as __always_inline
    x86/microcode: Make the late update update_lock a raw lock for RT
    x86/mtrr: Convert to use strncpy_from_user() helper
    x86/mtrr: Convert to use match_string() helper
    x86/vdso: Remove unused file
    x86/i8237: Register device based on FADT legacy boot flag

    Linus Torvalds
     

09 Jun, 2018

1 commit

  • Pull IOMMU updates from Joerg Roedel:
    "Nothing big this time. In particular:

    - Debugging code for Tegra-GART

    - Improvement in Intel VT-d fault printing to prevent soft-lockups
    when on fault storms

    - Improvements in AMD IOMMU event reporting

    - NUMA aware allocation in io-pgtable code for ARM

    - Various other small fixes and cleanups all over the place"

    * tag 'iommu-updates-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu/io-pgtable-arm: Make allocations NUMA-aware
    iommu/amd: Prevent possible null pointer dereference and infinite loop
    iommu/amd: Fix grammar of comments
    iommu: Clean up the comments for iommu_group_alloc
    iommu/vt-d: Remove unnecessary parentheses
    iommu/vt-d: Clean up pasid quirk for pre-production devices
    iommu/vt-d: Clean up unused variable in find_or_alloc_domain
    iommu/vt-d: Fix iotlb psi missing for mappings
    iommu/vt-d: Introduce __mapping_notify_one()
    iommu: Remove extra NULL check when call strtobool()
    iommu/amd: Update logging information for new event type
    iommu/amd: Update the PASID information printed to the system log
    iommu/tegra: gart: Fix gart_iommu_unmap()
    iommu/tegra: gart: Add debugging facility
    iommu/io-pgtable-arm: Use for_each_set_bit to simplify code
    iommu/qcom: Simplify getting .drvdata
    iommu: Remove depends on HAS_DMA in case of platform dependency
    iommu/vt-d: Ratelimit each dmar fault printing

    Linus Torvalds
     

08 Jun, 2018

1 commit

  • Pull PCI updates from Bjorn Helgaas:

    - unify AER decoding for native and ACPI CPER sources (Alexandru
    Gagniuc)

    - add TLP header info to AER tracepoint (Thomas Tai)

    - add generic pcie_wait_for_link() interface (Oza Pawandeep)

    - handle AER ERR_FATAL by removing and re-enumerating devices, as
    Downstream Port Containment does (Oza Pawandeep)

    - factor out common code between AER and DPC recovery (Oza Pawandeep)

    - stop triggering DPC for ERR_NONFATAL errors (Oza Pawandeep)

    - share ERR_FATAL recovery path between AER and DPC (Oza Pawandeep)

    - disable ASPM L1.2 substate if we don't have LTR (Bjorn Helgaas)

    - respect platform ownership of LTR (Bjorn Helgaas)

    - clear interrupt status in top half to avoid interrupt storm (Oza
    Pawandeep)

    - neaten pci=earlydump output (Andy Shevchenko)

    - avoid errors when extended config space inaccessible (Gilles Buloz)

    - prevent sysfs disable of device while driver attached (Christoph
    Hellwig)

    - use core interface to report PCIe link properties in bnx2x, bnxt_en,
    cxgb4, ixgbe (Bjorn Helgaas)

    - remove unused pcie_get_minimum_link() (Bjorn Helgaas)

    - fix use-before-set error in ibmphp (Dan Carpenter)

    - fix pciehp timeouts caused by Command Completed errata (Bjorn
    Helgaas)

    - fix refcounting in pnv_php hotplug (Julia Lawall)

    - clear pciehp Presence Detect and Data Link Layer Status Changed on
    resume so we don't miss hotplug events (Mika Westerberg)

    - only request pciehp control if we support it, so platform can use
    ACPI hotplug otherwise (Mika Westerberg)

    - convert SHPC to be builtin only (Mika Westerberg)

    - request SHPC control via _OSC if we support it (Mika Westerberg)

    - simplify SHPC handoff from firmware (Mika Westerberg)

    - fix an SHPC quirk that mistakenly included *all* AMD bridges as well
    as devices from any vendor with device ID 0x7458 (Bjorn Helgaas)

    - assign a bus number even to non-native hotplug bridges to leave
    space for acpiphp additions, to fix a common Thunderbolt xHCI
    hot-add failure (Mika Westerberg)

    - keep acpiphp from scanning native hotplug bridges, to fix common
    Thunderbolt hot-add failures (Mika Westerberg)

    - improve "partially hidden behind bridge" messages from core (Mika
    Westerberg)

    - add macros for PCIe Link Control 2 register (Frederick Lawler)

    - replace IB/hfi1 custom macros with PCI core versions (Frederick
    Lawler)

    - remove dead microblaze and xtensa code (Bjorn Helgaas)

    - use dev_printk() when possible in xtensa and mips (Bjorn Helgaas)

    - remove unused pcie_port_acpi_setup() and portdrv_acpi.c (Bjorn
    Helgaas)

    - add managed interface to get PCI host bridge resources from OF (Jan
    Kiszka)

    - add support for unbinding generic PCI host controller (Jan Kiszka)

    - fix memory leaks when unbinding generic PCI host controller (Jan
    Kiszka)

    - request legacy VGA framebuffer only for VGA devices to avoid false
    device conflicts (Bjorn Helgaas)

    - turn on PCI_COMMAND_IO & PCI_COMMAND_MEMORY in pci_enable_device()
    like everybody else, not in pcibios_fixup_bus() (Bjorn Helgaas)

    - add generic enable function for simple SR-IOV hardware (Alexander
    Duyck)

    - use generic SR-IOV enable for ena, nvme (Alexander Duyck)

    - add ACS quirk for Intel 7th & 8th Gen mobile (Alex Williamson)

    - add ACS quirk for Intel 300 series (Mika Westerberg)

    - enable register clock for Armada 7K/8K (Gregory CLEMENT)

    - reduce Keystone "link already up" log level (Fabio Estevam)

    - move private DT functions to drivers/pci/ (Rob Herring)

    - factor out dwc CONFIG_PCI Kconfig dependencies (Rob Herring)

    - add DesignWare support to the endpoint test driver (Gustavo
    Pimentel)

    - add DesignWare support for endpoint mode (Gustavo Pimentel)

    - use devm_ioremap_resource() instead of devm_ioremap() in dra7xx and
    artpec6 (Gustavo Pimentel)

    - fix Qualcomm bitwise NOT issue (Dan Carpenter)

    - add Qualcomm runtime PM support (Srinivas Kandagatla)

    - fix DesignWare enumeration below bridges (Koen Vandeputte)

    - use usleep() instead of mdelay() in endpoint test (Jia-Ju Bai)

    - add configfs entries for pci_epf_driver device IDs (Kishon Vijay
    Abraham I)

    - clean up pci_endpoint_test driver (Gustavo Pimentel)

    - update Layerscape maintainer email addresses (Minghuan Lian)

    - add COMPILE_TEST to improve build test coverage (Rob Herring)

    - fix Hyper-V bus registration failure caused by domain/serial number
    confusion (Sridhar Pitchai)

    - improve Hyper-V refcounting and coding style (Stephen Hemminger)

    - avoid potential Hyper-V hang waiting for a response that will never
    come (Dexuan Cui)

    - implement Mediatek chained IRQ handling (Honghui Zhang)

    - fix vendor ID & class type for Mediatek MT7622 (Honghui Zhang)

    - add Mobiveil PCIe host controller driver (Subrahmanya Lingappa)

    - add Mobiveil MSI support (Subrahmanya Lingappa)

    - clean up clocks, MSI, IRQ mappings in R-Car probe failure paths
    (Marek Vasut)

    - poll more frequently (5us vs 5ms) while waiting for R-Car data link
    active (Marek Vasut)

    - use generic OF parsing interface in R-Car (Vladimir Zapolskiy)

    - add R-Car V3H (R8A77980) "compatible" string (Sergei Shtylyov)

    - add R-Car gen3 PHY support (Sergei Shtylyov)

    - improve R-Car PHYRDY polling (Sergei Shtylyov)

    - clean up R-Car macros (Marek Vasut)

    - use runtime PM for R-Car controller clock (Dien Pham)

    - update arm64 defconfig for Rockchip (Shawn Lin)

    - refactor Rockchip code to facilitate both root port and endpoint
    mode (Shawn Lin)

    - add Rockchip endpoint mode driver (Shawn Lin)

    - support VMD "membar shadow" feature (Jon Derrick)

    - support VMD bus number offsets (Jon Derrick)

    - add VMD "no AER source ID" quirk for more device IDs (Jon Derrick)

    - remove unnecessary host controller CONFIG_PCIEPORTBUS Kconfig
    selections (Bjorn Helgaas)

    - clean up quirks.c organization and whitespace (Bjorn Helgaas)

    * tag 'pci-v4.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (144 commits)
    PCI/AER: Replace struct pcie_device with pci_dev
    PCI/AER: Remove unused parameters
    PCI: qcom: Include gpio/consumer.h
    PCI: Improve "partially hidden behind bridge" log message
    PCI: Improve pci_scan_bridge() and pci_scan_bridge_extend() doc
    PCI: Move resource distribution for single bridge outside loop
    PCI: Account for all bridges on bus when distributing bus numbers
    ACPI / hotplug / PCI: Drop unnecessary parentheses
    ACPI / hotplug / PCI: Mark stale PCI devices disconnected
    ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug
    PCI: hotplug: Add hotplug_is_native()
    PCI: shpchp: Add shpchp_is_native()
    PCI: shpchp: Fix AMD POGO identification
    PCI: mobiveil: Add MSI support
    PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver
    PCI/AER: Decode Error Source Requester ID
    PCI/AER: Remove aer_recover_work_func() forward declaration
    PCI/DPC: Use the generic pcie_do_fatal_recovery() path
    PCI/AER: Pass service type to pcie_do_fatal_recovery()
    PCI/DPC: Disable ERR_NONFATAL handling by DPC
    ...

    Linus Torvalds
     

06 Jun, 2018

1 commit

  • To address the EBUSY fail of interrupt affinity settings in case that the
    previous setting has not been cleaned up yet, use the new apic_ack_irq()
    function instead of the special ir_ack_apic_edge() implementation which is
    merily a wrapper around ack_APIC_irq().

    Preparatory change for the real fix

    Fixes: dccfe3147b42 ("x86/vector: Simplify vector move cleanup")
    Signed-off-by: Thomas Gleixner
    Tested-by: Song Liu
    Cc: Joerg Roedel
    Cc: Peter Zijlstra
    Cc: Song Liu
    Cc: Dmitry Safonov
    Cc: stable@vger.kernel.org
    Cc: Mike Travis
    Cc: Borislav Petkov
    Cc: Tariq Toukan
    Link: https://lkml.kernel.org/r/20180604162224.555716895@linutronix.de

    Thomas Gleixner
     

29 May, 2018

1 commit


15 May, 2018

2 commits

  • The check for !dev_data->domain in __detach_device() emits a warning and
    returns. The calling code in detach_device() dereferences dev_data->domain
    afterwards unconditionally, so in case that dev_data->domain is NULL the
    warning will be immediately followed by a NULL pointer dereference.

    The calling code in cleanup_domain() loops infinite when !dev_data->domain
    and the check in __detach_device() returns immediately because dev_list is
    not changed.

    do_detach() duplicates this check without throwing a warning.

    Move the check with the explanation of the do_detach() code into the caller
    detach_device() and return immediately. Throw an error, when hitting the
    condition in cleanup_domain().

    Signed-off-by: Anna-Maria Gleixner
    Signed-off-by: Joerg Roedel

    Anna-Maria Gleixner
     
  • Suggested-by: Gary R Hook
    Signed-off-by: Anna-Maria Gleixner
    Signed-off-by: Joerg Roedel

    Anna-Maria Gleixner