1. 18 5月, 2016 1 次提交
    • D
      cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter() · e7387da5
      Daniel Lezcano 提交于
      Commit 0b89e9aa (cpuidle: delay enabling interrupts until all
      coupled CPUs leave idle) rightfully fixed a regression by letting
      the coupled idle state framework to handle local interrupt enabling
      when the CPU is exiting an idle state.
      
      The current code checks if the idle state is coupled and, if so, it
      will let the coupled code to enable interrupts. This way, it can
      decrement the ready-count before handling the interrupt. This
      mechanism prevents the other CPUs from waiting for a CPU which is
      handling interrupts.
      
      But the check is done against the state index returned by the back
      end driver's ->enter functions which could be different from the
      initial index passed as parameter to the cpuidle_enter_state()
      function.
      
       entered_state = target_state->enter(dev, drv, index);
      
       [ ... ]
      
       if (!cpuidle_state_is_coupled(drv, entered_state))
      	local_irq_enable();
      
       [ ... ]
      
      If the 'index' is referring to a coupled idle state but the
      'entered_state' is *not* coupled, then the interrupts are enabled
      again. All CPUs blocked on the sync barrier may busy loop longer
      if the CPU has interrupts to handle before decrementing the
      ready-count. That's consuming more energy than saving.
      
      Fixes: 0b89e9aa (cpuidle: delay enabling interrupts until all coupled CPUs leave idle)
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
      [ rjw: Subject & changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e7387da5
  2. 07 5月, 2016 1 次提交
  3. 28 4月, 2016 1 次提交
  4. 26 4月, 2016 3 次提交
    • D
      cpuidle: Replace ktime_get() with local_clock() · e93e59ce
      Daniel Lezcano 提交于
      The ktime_get() can have a non negligeable overhead, use local_clock()
      instead.
      
      In order to test the difference between ktime_get() and local_clock(),
      a quick hack has been added to trigger, via debugfs, 10000 times a
      call to ktime_get() and local_clock() and measure the elapsed time.
      
      Then the average value, the min and max is computed for each call.
      
      From userspace, the test above was called 100 times every 2 seconds.
      
      So, ktime_get() and local_clock() have been called 1000000 times in
      total.
      
      The results are:
      
      ktime_get():
      ============
       * average: 101 ns (stddev: 27.4)
       * maximum: 38313 ns
       * minimum: 65 ns
      
      local_clock():
      ==============
       * average: 60 ns (stddev: 9.8)
       * maximum: 13487 ns
       * minimum: 46 ns
      
      The local_clock() is faster and more stable.
      
      Even if it is a drop in the ocean, changing the ktime_get() by the
      local_clock() allows to save 80ns at idle time (entry + exit). And
      in some circumstances, especially when there are several CPUs racing
      for the clock access, we save tens of microseconds.
      
      The idle duration resulting from a diff is converted from nanosec to
      microsec. This could be done with integer division (div 1000) - which is
      an expensive operation or by 10 bits shifting (div 1024) - which is fast
      but unprecise.
      
      The following table gives some results at the limits.
      
       ------------------------------------------
      |   nsec   |   div(1000)   |   div(1024)   |
       ------------------------------------------
      |   1e3    |        1 usec |      976 nsec |
       ------------------------------------------
      |   1e6    |     1000 usec |      976 usec |
       ------------------------------------------
      |   1e9    |  1000000 usec |   976562 usec |
       ------------------------------------------
      
      There is a linear deviation of 2.34%. This loss of precision is acceptable
      in the context of the resulting diff which is used for statistics. These
      ones are processed to guess estimate an approximation of the duration of the
      next idle period which ends up into an idle state selection. The selection
      criteria takes into account the next duration based on large intervals,
      represented by the idle state's target residency.
      
      The 2^10 division is enough because the approximation regarding the 1e3
      division is lost in all the approximations done for the next idle duration
      computation.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      [ rjw: Subject ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e93e59ce
    • R
      Merge back earlier cpuidle changes for v4.7. · f0fb0dd0
      Rafael J. Wysocki 提交于
      f0fb0dd0
    • R
      Merge branch 'cpuidle/4.7' of http://git.linaro.org/people/daniel.lezcano/linux into tmp · b5ebbcdb
      Rafael J. Wysocki 提交于
      Pull ARM cpuidle changes for v4.7 from Daniel Lezcano.
      
      * 'cpuidle/4.7' of http://git.linaro.org/people/daniel.lezcano/linux:
        drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops
        soc: qcom: spm: Use const and __initconst for qcom_cpuidle_ops
        ARM: cpuidle: constify return value of arm_cpuidle_get_ops()
        ARM: cpuidle: add const qualifier to cpuidle_ops member in structures
      b5ebbcdb
  5. 25 4月, 2016 1 次提交
  6. 24 4月, 2016 11 次提交
  7. 23 4月, 2016 6 次提交
    • L
      Merge tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 09502d9f
      Linus Torvalds 提交于
      Pull pin control fixes from Linus Walleij:
       "Some pin control driver fixes came in.  One headed for stable and the
        other two are just ordinary merge window fixes.
      
         - Make the i.MX driver select REGMAP as a dependency
         - Fix up the Mediatek debounce time unit
         - Fix a real hairy ffs vs __ffs issue in the Single pinctrl driver"
      
      * tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs
        pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce
        pinctrl: imx: Kconfig: PINCTRL_IMX select REGMAP
      09502d9f
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · ddce1921
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
      
       - Cache invalidation fix for early CPU boot status update (incorrect
         cacheline)
      
       - of_put_node() missing in the spin_table code
      
       - EL1/El2 early init inconsistency when Virtualisation Host Extensions
         are present
      
       - RCU warning fix in the arm_pmu.c driver
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Fix EL1/EL2 early init inconsistencies with VHE
        drivers/perf: arm-pmu: fix RCU usage on pmu resume from low-power
        arm64: spin-table: add missing of_node_put()
        arm64: fix invalidation of wrong __early_cpu_boot_status cacheline
      ddce1921
    • L
      Merge tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · ff061624
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "Three powerpc cpu feature fixes from Anton Blanchard:
      
         - scan_features() updated incorrect bits for REAL_LE
      
         - update cpu_user_features2 in scan_features()
      
         - update TM user feature bits in scan_features()"
      
      * tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Update TM user feature bits in scan_features()
        powerpc: Update cpu_user_features2 in scan_features()
        powerpc: scan_features() updates incorrect bits for REAL_LE
      ff061624
    • L
      Merge tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 7c5047a1
      Linus Torvalds 提交于
      Pull IOMMU fixes from Joerg Roedel:
       "The fixes include:
      
         - Two patches to revert the use of default domains in the ARM SMMU
           driver.  Enabling this caused regressions which need more thorough
           fixing.  So the regressions are fixed for now by disabling the use
           of default domains.
      
         - A fix for a v4.4 regression in the AMD IOMMU driver which broke
           devices behind invisible PCIe-to-PCI bridges with IOMMU enabled"
      
      * tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/arm-smmu: Don't allocate resources for bypass domains
        iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA
        iommu/amd: Fix checking of pci dma aliases
      7c5047a1
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · d61fb48b
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "i915, nouveau and amdgpu/radeon fixes in this:
      
        nouveau:
           Two fixes, one for a regression with dithering and one for a bug
           hit by the userspace drivers.
      
        i915:
           A few fixes, mostly things heading for stable, two important
           skylake GT3/4 hangs.
      
        radeon/amdgpu:
           Some audio, suspend/resume and some runtime PM fixes, along with
           two patches to harden the userptr ABI a bit"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits)
        drm: Loongson-3 doesn't fully support wc memory
        drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries
        amdgpu/uvd: add uvd fw version for amdgpu
        drm/amdgpu: forbid mapping of userptr bo through radeon device file
        drm/radeon: forbid mapping of userptr bo through radeon device file
        drm/amdgpu: bump the afmt limit for CZ, ST, Polaris
        drm/amdgpu: use defines for CRTCs and AMFT blocks
        drm/dp/mst: Validate port in drm_dp_payload_send_msg()
        drm/nouveau/kms: fix setting of default values for dithering properties
        drm/radeon: print a message if ATPX dGPU power control is missing
        Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control"
        drm/amdgpu/acp: fix resume on CZ systems with AZ audio
        drm/radeon: add a quirk for a XFX R9 270X
        drm/radeon: print pci revision as well as pci ids on driver load
        drm/i915: Use fw_domains_put_with_fifo() on HSW
        drm/i915: Force ringbuffers to not be at offset 0
        drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write
        drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs
        drm/i915/skl: Fix rc6 based gpu/system hang
        drm/i915/userptr: Hold mmref whilst calling get-user-pages
        ...
      d61fb48b
    • L
      Merge tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d4b05288
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Again a relatively calm week without surprise: most of fixes are about
        HD-audio, including fixes for Cirrus codec regression and a race over
        regmap access.  Although both change are slightly unintuitive, the
        risk of further breakage is quite low, I hope.
      
        Other than that, all the rest are trivial"
      
      * tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix possible race on regmap bypass flip
        ALSA: pcxhr: Fix missing mutex unlock
        ALSA: hda - add PCI ID for Intel Broxton-T
        ALSA: hda - Keep powering up ADCs on Cirrus codecs
        ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m
        ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap
        ALSA: hda - Don't trust the reported actual power state
      d4b05288
  8. 22 4月, 2016 16 次提交