Skip to content
  1. Dec 04, 2014
    • Thierry Reding's avatar
      ARM: tegra: Enable IOMMU for display controllers on Tegra114 · 32215e71
      Thierry Reding authored
      
      
      Add iommus properties to the device tree nodes for the two display
      controllers found on Tegra114. This will allow the display controllers
      to map physically non-contiguous buffers to I/O virtual contiguous
      address spaces so that they can be used for scan-out.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      32215e71
    • Thierry Reding's avatar
      ARM: tegra: Enable IOMMU for display controllers on Tegra30 · 6d9adf6f
      Thierry Reding authored
      
      
      Add iommus properties to the device tree nodes for the two display
      controllers found on Tegra30. This will allow the display controllers to
      map physically non-contiguous buffers to I/O virtual contiguous address
      spaces so that they can be used for scan-out.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      6d9adf6f
    • Thierry Reding's avatar
      ARM: tegra: Add memory controller support for Tegra124 · b26ea06b
      Thierry Reding authored
      
      
      Add the memory controller and wire up the interrupt that is used to
      report errors. Provide a reference to the memory controller clock and
      mark the device as being an IOMMU by adding an #iommu-cells property.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      b26ea06b
    • Thierry Reding's avatar
      ARM: tegra: Add memory controller support for Tegra114 · c6f70a4d
      Thierry Reding authored
      
      
      Add the device tree node for the memory controller found on Tegra114
      SoCs. The memory controller integrates an IOMMU (called SMMU) as well as
      various knobs to tweak memory accesses by the various clients.
      
      The old IOMMU device tree node is collapsed into the memory controller
      node to more accurately describe the hardware. While this change is
      incompatible, the IOMMU driver has never had any users so the change is
      not going to cause any breakage.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      c6f70a4d
    • Thierry Reding's avatar
      ARM: tegra: Add memory controller support for Tegra30 · a9fe468f
      Thierry Reding authored
      
      
      Collapses the old memory-controller and IOMMU device tree nodes into a
      single node to more accurately describe the hardware.
      
      While this is an incompatible change there are no users of the IOMMU on
      Tegra, even though a driver has existed for some time.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      a9fe468f
    • Sean Paul's avatar
      ARM: tegra: Add APB_MISC_GP as a MIPI pad control bank · 49727d30
      Sean Paul authored
      
      
      This patch adds the APB_MISC_GP_MIPI_PAD_CTRL_0 as a pin-control bank on
      Tegra124 so the new MIPI pad control group can be muxed between CSI and
      DSI_B.
      
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      49727d30
    • Thierry Reding's avatar
      f538c509
    • Thierry Reding's avatar
      memory: Add NVIDIA Tegra memory controller support · 89184651
      Thierry Reding authored
      
      
      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: default avatarJoerg Roedel <jroedel@suse.de>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      89184651
  2. Nov 26, 2014
  3. Nov 18, 2014
  4. Nov 04, 2014
    • Heiko Stübner's avatar
      iommu: Improve error handling when setting bus iommu · d7da6bdc
      Heiko Stübner authored
      
      
      When some part of bus_set_iommu fails it should undo any made changes
      and not simply leave everything as is.
      
      This includes unregistering the bus notifier in iommu_bus_init when
      add_iommu_group fails and also setting the bus->iommu_ops back to NULL.
      
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      d7da6bdc
    • Joerg Roedel's avatar
      iommu: Do more input validation in iommu_map_sg() · 38ec010d
      Joerg Roedel authored
      
      
      The IOMMU-API works on page boundarys, unlike the DMA-API
      which can work with sub-page buffers. The sg->offset
      field does not make sense on the IOMMU level, so force it to
      be 0. Do some error-path consolidation while at it.
      
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      38ec010d
    • Olav Haugan's avatar
      iommu: Add iommu_map_sg() function · 315786eb
      Olav Haugan authored
      
      
      Mapping and unmapping are more often than not in the critical path.
      map_sg allows IOMMU driver implementations to optimize the process
      of mapping buffers into the IOMMU page tables.
      
      Instead of mapping a buffer one page at a time and requiring potentially
      expensive TLB operations for each page, this function allows the driver
      to map all pages in one go and defer TLB maintenance until after all
      pages have been mapped.
      
      Additionally, the mapping operation would be faster in general since
      clients does not have to keep calling map API over and over again for
      each physically contiguous chunk of memory that needs to be mapped to a
      virtually contiguous region.
      
      Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      315786eb
  5. Nov 03, 2014
  6. Nov 02, 2014
    • Paolo Bonzini's avatar
      KVM: vmx: defer load of APIC access page address during reset · a73896cb
      Paolo Bonzini authored
      
      
      Most call paths to vmx_vcpu_reset do not hold the SRCU lock.  Defer loading
      the APIC access page to the next vmentry.
      
      This avoids the following lockdep splat:
      
      [ INFO: suspicious RCU usage. ]
      3.18.0-rc2-test2+ #70 Not tainted
      -------------------------------
      include/linux/kvm_host.h:474 suspicious rcu_dereference_check() usage!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      1 lock held by qemu-system-x86/2371:
       #0:  (&vcpu->mutex){+.+...}, at: [<ffffffffa037d800>] vcpu_load+0x20/0xd0 [kvm]
      
      stack backtrace:
      CPU: 4 PID: 2371 Comm: qemu-system-x86 Not tainted 3.18.0-rc2-test2+ #70
      Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A12 01/10/2013
       0000000000000001 ffff880209983ca8 ffffffff816f514f 0000000000000000
       ffff8802099b8990 ffff880209983cd8 ffffffff810bd687 00000000000fee00
       ffff880208a2c000 ffff880208a10000 ffff88020ef50040 ffff880209983d08
      Call Trace:
       [<ffffffff816f514f>] dump_stack+0x4e/0x71
       [<ffffffff810bd687>] lockdep_rcu_suspicious+0xe7/0x120
       [<ffffffffa037d055>] gfn_to_memslot+0xd5/0xe0 [kvm]
       [<ffffffffa03807d3>] __gfn_to_pfn+0x33/0x60 [kvm]
       [<ffffffffa0380885>] gfn_to_page+0x25/0x90 [kvm]
       [<ffffffffa038aeec>] kvm_vcpu_reload_apic_access_page+0x3c/0x80 [kvm]
       [<ffffffffa08f0a9c>] vmx_vcpu_reset+0x20c/0x460 [kvm_intel]
       [<ffffffffa039ab8e>] kvm_vcpu_reset+0x15e/0x1b0 [kvm]
       [<ffffffffa039ac0c>] kvm_arch_vcpu_setup+0x2c/0x50 [kvm]
       [<ffffffffa037f7e0>] kvm_vm_ioctl+0x1d0/0x780 [kvm]
       [<ffffffff810bc664>] ? __lock_is_held+0x54/0x80
       [<ffffffff812231f0>] do_vfs_ioctl+0x300/0x520
       [<ffffffff8122ee45>] ? __fget+0x5/0x250
       [<ffffffff8122f0fa>] ? __fget_light+0x2a/0xe0
       [<ffffffff81223491>] SyS_ioctl+0x81/0xa0
       [<ffffffff816fed6d>] system_call_fastpath+0x16/0x1b
      
      Reported-by: default avatarTakashi Iwai <tiwai@suse.de>
      Reported-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
      Reviewed-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
      Tested-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
      Fixes: 38b99173
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a73896cb
    • Jan Kiszka's avatar
      KVM: nVMX: Disable preemption while reading from shadow VMCS · 282da870
      Jan Kiszka authored
      
      
      In order to access the shadow VMCS, we need to load it. At this point,
      vmx->loaded_vmcs->vmcs and the actually loaded one start to differ. If
      we now get preempted by Linux, vmx_vcpu_put and, on return, the
      vmx_vcpu_load will work against the wrong vmcs. That can cause
      copy_shadow_to_vmcs12 to corrupt the vmcs12 state.
      
      Fix the issue by disabling preemption during the copy operation.
      copy_vmcs12_to_shadow is safe from this issue as it is executed by
      vmx_vcpu_run when preemption is already disabled before vmentry.
      
      This bug is exposed by running Jailhouse within KVM on CPUs with
      shadow VMCS support.  Jailhouse never expects an interrupt pending
      vmexit, but the bug can cause it if, after copy_shadow_to_vmcs12
      is preempted, the active VMCS happens to have the virtual interrupt
      pending flag set in the CPU-based execution controls.
      
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      282da870
    • Nadav Amit's avatar
      KVM: x86: Fix far-jump to non-canonical check · 7e46dddd
      Nadav Amit authored
      
      
      Commit d1442d85 ("KVM: x86: Handle errors when RIP is set during far
      jumps") introduced a bug that caused the fix to be incomplete.  Due to
      incorrect evaluation, far jump to segment with L bit cleared (i.e., 32-bit
      segment) and RIP with any of the high bits set (i.e, RIP[63:32] != 0) set may
      not trigger #GP.  As we know, this imposes a security problem.
      
      In addition, the condition for two warnings was incorrect.
      
      Fixes: d1442d85
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
      [Add #ifdef CONFIG_X86_64 to avoid complaints of undefined behavior. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7e46dddd
    • Dave Airlie's avatar
      Merge branch 'vmwgfx-fixes-3.18' of git://people.freedesktop.org/~thomash/linux · 10a8fce8
      Dave Airlie authored
      A critical 3.18 regression fix from Rob, (thanks!)
      A fix to avoid advertizing modes we can't support from Sinclair
        (welcome Sinclair!)
      and a fix for an incorrect  hash key computation from me that is
        completely harmless, but can wait 'til the next merge window if necessary.
        (I can't really bother stable with this one).
      
      * 'vmwgfx-fixes-3.18' of git://people.freedesktop.org/~thomash/linux:
        drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
        drm/vmwgfx: Fix hash key computation
        drm/vmwgfx: fix lock breakage
      10a8fce8
    • Linus Torvalds's avatar
      Merge tag 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 12d7aaca
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are some staging driver fixes for 3.18-rc3.  Mostly iio and
        comedi driver fixes for issues reported by people.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: fix memory leak / bad pointer freeing for chanlist
        staging: comedi: Kconfig: fix config COMEDI_ADDI_APCI_3120 dependants
        staging: comedi: widen subdevice number argument in ioctl handlers
        staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage
        drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM
        staging: comedi: (regression) channel list must be set for COMEDI_CMD ioctl
        iio: adc: mxs-lradc: Disable the clock on probe failure
        iio: st_sensors: Fix buffer copy
        staging:iio:ad5933: Drop "raw" from channel names
        staging:iio:ad5933: Fix NULL pointer deref when enabling buffer
      12d7aaca
    • Linus Torvalds's avatar
      Merge tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 528a506e
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a bunch of USB fixes for 3.18-rc3.
      
        Mostly usb-serial device ids and gadget fixes for issues that have
        been reported.  Full details are in the shortlog.
      
        All of these have been in linux-next for a while"
      
      * tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits)
        usb: chipidea: Fix oops when removing the ci_hdrc module
        usb: gadget: function: Fixed the return value on error path
        usb: dwc2: gadget: disable phy before turning off power regulators
        usb: gadget: function: Remove redundant usb_free_all_descriptors
        usb: dwc3: gadget: Properly initialize LINK TRB
        usb: dwc2: gadget: fix gadget unregistration in udc_stop() function
        usb: dwc2: Bits in bitfield should add up to 32
        usb: dwc2: gadget: sparse warning of context imbalance
        usb: gadget: udc: core: fix kernel oops with soft-connect
        usb: musb: musb_dsps: fix NULL pointer in suspend
        usb: musb: dsps: start OTG timer on resume again
        usb: gadget: loopback: don't queue requests to bogus endpoints
        usb: ffs: fix regression when quirk_ep_out_aligned_size flag is set
        usb: gadget: f_fs: remove redundant ffs_data_get()
        usb: gadget: udc: USB_GADGET_XILINX should depend on HAS_DMA
        Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"
        usb: gadget: composite: enable BESL support
        usb: musb: cppi41: restart hrtimer only if not yet done
        usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSize
        usb: serial: ftdi_sio: add "bricked" FTDI device PID
        ...
      528a506e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 4f4274af
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Filipe is nailing down some problems with our skinny extent variation,
        and Dave's patch fixes endian problems in the new super block checks"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix race that makes btrfs_lookup_extent_info miss skinny extent items
        Btrfs: properly clean up btrfs_end_io_wq_cache
        Btrfs: fix invalid leaf slot access in btrfs_lookup_extent()
        btrfs: use macro accessors in superblock validation checks
      4f4274af