Skip to content
  1. Dec 04, 2014
    • 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
  7. Nov 01, 2014
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 9f935675
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
       "A bunch of fixes for minor defects reported by Coverity, a few driver
        fixups and revert of i8042.nomux change so that we are once again
        enable active MUX mode if box claims to support it"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: i8042 - disable active multiplexing by default"
        Input: altera_ps2 - use correct type for irq return value
        Input: altera_ps2 - write to correct register when disabling interrupts
        Input: max77693-haptic - fix potential overflow
        Input: psmouse - remove unneeded check in psmouse_reconnect()
        Input: vsxxxaa - fix code dropping bytes from queue
        Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store()
        Input: opencores-kbd - fix error handling
        Input: wm97xx - adapt parameters to tosa touchscreen.
        Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544
        Input: stmpe-keypad - fix valid key line bitmask
        Input: soc_button_array - update calls to gpiod_get*()
      9f935675
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ab01f963
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are fixes received after my previous pull request plus one that
        has been in the works for quite a while, but its previous version
        caused problems to happen, so it's been deferred till now.
      
        Fixed are two recent regressions (MFD enumeration and cpufreq-dt),
        ACPI EC regression introduced in 3.17, system suspend error code path
        regression introduced in 3.15, an older bug related to recovery from
        failing resume from hibernation and a cpufreq-dt driver issue related
        to operation performance points.
      
        Specifics:
      
         - Fix a crash on r8a7791/koelsch during resume from system suspend
           caused by a recent cpufreq-dt commit (Geert Uytterhoeven).
      
         - Fix an MFD enumeration problem introduced by a recent commit adding
           ACPI support to the MFD subsystem that exposed a weakness in the
           ACPI core causing ACPI enumeration to be applied to all devices
           associated with one ACPI companion object, although it should be
           used for one of them only (Mika Westerberg).
      
         - Fix an ACPI EC regression introduced during the 3.17 cycle causing
           some Samsung laptops to misbehave as a result of a workaround
           targeted at some Acer machines.  That includes a revert of a commit
           that went too far and a quirk for the Acer machines in question.
           From Lv Zheng.
      
         - Fix a regression in the system suspend error code path introduced
           during the 3.15 cycle that causes it to fail to take errors from
           asychronous execution of "late" suspend callbacks into account
           (Imre Deak).
      
         - Fix a long-standing bug in the hibernation resume error code path
           that fails to roll back everything correcty on "freeze" callback
           errors and leaves some devices in a "suspended" state causing more
           breakage to happen subsequently (Imre Deak).
      
         - Make the cpufreq-dt driver disable operation performance points
           that are not supported by the VR connected to the CPU voltage plane
           with acceptable tolerance instead of constantly failing voltage
           scaling later on (Lucas Stach)"
      
      * tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / EC: Fix regression due to conflicting firmware behavior between Samsung and Acer.
        Revert "ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC"
        cpufreq: cpufreq-dt: Restore default cpumask_setall(policy->cpus)
        PM / Sleep: fix recovery during resuming from hibernation
        PM / Sleep: fix async suspend_late/freeze_late error handling
        ACPI: Use ACPI companion to match only the first physical device
        cpufreq: cpufreq-dt: disable unsupported OPPs
      ab01f963
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 08da742e
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "These changes, intended for v3.18, fix:
      
        Sysfs
          - Fix "enable" filename change (Greg Kroah-Hartman)
      
            An unintentional sysfs filename change in commit 5136b2da
            ("PCI: convert bus code to use dev_groups"), which appeared in
            v3.13, changed "enable" to "enabled", and this changes it back.
      
            Old users of "enable" are currently broken and will be helped by
            this change.  Anything that started to use "enabled" after v3.13
            will be broken by this change.  If necessary, we can add a symlink
            to make both work, but this patch doesn't do that.
      
        PCI device hotplug
          - Revert duplicate merge (Kamal Mostafa)
      
            A mistaken duplicate merge that added a check twice.  Nothing's
            broken; this just removes the unnecessary code.
      
        Freescale i.MX6
          - Wait for clocks to stabilize after ref_en (Richard Zhu)
      
            An i.MX6 clock problem that prevents mx6 nitrogen boards from booting"
      
      * tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Rename sysfs 'enabled' file back to 'enable'
        PCI: imx6: Wait for clocks to stabilize after ref_en
        Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe"
      08da742e
    • Andy Lutomirski's avatar
      x86_64, entry: Fix out of bounds read on sysenter · 653bc77a
      Andy Lutomirski authored
      
      
      Rusty noticed a Really Bad Bug (tm) in my NT fix.  The entry code
      reads out of bounds, causing the NT fix to be unreliable.  But, and
      this is much, much worse, if your stack is somehow just below the
      top of the direct map (or a hole), you read out of bounds and crash.
      
      Excerpt from the crash:
      
      [    1.129513] RSP: 0018:ffff88001da4bf88  EFLAGS: 00010296
      
        2b:*    f7 84 24 90 00 00 00     testl  $0x4000,0x90(%rsp)
      
      That read is deterministically above the top of the stack.  I
      thought I even single-stepped through this code when I wrote it to
      check the offset, but I clearly screwed it up.
      
      Fixes: 8c7aa698 ("x86_64, entry: Filter RFLAGS.NT on entry from userspace")
      Reported-by: default avatarRusty Russell <rusty@ozlabs.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      653bc77a