1. 28 4月, 2016 6 次提交
  2. 23 4月, 2016 1 次提交
  3. 22 4月, 2016 27 次提交
  4. 21 4月, 2016 6 次提交
    • R
      iommu/arm-smmu: Don't allocate resources for bypass domains · 9800699c
      Robin Murphy 提交于
      Until we get fully plumbed into of_iommu_configure, our default
      IOMMU_DOMAIN_DMA domains just bypass translation. Since we achieve that
      by leaving the stream table entries set to bypass instead of pointing at
      a translation context, the context bank we allocate for the domain is
      completely wasted. Context banks are typically a rather limited
      resource, so don't hog ones we don't need.
      Reported-by: NEric Auger <eric.auger@linaro.org>
      Tested-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      9800699c
    • W
      iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA · 5f634956
      Will Deacon 提交于
      Commit cbf8277e ("iommu/arm-smmu: Treat IOMMU_DOMAIN_DMA as bypass
      for now") ignores requests to attach a device to the default domain
      since, without IOMMU-basked DMA ops available everywhere, the default
      domain will just lead to unexpected transaction faults being reported.
      
      Unfortunately, the way this was implemented on SMMUv2 causes a
      regression with VFIO PCI device passthrough under KVM on AMD Seattle.
      On this system, the host controller device is associated with both a
      pci_dev *and* a platform_device, and can therefore end up with duplicate
      SMR entries, resulting in a stream-match conflict at runtime.
      
      This patch amends the original fix so that attaching to IOMMU_DOMAIN_DMA
      is rejected even before configuring the SMRs. This restores the old
      behaviour for now, but we'll need to look at handing host controllers
      specially when we come to supporting the default domain fully.
      Reported-by: NEric Auger <eric.auger@linaro.org>
      Tested-by: NEric Auger <eric.auger@linaro.org>
      Tested-by: NYang Shi <yang.shi@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      5f634956
    • L
      drivers/perf: arm-pmu: fix RCU usage on pmu resume from low-power · cbcc72e0
      Lorenzo Pieralisi 提交于
      Commit da4e4f18 ("drivers/perf: arm_pmu: implement CPU_PM notifier")
      added code in the arm perf infrastructure that allows the kernel to
      save/restore perf counters whenever the CPU enters a low-power
      state. The kernel saves/restores the counters for each active event
      through the armpmu_{stop/start} ARM pmu API, so that the low-power state
      enter/exit cycle is emulated through pmu start/stop operations for each
      event in use.
      
      However, calling armpmu_start() for each active event on power up
      executes code that requires RCU locking (perf_event_update_userpage())
      to be functional, so, given that the core may call the CPU_PM notifiers
      while running the idle thread in an quiescent RCU state this is not
      allowed as detected through the following splat when kernel is run with
      CONFIG_PROVE_LOCKING enabled:
      
      [   49.293286]
      [   49.294761] ===============================
      [   49.298895] [ INFO: suspicious RCU usage. ]
      [   49.303031] 4.6.0-rc3+ #421 Not tainted
      [   49.306821] -------------------------------
      [   49.310956] include/linux/rcupdate.h:872 rcu_read_lock() used
      illegally while idle!
      [   49.318530]
      [   49.318530] other info that might help us debug this:
      [   49.318530]
      [   49.326451]
      [   49.326451] RCU used illegally from idle CPU!
      [   49.326451] rcu_scheduler_active = 1, debug_locks = 0
      [   49.337209] RCU used illegally from extended quiescent state!
      [   49.342892] 2 locks held by swapper/2/0:
      [   49.346768]  #0:  (cpu_pm_notifier_lock){......}, at:
      [<ffffff8008163c28>] cpu_pm_exit+0x18/0x80
      [   49.355492]  #1:  (rcu_read_lock){......}, at: [<ffffff800816dc38>]
      perf_event_update_userpage+0x0/0x260
      
      This patch wraps the armpmu_start() call (that indirectly calls
      perf_event_update_userpage()) on CPU_PM notifier power state exit (or
      failed entry) within the RCU_NONIDLE() macro so that the RCU subsystem
      is made aware the calling cpu is not idle from an RCU perspective for
      the armpmu_start() call duration, therefore fixing the issue.
      
      Fixes: da4e4f18 ("drivers/perf: arm_pmu: implement CPU_PM notifier")
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reported-by: NJames Morse <james.morse@arm.com>
      Suggested-by: NKevin Hilman <khilman@baylibre.com>
      Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      cbcc72e0
    • J
      thermal: fix Mediatek thermal controller build · a6f4850d
      Johannes Berg 提交于
      At least with CONFIG_COMPILE_TEST, there's no reason to assume
      that CONFIG_RESET_CONTROLLER is set, but the code for this
      controller requires it since it calls device_reset().
      
      Make CONFIG_MTK_THERMAL properly depend on CONFIG_RESET_CONTROLLER.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      a6f4850d
    • W
      thermal: consistently use int for trip temp · 1d0fd42f
      Wei Ni 提交于
      The commit 17e8351a consistently use int for temperature,
      however it missed a few in trip temperature and thermal_core.
      
      In current codes, the trip->temperature used "unsigned long"
      and zone->temperature used"int", if the temperature is negative
      value, it will get wrong result when compare temperature with
      trip temperature.
      
      This patch can fix it.
      Signed-off-by: NWei Ni <wni@nvidia.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      1d0fd42f
    • R
      thermal: fix mtk_thermal build dependency · 62e14f6f
      Randy Dunlap 提交于
      Fix build errors when MTK_THERMAL=y and NVMEM=m by preventing that
      Kconfig combination.
      
      drivers/built-in.o: In function `mtk_thermal_probe':
      mtk_thermal.c:(.text+0xffa8f): undefined reference to `nvmem_cell_get'
      mtk_thermal.c:(.text+0xffabe): undefined reference to `nvmem_cell_read'
      mtk_thermal.c:(.text+0xffac9): undefined reference to `nvmem_cell_put'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: <linux-pm@vger.kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Hanyi Wu <hanyi.wu@mediatek.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      62e14f6f