05 Jan, 2015

4 commits


20 Dec, 2014

1 commit

  • Pull x86 apic updates from Thomas Gleixner:
    "After stopping the full x86/apic branch, I took some time to go
    through the first block of patches again, which are mostly cleanups
    and preparatory work for the irqdomain conversion and ioapic hotplug
    support.

    Unfortunaly one of the real problematic commits was right at the
    beginning, so I rebased this portion of the pending patches without
    the offenders.

    It would be great to get this into 3.19. That makes reworking the
    problematic parts simpler. The usual tip testing did not unearth any
    issues and it is fully bisectible now.

    I'm pretty confident that this wont affect the calmness of the xmas
    season.

    Changes:
    - Split the convoluted io_apic.c code into domain specific parts
    (vector, ioapic, msi, htirq)
    - Introduce proper helper functions to retrieve irq specific data
    instead of open coded dereferencing of pointers
    - Preparatory work for ioapic hotplug and irqdomain conversion
    - Removal of the non functional pci-ioapic driver
    - Removal of unused irq entry stubs
    - Make native_smp_prepare_cpus() preemtible to avoid GFP_ATOMIC
    allocations for everything which is called from there.
    - Small cleanups and fixes"

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    iommu/amd: Use helpers to access irq_cfg data structure associated with IRQ
    iommu/vt-d: Use helpers to access irq_cfg data structure associated with IRQ
    x86: irq_remapping: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Make MSI and HT_IRQ indepenent of X86_IO_APIC
    x86, irq: Move IRQ initialization routines from io_apic.c into vector.c
    x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h
    x86, irq: Move HT IRQ related code from io_apic.c into htirq.c
    x86, irq: Move PCI MSI related code from io_apic.c into msi.c
    x86, irq: Replace printk(KERN_LVL) with pr_lvl() utilities
    x86, irq: Make UP version of irq_complete_move() an inline stub
    x86, irq: Move local APIC related code from io_apic.c into vector.c
    x86, irq: Introduce helpers to access struct irq_cfg
    x86, irq: Protect __clear_irq_vector() with vector_lock
    x86, irq: Rename local APIC related functions in io_apic.c as apic_xxx()
    x86, irq: Refine hw_irq.h to prepare for irqdomain support
    x86, irq: Convert irq_2_pin list to generic list
    x86, irq: Kill useless parameter 'irq_attr' of IO_APIC_get_PCI_irq_vector()
    x86, irq, acpi: Get rid of special handling of GSI for ACPI SCI
    x86, irq: Introduce helper to check whether an IOAPIC has been registered
    ...

    Linus Torvalds
     

17 Dec, 2014

3 commits

  • Pull ARM SoC/iommu configuration update from Arnd Bergmann:
    "The iomm-config branch contains work from Will Deacon, quoting his
    description:

    This series adds automatic IOMMU and DMA-mapping configuration for
    OF-based DMA masters described using the generic IOMMU devicetree
    bindings. Although there is plenty of future work around splitting up
    iommu_ops, adding default IOMMU domains and sorting out automatic IOMMU
    group creation for the platform_bus, this is already useful enough for
    people to port over their IOMMU drivers and start using the new probing
    infrastructure (indeed, Marek has patches queued for the Exynos IOMMU).

    The branch touches core ARM and IOMMU driver files, and the respective
    maintainers (Russell King and Joerg Roedel) agreed to have the
    contents merged through the arm-soc tree.

    The final version was ready just before the merge window, so we ended
    up delaying it a bit longer than the rest, but we don't expect to see
    regressions because this is just additional infrastructure that will
    get used in drivers starting in 3.20 but is unused so far"

    * tag 'iommu-config-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    iommu: store DT-probed IOMMU data privately
    arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops
    arm: call iommu_init before of_platform_populate
    dma-mapping: detect and configure IOMMU in of_dma_configure
    iommu: fix initialization without 'add_device' callback
    iommu: provide helper function to configure an IOMMU for an of master
    iommu: add new iommu_ops callback for adding an OF device
    dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops
    iommu: provide early initialisation hook for IOMMU drivers

    Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "Here are the first arm-soc bug fixes. Most of these are OMAP related
    fixes for regressions or minor bugs. Aside from that, there are a few
    defconfig changes for various platforms"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    iommu/exynos: Fix arm64 allmodconfig build
    ARM: defconfigs: use CONFIG_CPUFREQ_DT
    ARM: omap2plus_defconfig: Enable AHCI_PLATFORM driver
    ARM: dts: am437x-sk-evm.dts: fix LCD timings
    ARM: dts: dra7-evm: Update SMPS7 (VDD_CORE) max voltage to match DM
    ARM: dts: dra7-evm: Fix typo in SMPS6 (VDD_GPU) max voltage
    ARM: OMAP2+: AM43x: Add ID for ES1.2
    ARM: dts: am437x-sk: fix lcd enable pin mux data
    ARM: dts: Fix gpmc regression for omap 2430sdp smc91x
    Revert "ARM: shmobile: multiplatform: add Audo DMAC peri peri support on defconfig"
    ARM: dts: dra7: fix DSS PLL clock mux registers
    ARM: dts: DRA7: wdt: Fix compatible property for watchdog node
    ARM: OMAP2+: clock: remove unused function prototype

    Linus Torvalds
     
  • The Exynos IOMMU driver uses the ARM specific dmac_flush_range() and
    outer_flush_range() functions. This breaks the build on arm64 allmodconfig
    in -next since support has been merged for some Exynos ARMv8 SoCs. Add a
    dependency on ARM to keep things building until either the driver has the
    ARM dependencies removed or the ARMv8 architecture code implements these
    ARM specific APIs.

    Signed-off-by: Mark Brown
    Signed-off-by: Arnd Bergmann

    Mark Brown
     

16 Dec, 2014

5 commits

  • Use helpers to access irq_cfg data structure associated with IRQ,
    instead of accessing irq_data->chip_data directly. Later we can
    rewrite those helpers to support hierarchy irqdomain.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Greg Kroah-Hartman
    Cc: iommu@lists.linux-foundation.org
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Joerg Roedel
    Link: http://lkml.kernel.org/r/1414397531-28254-20-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Use helpers to access irq_cfg data structure associated with IRQ,
    instead of accessing irq_data->chip_data directly. Later we can
    rewrite those helpers to support hierarchy irqdomain.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Greg Kroah-Hartman
    Cc: iommu@lists.linux-foundation.org
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Joerg Roedel
    Link: http://lkml.kernel.org/r/1414397531-28254-19-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Use helpers to access irq_cfg data structure associated with IRQ,
    instead of accessing irq_data->chip_data directly. Later we can
    rewrite those helpers to support hierarchy irqdomain.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Greg Kroah-Hartman
    Cc: iommu@lists.linux-foundation.org
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Joerg Roedel
    Link: http://lkml.kernel.org/r/1414397531-28254-18-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • …mmu into x86/apic-picks

    Required to apply Jiangs x86 irq handling rework without creating a
    nightmare of conflicts.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

    Thomas Gleixner
     
  • Pull drm updates from Dave Airlie:
    "Highlights:

    - AMD KFD driver merge

    This is the AMD HSA interface for exposing a lowlevel interface for
    GPGPU use. They have an open source userspace built on top of this
    interface, and the code looks as good as it was going to get out of
    tree.

    - Initial atomic modesetting work

    The need for an atomic modesetting interface to allow userspace to
    try and send a complete set of modesetting state to the driver has
    arisen, and been suffering from neglect this past year. No more,
    the start of the common code and changes for msm driver to use it
    are in this tree. Ongoing work to get the userspace ioctl finished
    and the code clean will probably wait until next kernel.

    - DisplayID 1.3 and tiled monitor exposed to userspace.

    Tiled monitor property is now exposed for userspace to make use of.

    - Rockchip drm driver merged.

    - imx gpu driver moved out of staging

    Other stuff:

    - core:
    panel - MIPI DSI + new panels.
    expose suggested x/y properties for virtual GPUs

    - i915:
    Initial Skylake (SKL) support
    gen3/4 reset work
    start of dri1/ums removal
    infoframe tracking
    fixes for lots of things.

    - nouveau:
    tegra k1 voltage support
    GM204 modesetting support
    GT21x memory reclocking work

    - radeon:
    CI dpm fixes
    GPUVM improvements
    Initial DPM fan control

    - rcar-du:
    HDMI support added
    removed some support for old boards
    slave encoder driver for Analog Devices adv7511

    - exynos:
    Exynos4415 SoC support

    - msm:
    a4xx gpu support
    atomic helper conversion

    - tegra:
    iommu support
    universal plane support
    ganged-mode DSI support

    - sti:
    HDMI i2c improvements

    - vmwgfx:
    some late fixes.

    - qxl:
    use suggested x/y properties"

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (969 commits)
    drm: sti: fix module compilation issue
    drm/i915: save/restore GMBUS freq across suspend/resume on gen4
    drm: sti: correctly cleanup CRTC and planes
    drm: sti: add HQVDP plane
    drm: sti: add cursor plane
    drm: sti: enable auxiliary CRTC
    drm: sti: fix delay in VTG programming
    drm: sti: prepare sti_tvout to support auxiliary crtc
    drm: sti: use drm_crtc_vblank_{on/off} instead of drm_vblank_{on/off}
    drm: sti: fix hdmi avi infoframe
    drm: sti: remove event lock while disabling vblank
    drm: sti: simplify gdp code
    drm: sti: clear all mixer control
    drm: sti: remove gpio for HDMI hot plug detection
    drm: sti: allow to change hdmi ddc i2c adapter
    drm/doc: Document drm_add_modes_noedid() usage
    drm/i915: Remove '& 0xffff' from the mask given to WA_REG()
    drm/i915: Invert the mask and val arguments in wa_add() and WA_REG()
    drm: Zero out DRM object memory upon cleanup
    drm/i915/bdw: Fix the write setting up the WIZ hashing mode
    ...

    Linus Torvalds
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

14 Dec, 2014

2 commits

  • Merge second patchbomb from Andrew Morton:
    - the rest of MM
    - misc fs fixes
    - add execveat() syscall
    - new ratelimit feature for fault-injection
    - decompressor updates
    - ipc/ updates
    - fallocate feature creep
    - fsnotify cleanups
    - a few other misc things

    * emailed patches from Andrew Morton : (99 commits)
    cgroups: Documentation: fix trivial typos and wrong paragraph numberings
    parisc: percpu: update comments referring to __get_cpu_var
    percpu: update local_ops.txt to reflect this_cpu operations
    percpu: remove __get_cpu_var and __raw_get_cpu_var macros
    fsnotify: remove destroy_list from fsnotify_mark
    fsnotify: unify inode and mount marks handling
    fallocate: create FAN_MODIFY and IN_MODIFY events
    mm/cma: make kmemleak ignore CMA regions
    slub: fix cpuset check in get_any_partial
    slab: fix cpuset check in fallback_alloc
    shmdt: use i_size_read() instead of ->i_size
    ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
    ipc/msg: increase MSGMNI, remove scaling
    ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
    ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
    lib/decompress.c: consistency of compress formats for kernel image
    decompress_bunzip2: off by one in get_next_block()
    usr/Kconfig: make initrd compression algorithm selection not expert
    fault-inject: add ratelimit option
    ratelimit: add initialization macro
    ...

    Linus Torvalds
     
  • This could be useful for debug in the future if we want to track
    major/minor faults more closely, and also avoids the put_page trick we
    used with gup.

    In order to do this, we also track the task struct in the PASID state
    structure. This lets us update the appropriate task stats after the fault
    has been handled, and may aid with debug in the future as well.

    Signed-off-by: Jesse Barnes
    Tested-by: Oded Gabbay
    Cc: Joerg Roedel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesse Barnes
     

13 Dec, 2014

1 commit

  • Pull IOMMU updates from Joerg Roedel:
    "This time with:

    - A new IOMMU-API call: iommu_map_sg() to map multiple non-contiguous
    pages into an IO address space with only one API call. This allows
    certain optimizations in the IOMMU driver.

    - DMAR device hotplug in the Intel VT-d driver. It is now possible
    to hotplug the IOMMU itself.

    - A new IOMMU driver for the Rockchip ARM platform.

    - Couple of cleanups and improvements in the OMAP IOMMU driver.

    - Nesting support for the ARM-SMMU driver.

    - Various other small cleanups and improvements.

    Please note that this time some branches were also pulled into other
    trees, like the DRI and the Tegra tree. The VT-d branch was also
    pulled into tip/x86/apic.

    Some patches for the AMD IOMMUv2 driver are not in the IOMMU tree but
    were merged by Andrew (or finally ended up in the DRI tree)"

    * tag 'iommu-updates-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (42 commits)
    iommu: Decouple iommu_map_sg from CPU page size
    iommu/vt-d: Fix an off-by-one bug in __domain_mapping()
    pci, ACPI, iommu: Enhance pci_root to support DMAR device hotplug
    iommu/vt-d: Enhance intel-iommu driver to support DMAR unit hotplug
    iommu/vt-d: Enhance error recovery in function intel_enable_irq_remapping()
    iommu/vt-d: Enhance intel_irq_remapping driver to support DMAR unit hotplug
    iommu/vt-d: Search for ACPI _DSM method for DMAR hotplug
    iommu/vt-d: Implement DMAR unit hotplug framework
    iommu/vt-d: Dynamically allocate and free seq_id for DMAR units
    iommu/vt-d: Introduce helper function dmar_walk_resources()
    iommu/arm-smmu: add support for DOMAIN_ATTR_NESTING attribute
    iommu/arm-smmu: Play nice on non-ARM/SMMU systems
    iommu/amd: remove compiler warning due to IOMMU_CAP_NOEXEC
    iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver
    iommu: add capability IOMMU_CAP_NOEXEC
    iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC
    iommu/amd: Fix accounting of device_state
    x86/vt-d: Fix incorrect bit operations in setting values
    iommu/rockchip: Allow to compile with COMPILE_TEST
    iommu/ipmmu-vmsa: Return proper error if devm_request_irq fails
    ...

    Linus Torvalds
     

11 Dec, 2014

1 commit

  • Pull irq domain updates from Thomas Gleixner:
    "The real interesting irq updates:

    - Support for hierarchical irq domains:

    For complex interrupt routing scenarios where more than one
    interrupt related chip is involved we had no proper representation
    in the generic interrupt infrastructure so far. That made people
    implement rather ugly constructs in their nested irq chip
    implementations. The main offenders are x86 and arm/gic.

    To distangle that mess we have now hierarchical irqdomains which
    seperate the various interrupt chips and connect them via the
    hierarchical domains. That keeps the domain specific details
    internal to the particular hierarchy level and removes the
    criss/cross referencing of chip internals. The resulting hierarchy
    for a complex x86 system will look like this:

    vector mapped: 74
    msi-0 mapped: 2
    dmar-ir-1 mapped: 69
    ioapic-1 mapped: 4
    ioapic-0 mapped: 20
    pci-msi-2 mapped: 45
    dmar-ir-0 mapped: 3
    ioapic-2 mapped: 1
    pci-msi-1 mapped: 2
    htirq mapped: 0

    Neither ioapic nor pci-msi know about the dmar interrupt remapping
    between themself and the vector domain. If interrupt remapping is
    disabled ioapic and pci-msi become direct childs of the vector
    domain.

    In hindsight we should have done that years ago, but in hindsight
    we always know better :)

    - Support for generic MSI interrupt domain handling

    We have more and more non PCI related MSI interrupts, so providing
    a generic infrastructure for this is better than having all
    affected architectures implementing their own private hacks.

    - Support for PCI-MSI interrupt domain handling, based on the generic
    MSI support.

    This part carries the pci/msi branch from Bjorn Helgaas pci tree to
    avoid a massive conflict. The PCI/MSI parts are acked by Bjorn.

    I have two more branches on top of this. The full conversion of x86
    to hierarchical domains and a partial conversion of arm/gic"

    * 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
    genirq: Move irq_chip_write_msi_msg() helper to core
    PCI/MSI: Allow an msi_controller to be associated to an irq domain
    PCI/MSI: Provide mechanism to alloc/free MSI/MSIX interrupt from irqdomain
    PCI/MSI: Enhance core to support hierarchy irqdomain
    PCI/MSI: Move cached entry functions to irq core
    genirq: Provide default callbacks for msi_domain_ops
    genirq: Introduce msi_domain_alloc/free_irqs()
    asm-generic: Add msi.h
    genirq: Add generic msi irq domain support
    genirq: Introduce callback irq_chip.irq_write_msi_msg
    genirq: Work around __irq_set_handler vs stacked domains ordering issues
    irqdomain: Introduce helper function irq_domain_add_hierarchy()
    irqdomain: Implement a method to automatically call parent domains alloc/free
    genirq: Introduce helper irq_domain_set_info() to reduce duplicated code
    genirq: Split out flow handler typedefs into seperate header file
    genirq: Add IRQ_SET_MASK_OK_DONE to support stacked irqchip
    genirq: Introduce irq_chip.irq_compose_msi_msg() to support stacked irqchip
    genirq: Add more helper functions to support stacked irq_chip
    genirq: Introduce helper functions to support stacked irq_chip
    irqdomain: Do irq_find_mapping and set_type for hierarchy irqdomain in case OF
    ...

    Linus Torvalds
     

08 Dec, 2014

1 commit


05 Dec, 2014

1 commit

  • Since the data pointer in the DT node is public and may be overwritten
    by conflicting code, move the DT-probed IOMMU ops to a private list
    where they will be safe.

    Acked-by: Grant Likely
    Signed-off-by: Robin Murphy
    [will: added missing #include and missing ')']
    Signed-off-by: Will Deacon

    Robin Murphy
     

04 Dec, 2014

1 commit

  • The memory controller on NVIDIA Tegra exposes various knobs that can be
    used to tune the behaviour of the clients attached to it.

    Currently this driver sets up the latency allowance registers to the HW
    defaults. Eventually an API should be exported by this driver (via a
    custom API or a generic subsystem) to allow clients to register latency
    requirements.

    This driver also registers an IOMMU (SMMU) that's implemented by the
    memory controller. It is supported on Tegra30, Tegra114 and Tegra124
    currently. Tegra20 has a GART instead.

    The Tegra SMMU operates on memory clients and SWGROUPs. A memory client
    is a unidirectional, special-purpose DMA master. A SWGROUP represents a
    set of memory clients that form a logical functional unit corresponding
    to a single device. Typically a device has two clients: one client for
    read transactions and one client for write transactions, but there are
    also devices that have only read clients, but many of them (such as the
    display controllers).

    Because there is no 1:1 relationship between memory clients and devices
    the driver keeps a table of memory clients and the SWGROUPs that they
    belong to per SoC. Note that this is an exception and due to the fact
    that the SMMU is tightly integrated with the rest of the Tegra SoC. The
    use of these tables is discouraged in drivers for generic IOMMU devices
    such as the ARM SMMU because the same IOMMU could be used in any number
    of SoCs and keeping such tables for each SoC would not scale.

    Acked-by: Joerg Roedel
    Signed-off-by: Thierry Reding

    Thierry Reding
     

02 Dec, 2014

6 commits

  • … 'x86/vt-d', 'x86/amd' and 'core' into next

    Conflicts:
    drivers/iommu/arm-smmu.c

    Joerg Roedel
     
  • If the IOMMU supports pages smaller than the CPU page size, segments
    which lie at offsets within the CPU page may be mapped based on the
    finer-grained IOMMU page boundaries. This minimises the amount of
    non-buffer memory between the CPU page boundary and the start of the
    segment which must be mapped and therefore exposed to the device, and
    brings the default iommu_map_sg implementation in line with
    iommu_map/unmap with respect to alignment.

    Signed-off-by: Robin Murphy
    Signed-off-by: Joerg Roedel

    Robin Murphy
     
  • There's an off-by-one bug in function __domain_mapping(), which may
    trigger the BUG_ON(nr_pages < lvl_pages) when
    (nr_pages + 1) & superpage_mask == 0

    The issue was introduced by commit 9051aa0268dc "intel-iommu: Combine
    domain_pfn_mapping() and domain_sg_mapping()", which sets sg_res to
    "nr_pages + 1" to avoid some of the 'sg_res==0' code paths.

    It's safe to remove extra "+1" because sg_res is only used to calculate
    page size now.

    Reported-And-Tested-by: Sudeep Dutt
    Signed-off-by: Jiang Liu
    Cc: # >= 3.0
    Acked-By: David Woodhouse
    Signed-off-by: Joerg Roedel

    Jiang Liu
     
  • IOMMU drivers can be initialized from of_iommu helpers. Such drivers don't
    need to provide device_add callbacks to operate properly, so there is no
    need to fail initialization if the callback is missing.

    Acked-by: Arnd Bergmann
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Will Deacon

    Marek Szyprowski
     
  • The generic IOMMU device-tree bindings can be used to add arbitrary OF
    masters to an IOMMU with a compliant binding.

    This patch introduces of_iommu_configure, which does exactly that.

    Acked-by: Arnd Bergmann
    Acked-by: Joerg Roedel
    Acked-by: Marek Szyprowski
    Tested-by: Robin Murphy
    Signed-off-by: Will Deacon

    Will Deacon
     
  • IOMMU drivers must be initialised before any of their upstream devices,
    otherwise the relevant iommu_ops won't be configured for the bus in
    question. To solve this, a number of IOMMU drivers use initcalls to
    initialise the driver before anything has a chance to be probed.

    Whilst this solves the immediate problem, it leaves the job of probing
    the IOMMU completely separate from the iommu_ops to configure the IOMMU,
    which are called on a per-bus basis and require the driver to figure out
    exactly which instance of the IOMMU is being requested. In particular,
    the add_device callback simply passes a struct device to the driver,
    which then has to parse firmware tables or probe buses to identify the
    relevant IOMMU instance.

    This patch takes the first step in addressing this problem by adding an
    early initialisation pass for IOMMU drivers, giving them the ability to
    store some per-instance data in their iommu_ops structure and store that
    in their of_node. This can later be used when parsing OF masters to
    identify the IOMMU instance in question.

    Acked-by: Arnd Bergmann
    Acked-by: Joerg Roedel
    Acked-by: Marek Szyprowski
    Tested-by: Robin Murphy
    Signed-off-by: Will Deacon

    Will Deacon
     

23 Nov, 2014

1 commit

  • Simplify PCI MSI code by initializing msi_desc.nvec_used and
    msi_desc.msi_attrib.multiple when creating MSI descriptors.

    Also remove redundant checks in IRQ remapping drivers, PCI MSI core
    already guarantees these.

    Signed-off-by: Jiang Liu
    Acked-by: Bjorn Helgaas
    Cc: Bjorn Helgaas
    Cc: Grant Likely
    Cc: Marc Zyngier
    Cc: Yingjoe Chen
    Cc: Yijing Wang
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

18 Nov, 2014

7 commits


14 Nov, 2014

5 commits

  • When domains are set with the DOMAIN_ATTR_NESTING flag, we must ensure
    that we allocate them to stage-2 context banks if the hardware permits
    it.

    This patch adds support for the attribute to the ARM SMMU driver, with
    the actual stage being determined depending on the features supported
    by the hardware.

    Signed-off-by: Will Deacon

    Will Deacon
     
  • Currently the driver registers IOMMU bus operations for all busses even
    if no ARM SMMU is present on a system. Depending on the driver probing
    order this prevents the driver for the real IOMMU to register itself as
    the bus-wide IOMMU.

    Signed-off-by: Thierry Reding
    Signed-off-by: Will Deacon

    Thierry Reding
     
  • Some versions of GCC get unduly upset when confronted with a switch
    that doesn't explicitly handle all cases of an enum, despite having an
    implicit default case following the actualy switch statement:

    drivers/iommu/amd_iommu.c: In function 'amd_iommu_capable':
    >> drivers/iommu/amd_iommu.c:3409:2: warning: enumeration value 'IOMMU_CAP_NOEXEC' not handled in switch [-Wswitch]
    switch (cap) {

    This patch adds a case for IOMMU_CAP_NOEXEC to the amd IOMMU driver to
    remove this warning.

    Cc: Joerg Roedel
    Signed-off-by: Will Deacon

    Will Deacon
     
  • The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the
    corresponding IOMMU capability.

    Signed-off-by: Antonios Motakis
    Signed-off-by: Will Deacon

    Antonios Motakis
     
  • Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of
    IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support
    the XN flag pages will always be executable.

    Signed-off-by: Antonios Motakis
    Acked-by: Joerg Roedel
    Signed-off-by: Will Deacon

    Antonios Motakis