1. 16 2月, 2015 4 次提交
    • R
      ACPI / idle: Implement ->enter_freeze callback routine · 5f508185
      Rafael J. Wysocki 提交于
      Add an ->enter_freeze callback routine, acpi_idle_enter_freeze(), to
      the ACPI cpuidle driver and point ->enter_freeze to it for all the
      C2-type and C3-type states that don't need to fall back to C1
      (which may be halt-induced and that will re-enable interrupts on
      exit from idle, which ->enter_freeze cannot do).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      5f508185
    • R
      intel_idle: Add ->enter_freeze callbacks · 5fe2e527
      Rafael J. Wysocki 提交于
      Add an ->enter_freeze callback routine, intel_idle_freeze(), to
      the intel_idle driver and point the ->enter_freeze callback
      pointers of all of the driver's state objects to it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      5fe2e527
    • R
      PM / sleep: Make it possible to quiesce timers during suspend-to-idle · 124cf911
      Rafael J. Wysocki 提交于
      The efficiency of suspend-to-idle depends on being able to keep CPUs
      in the deepest available idle states for as much time as possible.
      Ideally, they should only be brought out of idle by system wakeup
      interrupts.
      
      However, timer interrupts occurring periodically prevent that from
      happening and it is not practical to chase all of the "misbehaving"
      timers in a whack-a-mole fashion.  A much more effective approach is
      to suspend the local ticks for all CPUs and the entire timekeeping
      along the lines of what is done during full suspend, which also
      helps to keep suspend-to-idle and full suspend reasonably similar.
      
      The idea is to suspend the local tick on each CPU executing
      cpuidle_enter_freeze() and to make the last of them suspend the
      entire timekeeping.  That should prevent timer interrupts from
      triggering until an IO interrupt wakes up one of the CPUs.  It
      needs to be done with interrupts disabled on all of the CPUs,
      though, because otherwise the suspended clocksource might be
      accessed by an interrupt handler which might lead to fatal
      consequences.
      
      Unfortunately, the existing ->enter callbacks provided by cpuidle
      drivers generally cannot be used for implementing that, because some
      of them re-enable interrupts temporarily and some idle entry methods
      cause interrupts to be re-enabled automatically on exit.  Also some
      of these callbacks manipulate local clock event devices of the CPUs
      which really shouldn't be done after suspending their ticks.
      
      To overcome that difficulty, introduce a new cpuidle state callback,
      ->enter_freeze, that will be guaranteed (1) to keep interrupts
      disabled all the time (and return with interrupts disabled) and (2)
      not to touch the CPU timer devices.  Modify cpuidle_enter_freeze() to
      look for the deepest available idle state with ->enter_freeze present
      and to make the CPU execute that callback with suspended tick (and the
      last of the online CPUs to execute it with suspended timekeeping).
      Suggested-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      124cf911
    • R
      timekeeping: Make it safe to use the fast timekeeper while suspended · 060407ae
      Rafael J. Wysocki 提交于
      Theoretically, ktime_get_mono_fast_ns() may be executed after
      timekeeping has been suspended (or before it is resumed) which
      in turn may lead to undefined behavior, for example, when the
      clocksource read from timekeeping_get_ns() called by it is
      not accessible at that time.
      
      Prevent that from happening by setting up a dummy readout base for
      the fast timekeeper during timekeeping_suspend() such that it will
      always return the same number of cycles.
      
      After the last timekeeping_update() in timekeeping_suspend() the
      clocksource is read and the result is stored as cycles_at_suspend.
      The readout base from the current timekeeper is copied onto the
      dummy and the ->read pointer of the dummy is set to a routine
      unconditionally returning cycles_at_suspend.  Next, the dummy is
      passed to update_fast_timekeeper().
      
      Then, ktime_get_mono_fast_ns() will work until the subsequent
      timekeeping_resume() and the proper readout base for the fast
      timekeeper will be restored by the timekeeping_update() called
      right after clearing timekeeping_suspended.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      060407ae
  2. 14 2月, 2015 11 次提交
    • R
      timekeeping: Pass readout base to update_fast_timekeeper() · affe3e85
      Rafael J. Wysocki 提交于
      Modify update_fast_timekeeper() to take a struct tk_read_base
      pointer as its argument (instead of a struct timekeeper pointer)
      and update its kerneldoc comment to reflect that.
      
      That will allow a struct tk_read_base that is not part of a
      struct timekeeper to be passed to it in the next patch.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NJohn Stultz <john.stultz@linaro.org>
      affe3e85
    • R
      PM / sleep: Re-implement suspend-to-idle handling · 38106313
      Rafael J. Wysocki 提交于
      In preparation for adding support for quiescing timers in the final
      stage of suspend-to-idle transitions, rework the freeze_enter()
      function making the system wait on a wakeup event, the freeze_wake()
      function terminating the suspend-to-idle loop and the mechanism by
      which deep idle states are entered during suspend-to-idle.
      
      First of all, introduce a simple state machine for suspend-to-idle
      and make the code in question use it.
      
      Second, prevent freeze_enter() from losing wakeup events due to race
      conditions and ensure that the number of online CPUs won't change
      while it is being executed.  In addition to that, make it force
      all of the CPUs re-enter the idle loop in case they are in idle
      states already (so they can enter deeper idle states if possible).
      
      Next, drop cpuidle_use_deepest_state() and replace use_deepest_state
      checks in cpuidle_select() and cpuidle_reflect() with a single
      suspend-to-idle state check in cpuidle_idle_call().
      
      Finally, introduce cpuidle_enter_freeze() that will simply find the
      deepest idle state available to the given CPU and enter it using
      cpuidle_enter().
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      38106313
    • L
      Merge tag 'pm+acpi-3.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 18320f2a
      Linus Torvalds 提交于
      Pull more ACPI and power management updates from Rafael Wysocki:
       "These are two reverts related to system suspend breakage by one of a
        recent commits, a fix for a recently introduced bug in devfreq and a
        bunch of other things that didn't make it into my previous pull
        request, but otherwise are ready to go.
      
        Specifics:
      
         - Revert two ACPI EC driver commits, one that broke system suspend on
           Acer Aspire S5 and one that depends on it (Rafael J Wysocki).
      
         - Fix a typo leading to an incorrect check in the exynos-ppmu devfreq
           driver (Dan Carpenter).
      
         - Add support for one more Broadwell CPU model to intel_idle (Len Brown).
      
         - Fix an obscure problem with state transitions related to interrupts
           in the speedstep-smi cpufreq driver (Mikulas Patocka).
      
         - Remove some unnecessary messages related to the "out of memory"
           condition from the core PM code (Quentin Lambert).
      
         - Update turbostat parameters and documentation, add support for one
           more Broadwell CPU model to it and modify it to skip printing
           disabled package C-states (Len Brown)"
      
      * tag 'pm+acpi-3.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / devfreq: event: testing the wrong variable
        cpufreq: speedstep-smi: enable interrupts when waiting
        PM / OPP / clk: Remove unnecessary OOM message
        Revert "ACPI / EC: Add query flushing support"
        Revert "ACPI / EC: Add GPE reference counting debugging messages"
        tools/power turbostat: support additional Broadwell model
        intel_idle: support additional Broadwell model
        tools/power turbostat: update parameters, documentation
        tools/power turbostat: Skip printing disabled package C-states
      18320f2a
    • R
      Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools' · c7fb90df
      Rafael J. Wysocki 提交于
      * pm-cpufreq:
        cpufreq: speedstep-smi: enable interrupts when waiting
      
      * pm-cpuidle:
        intel_idle: support additional Broadwell model
      
      * pm-devfreq:
        PM / devfreq: event: testing the wrong variable
      
      * pm-opp:
        PM / OPP / clk: Remove unnecessary OOM message
      
      * pm-tools:
        tools/power turbostat: support additional Broadwell model
        tools/power turbostat: update parameters, documentation
        tools/power turbostat: Skip printing disabled package C-states
      c7fb90df
    • R
      Merge branch 'acpi-ec' · 69bf75e9
      Rafael J. Wysocki 提交于
      * acpi-ec:
        Revert "ACPI / EC: Add query flushing support"
        Revert "ACPI / EC: Add GPE reference counting debugging messages"
      69bf75e9
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · db3ecdee
      Linus Torvalds 提交于
      Pull LED subsystem update from Bryan Wu:
       "The big change of LED subsystem is introducing a new LED class for
        Flash type LEDs which will be used for V4L2 subsystem.
      
        Also we got some cleanup and fixes"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: leds-gpio: Pass on error codes unmodified
        DT: leds: Add led-sources property
        leds: Add LED Flash class extension to the LED subsystem
        leds: leds-mc13783: Use of_get_child_by_name() instead of refcount hack
        leds: Use setup_timer
        leds: Don't allow brightness values greater than max_brightness
        DT: leds: Add flash LED devices related properties
      db3ecdee
    • L
      Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · a42cf70e
      Linus Torvalds 提交于
      Pull module update from Rusty Russell:
       "Trivial cleanups, mainly"
      
      * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        module: Replace over-engineered nested sleep
        module: Annotate nested sleep in resolve_symbol()
        module: Remove double spaces in module verification taint message
        kernel/module.c: Free lock-classes if parse_args failed
        module: set ksymtab/kcrctab* section addresses to 0x0
      a42cf70e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · f1252515
      Linus Torvalds 提交于
      Pull arch/tile changes from Chris Metcalf:
       "Not much in this batch, just some minor cleanups"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: change MAINTAINERS website from tilera.com to ezchip.com
        tile: enable sparse checks for get/put_user
        tile: fix put_user sparse errors
        tile: default to little endian on older toolchains
      f1252515
    • L
      Revert "x86/apic: Only disable CPU x2apic mode when necessary" · 8329aa9f
      Linus Torvalds 提交于
      This reverts commit 5fcee53c.
      
      It causes the suspend to fail on at least the Chromebook Pixel, possibly
      other platforms too.
      
      Joerg Roedel points out that the logic should probably have been
      
                      if (max_physical_apicid > 255 ||
                          !(IS_ENABLED(CONFIG_HYPERVISOR_GUEST) &&
                            hypervisor_x2apic_available())) {
      
      instead, but since the code is not in any fast-path, so we can just live
      without that optimization and just revert to the original code.
      Acked-by: NJoerg Roedel <joro@8bytes.org>
      Acked-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8329aa9f
    • C
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · b9085bcb
      Linus Torvalds 提交于
      Pull KVM update from Paolo Bonzini:
       "Fairly small update, but there are some interesting new features.
      
        Common:
           Optional support for adding a small amount of polling on each HLT
           instruction executed in the guest (or equivalent for other
           architectures).  This can improve latency up to 50% on some
           scenarios (e.g. O_DSYNC writes or TCP_RR netperf tests).  This
           also has to be enabled manually for now, but the plan is to
           auto-tune this in the future.
      
        ARM/ARM64:
           The highlights are support for GICv3 emulation and dirty page
           tracking
      
        s390:
           Several optimizations and bugfixes.  Also a first: a feature
           exposed by KVM (UUID and long guest name in /proc/sysinfo) before
           it is available in IBM's hypervisor! :)
      
        MIPS:
           Bugfixes.
      
        x86:
           Support for PML (page modification logging, a new feature in
           Broadwell Xeons that speeds up dirty page tracking), nested
           virtualization improvements (nested APICv---a nice optimization),
           usual round of emulation fixes.
      
           There is also a new option to reduce latency of the TSC deadline
           timer in the guest; this needs to be tuned manually.
      
           Some commits are common between this pull and Catalin's; I see you
           have already included his tree.
      
        Powerpc:
           Nothing yet.
      
           The KVM/PPC changes will come in through the PPC maintainers,
           because I haven't received them yet and I might end up being
           offline for some part of next week"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (130 commits)
        KVM: ia64: drop kvm.h from installed user headers
        KVM: x86: fix build with !CONFIG_SMP
        KVM: x86: emulate: correct page fault error code for NoWrite instructions
        KVM: Disable compat ioctl for s390
        KVM: s390: add cpu model support
        KVM: s390: use facilities and cpu_id per KVM
        KVM: s390/CPACF: Choose crypto control block format
        s390/kernel: Update /proc/sysinfo file with Extended Name and UUID
        KVM: s390: reenable LPP facility
        KVM: s390: floating irqs: fix user triggerable endless loop
        kvm: add halt_poll_ns module parameter
        kvm: remove KVM_MMIO_SIZE
        KVM: MIPS: Don't leak FPU/DSP to guest
        KVM: MIPS: Disable HTW while in guest
        KVM: nVMX: Enable nested posted interrupt processing
        KVM: nVMX: Enable nested virtual interrupt delivery
        KVM: nVMX: Enable nested apic register virtualization
        KVM: nVMX: Make nested control MSRs per-cpu
        KVM: nVMX: Enable nested virtualize x2apic mode
        KVM: nVMX: Prepare for using hardware MSR bitmap
        ...
      b9085bcb
  3. 13 2月, 2015 25 次提交