18 Aug, 2012

2 commits

  • When a kernel is built to support multiple hardware types it's possible
    that CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is set but the hardware the
    kernel is run on doesn't support cpuidle and therefore doesn't load a
    driver for it. In this case, when the system is shut down,
    cpuidle_coupled_cpu_notify() gets called with cpuidle_devices set to
    NULL. There are quite possibly other circumstances where this
    situation can also occur and we should check for it.

    Signed-off-by: Jon Medhurst
    Signed-off-by: Rafael J. Wysocki

    Jon Medhurst (Tixy)
     
  • The cpu hotplug notifier gets called in both atomic and non-atomic
    contexts, it is not always safe to lock a mutex. Filter out all events
    except the six necessary ones, which are all sleepable, before taking
    the mutex.

    Signed-off-by: Colin Cross
    Reviewed-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Colin Cross
     

27 Jul, 2012

1 commit

  • Pull ACPI & power management update from Len Brown:
    "Re-write of the turbostat tool.
    lower overhead was necessary for measuring very large system when
    they are very idle.

    IVB support in intel_idle
    It's what I run on my IVB, others should be able to also:-)

    ACPICA core update
    We have found some bugs due to divergence between Linux and the
    upstream ACPICA base. Most of these patches are to reduce that
    divergence to reduce the risk of future bugs.

    Some cpuidle updates, mostly for non-Intel
    More will be coming, as they depend on this part.

    Some thermal management changes needed by non-ACPI systems.

    Some _OST (OS Status Indication) updates for hot ACPI hot-plug."

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
    Thermal: Documentation update
    Thermal: Add Hysteresis attributes
    Thermal: Make Thermal trip points writeable
    ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
    tools/power: turbostat: fix large c1% issue
    tools/power: turbostat v2 - re-write for efficiency
    ACPICA: Update to version 20120711
    ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
    ACPICA: Update header files copyrights to 2012
    ACPICA: Add new ACPI table load/unload external interfaces
    ACPICA: Split file: tbxface.c -> tbxfload.c
    ACPICA: Add PCC address space to space ID decode function
    ACPICA: Fix some comment fields
    ACPICA: Table manager: deploy new firmware error/warning interfaces
    ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
    ACPICA: Split exception code utilities to a new file, utexcep.c
    ACPI: acpi_pad: tune round_robin_time
    ACPICA: Update to version 20120620
    ACPICA: Add support for implicit notify on multiple devices
    ACPICA: Update comments; no functional change
    ...

    Linus Torvalds
     

26 Jul, 2012

1 commit


19 Jul, 2012

1 commit

  • * pm-domains:
    PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
    PM / Domains: Replace plain integer with NULL pointer in domain.c file
    PM / Domains: Add missing static storage class specifier in domain.c file
    PM / Domains: Allow device callbacks to be added at any time
    PM / Domains: Add device domain data reference counter
    PM / Domains: Add preliminary support for cpuidle, v2
    PM / Domains: Do not stop devices after restoring their states
    PM / Domains: Use subsystem runtime suspend/resume callbacks by default

    Rafael J. Wysocki
     

11 Jul, 2012

1 commit

  • On certain bios, resume hangs if cpus are allowed to enter idle states
    during suspend [1].

    This was fixed in apci idle driver [2].But intel_idle driver does not
    have this fix. Thus instead of replicating the fix in both the idle
    drivers, or in more platform specific idle drivers if needed, the
    more general cpuidle infrastructure could handle this.

    A suspend callback in cpuidle_driver could handle this fix. But
    a cpuidle_driver provides only basic functionalities like platform idle
    state detection capability and mechanisms to support entry and exit
    into CPU idle states. All other cpuidle functions are found in the
    cpuidle generic infrastructure for good reason that all cpuidle
    drivers, irrepective of their platforms will support these functions.

    One option therefore would be to register a suspend callback in cpuidle
    which handles this fix. This could be called through a PM_SUSPEND_PREPARE
    notifier. But this is too generic a notfier for a driver to handle.

    Also, ideally the job of cpuidle is not to handle side effects of suspend.
    It should expose the interfaces which "handle cpuidle 'during' suspend"
    or any other operation, which the subsystems call during that respective
    operation.

    The fix demands that during suspend, no cpus should be allowed to enter
    deep C-states. The interface cpuidle_uninstall_idle_handler() in cpuidle
    ensures that. Not just that it also kicks all the cpus which are already
    in idle out of their idle states which was being done during cpu hotplug
    through a CPU_DYING_FROZEN callbacks.

    Now the question arises about when during suspend should
    cpuidle_uninstall_idle_handler() be called. Since we are dealing with
    drivers it seems best to call this function during dpm_suspend().
    Delaying the call till dpm_suspend_noirq() does no harm, as long as it is
    before cpu_hotplug_begin() to avoid race conditions with cpu hotpulg
    operations. In dpm_suspend_noirq(), it would be wise to place this call
    before suspend_device_irqs() to avoid ugly interactions with the same.

    Ananlogously, during resume.

    References:
    [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/674075.
    [2] http://marc.info/?l=linux-pm&m=133958534231884&w=2

    Reported-and-tested-by: Dave Hansen
    Signed-off-by: Preeti U Murthy
    Reviewed-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Preeti U Murthy
     

04 Jul, 2012

3 commits

  • On some systems there are CPU cores located in the same power
    domains as I/O devices. Then, power can only be removed from the
    domain if all I/O devices in it are not in use and the CPU core
    is idle. Add preliminary support for that to the generic PM domains
    framework.

    First, the platform is expected to provide a cpuidle driver with one
    extra state designated for use with the generic PM domains code.
    This state should be initially disabled and its exit_latency value
    should be set to whatever time is needed to bring up the CPU core
    itself after restoring power to it, not including the domain's
    power on latency. Its .enter() callback should point to a procedure
    that will remove power from the domain containing the CPU core at
    the end of the CPU power transition.

    The remaining characteristics of the extra cpuidle state, referred to
    as the "domain" cpuidle state below, (e.g. power usage, target
    residency) should be populated in accordance with the properties of
    the hardware.

    Next, the platform should execute genpd_attach_cpuidle() on the PM
    domain containing the CPU core. That will cause the generic PM
    domains framework to treat that domain in a special way such that:

    * When all devices in the domain have been suspended and it is about
    to be turned off, the states of the devices will be saved, but
    power will not be removed from the domain. Instead, the "domain"
    cpuidle state will be enabled so that power can be removed from
    the domain when the CPU core is idle and the state has been chosen
    as the target by the cpuidle governor.

    * When the first I/O device in the domain is resumed and
    __pm_genpd_poweron(() is called for the first time after
    power has been removed from the domain, the "domain" cpuidle
    state will be disabled to avoid subsequent surprise power removals
    via cpuidle.

    The effective exit_latency value of the "domain" cpuidle state
    depends on the time needed to bring up the CPU core itself after
    restoring power to it as well as on the power on latency of the
    domain containing the CPU core. Thus the "domain" cpuidle state's
    exit_latency has to be recomputed every time the domain's power on
    latency is updated, which may happen every time power is restored
    to the domain, if the measured power on latency is greater than
    the latency stored in the corresponding generic_pm_domain structure.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Kevin Hilman

    Rafael J. Wysocki
     
  • Add a reference counter for the cpuidle driver, so that it can't
    be unregistered when it is in use.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Andrew J.Schorr raises a question. When he changes the disable setting on
    a single CPU, it affects all the other CPUs. Basically, currently, the
    disable field is per-driver instead of per-cpu. All the C states of the
    same driver are shared by all CPU in the same machine.

    The patch changes the `disable' field to per-cpu, so we could set this
    separately for each cpu.

    Signed-off-by: ShuoX Liu
    Reported-by: Andrew J.Schorr
    Reviewed-by: Yanmin Zhang
    Signed-off-by: Andrew Morton
    Signed-off-by: Rafael J. Wysocki

    ShuoX Liu
     

02 Jun, 2012

6 commits

  • Adds cpuidle_coupled_parallel_barrier, which can be used by coupled
    cpuidle state enter functions to handle resynchronization after
    determining if any cpu needs to abort. The normal use case will
    be:

    static bool abort_flag;
    static atomic_t abort_barrier;

    int arch_cpuidle_enter(struct cpuidle_device *dev, ...)
    {
    if (arch_turn_off_irq_controller()) {
    /* returns an error if an irq is pending and would be lost
    if idle continued and turned off power */
    abort_flag = true;
    }

    cpuidle_coupled_parallel_barrier(dev, &abort_barrier);

    if (abort_flag) {
    /* One of the cpus didn't turn off it's irq controller */
    arch_turn_on_irq_controller();
    return -EINTR;
    }

    /* continue with idle */
    ...
    }

    This will cause all cpus to abort idle together if one of them needs
    to abort.

    Reviewed-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Signed-off-by: Colin Cross
    Signed-off-by: Len Brown

    Colin Cross
     
  • On some ARM SMP SoCs (OMAP4460, Tegra 2, and probably more), the
    cpus cannot be independently powered down, either due to
    sequencing restrictions (on Tegra 2, cpu 0 must be the last to
    power down), or due to HW bugs (on OMAP4460, a cpu powering up
    will corrupt the gic state unless the other cpu runs a work
    around). Each cpu has a power state that it can enter without
    coordinating with the other cpu (usually Wait For Interrupt, or
    WFI), and one or more "coupled" power states that affect blocks
    shared between the cpus (L2 cache, interrupt controller, and
    sometimes the whole SoC). Entering a coupled power state must
    be tightly controlled on both cpus.

    The easiest solution to implementing coupled cpu power states is
    to hotplug all but one cpu whenever possible, usually using a
    cpufreq governor that looks at cpu load to determine when to
    enable the secondary cpus. This causes problems, as hotplug is an
    expensive operation, so the number of hotplug transitions must be
    minimized, leading to very slow response to loads, often on the
    order of seconds.

    This file implements an alternative solution, where each cpu will
    wait in the WFI state until all cpus are ready to enter a coupled
    state, at which point the coupled state function will be called
    on all cpus at approximately the same time.

    Once all cpus are ready to enter idle, they are woken by an smp
    cross call. At this point, there is a chance that one of the
    cpus will find work to do, and choose not to enter idle. A
    final pass is needed to guarantee that all cpus will call the
    power state enter function at the same time. During this pass,
    each cpu will increment the ready counter, and continue once the
    ready counter matches the number of online coupled cpus. If any
    cpu exits idle, the other cpus will decrement their counter and
    retry.

    To use coupled cpuidle states, a cpuidle driver must:

    Set struct cpuidle_device.coupled_cpus to the mask of all
    coupled cpus, usually the same as cpu_possible_mask if all cpus
    are part of the same cluster. The coupled_cpus mask must be
    set in the struct cpuidle_device for each cpu.

    Set struct cpuidle_device.safe_state to a state that is not a
    coupled state. This is usually WFI.

    Set CPUIDLE_FLAG_COUPLED in struct cpuidle_state.flags for each
    state that affects multiple cpus.

    Provide a struct cpuidle_state.enter function for each state
    that affects multiple cpus. This function is guaranteed to be
    called on all cpus at approximately the same time. The driver
    should ensure that the cpus all abort together if any cpu tries
    to abort once the function is called.

    update1:

    cpuidle: coupled: fix count of online cpus

    online_count was never incremented on boot, and was also counting
    cpus that were not part of the coupled set. Fix both issues by
    introducting a new function that counts online coupled cpus, and
    call it from register as well as the hotplug notifier.

    update2:

    cpuidle: coupled: fix decrementing ready count

    cpuidle_coupled_set_not_ready sometimes refuses to decrement the
    ready count in order to prevent a race condition. This makes it
    unsuitable for use when finished with idle. Add a new function
    cpuidle_coupled_set_done that decrements both the ready count and
    waiting count, and call it after idle is complete.

    Cc: Amit Kucheria
    Cc: Arjan van de Ven
    Cc: Trinabh Gupta
    Cc: Deepthi Dharwar
    Reviewed-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Signed-off-by: Colin Cross
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Colin Cross
     
  • Fix the error handling in __cpuidle_register_device to include
    the missing list_del. Move it to a label, which will simplify
    the error handling when coupled states are added.

    Reviewed-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Signed-off-by: Colin Cross
    Reviewed-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Colin Cross
     
  • Split the code to enter a state and update the stats into a helper
    function, cpuidle_enter_state, and export it. This function will
    be called by the coupled state code to handle entering the safe
    state and the final coupled state.

    Reviewed-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Signed-off-by: Colin Cross
    Reviewed-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Colin Cross
     
  • The existing check for dev == NULL in __cpuidle_register_device() is
    rendered useless because dev is dereferenced before the check itself.
    Moreover, correctly speaking, it is the job of the callers of this
    function, i.e., cpuidle_register_device() & cpuidle_enable_device() (which
    also happen to be exported functions) to ensure that
    __cpuidle_register_device() is called with a non-NULL dev.

    So add the necessary dev == NULL checks in the two callers and remove the
    (useless) check from __cpuidle_register_device().

    Signed-off-by: Srivatsa S. Bhat
    Acked-by: Daniel Lezcano
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Srivatsa S. Bhat
     
  • commit 9a6558371bcd01c2973b7638181db4ccc34eab4f
    Author: Arjan van de Ven
    Date: Sun Nov 9 12:45:10 2008 -0800

    regression: disable timer peek-ahead for 2.6.28

    It's showing up as regressions; disabling it very likely just papers
    over an underlying issue, but time is running out for 2.6.28, lets get
    back to this for 2.6.29

    Many years has passed since 2008, so it seems ok to remove whole `#if 0' block.

    Signed-off-by: Sergey Senozhatsky
    Cc: Kevin Hilman
    Cc: Trinabh Gupta
    Cc: Deepthi Dharwar
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Sergey Senozhatsky
     

08 May, 2012

1 commit

  • kick_all_cpus_sync() is the core implementation of cpu_idle_wait()
    which is copied all over the arch code.

    Signed-off-by: Thomas Gleixner
    Acked-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120507175652.119842173@linutronix.de

    Thomas Gleixner
     

07 Apr, 2012

2 commits


31 Mar, 2012

1 commit

  • Pull ACPI & Power Management changes from Len Brown:
    - ACPI 5.0 after-ripples, ACPICA/Linux divergence cleanup
    - cpuidle evolving, more ARM use
    - thermal sub-system evolving, ditto
    - assorted other PM bits

    Fix up conflicts in various cpuidle implementations due to ARM cpuidle
    cleanups (ARM at91 self-refresh and cpu idle code rewritten into
    "standby" in asm conflicting with the consolidation of cpuidle time
    keeping), trivial SH include file context conflict and RCU tracing fixes
    in generic code.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (77 commits)
    ACPI throttling: fix endian bug in acpi_read_throttling_status()
    Disable MCP limit exceeded messages from Intel IPS driver
    ACPI video: Don't start video device until its associated input device has been allocated
    ACPI video: Harden video bus adding.
    ACPI: Add support for exposing BGRT data
    ACPI: export acpi_kobj
    ACPI: Fix logic for removing mappings in 'acpi_unmap'
    CPER failed to handle generic error records with multiple sections
    ACPI: Clean redundant codes in scan.c
    ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
    ACPI: consistently use should_use_kmap()
    PNPACPI: Fix device ref leaking in acpi_pnp_match
    ACPI: Fix use-after-free in acpi_map_lsapic
    ACPI: processor_driver: add missing kfree
    ACPI, APEI: Fix incorrect APEI register bit width check and usage
    Update documentation for parameter *notrigger* in einj.txt
    ACPI, APEI, EINJ, new parameter to control trigger action
    ACPI, APEI, EINJ, limit the range of einj_param
    ACPI, APEI, Fix ERST header length check
    cpuidle: power_usage should be declared signed integer
    ...

    Linus Torvalds
     

30 Mar, 2012

4 commits

  • power_usage is always assigned a negative value and should be declared
    a signed integer

    Signed-off-by: Boris Ostrovsky
    Signed-off-by: Len Brown

    Boris Ostrovsky
     
  • Currently when a CPU is off-lined it enters either MWAIT-based idle or,
    if MWAIT is not desired or supported, HLT-based idle (which places the
    processor in C1 state). This patch allows processors without MWAIT
    support to stay in states deeper than C1.

    Signed-off-by: Boris Ostrovsky
    Signed-off-by: Len Brown

    Boris Ostrovsky
     
  • If the state_count is not initialized for the device use
    the driver's state count as the default. That will prevent
    to add it manually in the cpuidle driver initialization
    routine and will save us from duplicate line of code.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: Len Brown

    Daniel Lezcano
     
  • Some C states of new CPU might be not good. One reason is BIOS might
    configure them incorrectly. To help developers root cause it quickly, the
    patch adds a new sysfs entry, so developers could disable specific C state
    manually.

    In addition, C state might have much impact on performance tuning, as it
    takes much time to enter/exit C states, which might delay interrupt
    processing. With the new debug option, developers could check if a deep C
    state could impact performance and how much impact it could cause.

    Also add this option in Documentation/cpuidle/sysfs.txt.

    [akpm@linux-foundation.org: check kstrtol return value]
    Signed-off-by: ShuoX Liu
    Reviewed-by: Yanmin Zhang
    Reviewed-and-Tested-by: Deepthi Dharwar
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    ShuoX Liu
     

21 Mar, 2012

1 commit

  • Make necessary changes to implement time keeping and irq enabling
    in the core cpuidle code. This will allow the removal of these
    functionalities from various platform cpuidle implementations whose
    timekeeping and irq enabling follows the form in this common code.

    Signed-off-by: Robert Lee
    Tested-by: Jean Pihet
    Tested-by: Amit Daniel
    Tested-by: Robert Lee
    Reviewed-by: Kevin Hilman
    Reviewed-by: Daniel Lezcano
    Reviewed-by: Deepthi Dharwar
    Acked-by: Jean Pihet
    Signed-off-by: Len Brown

    Robert Lee
     

05 Mar, 2012

1 commit


22 Feb, 2012

1 commit


13 Feb, 2012

1 commit


22 Dec, 2011

1 commit

  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

08 Nov, 2011

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    cpuidle: Single/Global registration of idle states
    cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
    cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()
    cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state
    ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
    ACPI: Export FADT pm_profile integer value to userspace
    thermal: Prevent polling from happening during system suspend
    ACPI: Drop ACPI_NO_HARDWARE_INIT
    ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
    PNPACPI: Simplify disabled resource registration
    ACPI: Fix possible recursive locking in hwregs.c
    ACPI: use kstrdup()
    mrst pmu: update comment
    tools/power turbostat: less verbose debugging

    Linus Torvalds
     

07 Nov, 2011

4 commits

  • This patch makes the cpuidle_states structure global (single copy)
    instead of per-cpu. The statistics needed on per-cpu basis
    by the governor are kept per-cpu. This simplifies the cpuidle
    subsystem as state registration is done by single cpu only.
    Having single copy of cpuidle_states saves memory. Rare case
    of asymmetric C-states can be handled within the cpuidle driver
    and architectures such as POWER do not have asymmetric C-states.

    Having single/global registration of all the idle states,
    dynamic C-state transitions on x86 are handled by
    the boot cpu. Here, the boot cpu would disable all the devices,
    re-populate the states and later enable all the devices,
    irrespective of the cpu that would receive the notification first.

    Reference:
    https://lkml.org/lkml/2011/4/25/83

    Signed-off-by: Deepthi Dharwar
    Signed-off-by: Trinabh Gupta
    Tested-by: Jean Pihet
    Reviewed-by: Kevin Hilman
    Acked-by: Arjan van de Ven
    Acked-by: Kevin Hilman
    Signed-off-by: Len Brown

    Deepthi Dharwar
     
  • This is the first step towards global registration of cpuidle
    states. The statistics used primarily by the governor are per-cpu
    and have to be split from rest of the fields inside cpuidle_state,
    which would be made global i.e. single copy. The driver_data field
    is also per-cpu and moved.

    Signed-off-by: Deepthi Dharwar
    Signed-off-by: Trinabh Gupta
    Tested-by: Jean Pihet
    Reviewed-by: Kevin Hilman
    Acked-by: Arjan van de Ven
    Acked-by: Kevin Hilman
    Signed-off-by: Len Brown

    Deepthi Dharwar
     
  • The cpuidle_device->prepare() mechanism causes updates to the
    cpuidle_state[].flags, setting and clearing CPUIDLE_FLAG_IGNORE
    to tell the governor not to chose a state on a per-cpu basis at
    run-time. State demotion is now handled by the driver and it returns
    the actual state entered. Hence, this mechanism is not required.
    Also this removes per-cpu flags from cpuidle_state enabling
    it to be made global.

    Reference:
    https://lkml.org/lkml/2011/3/25/52

    Signed-off-by: Deepthi Dharwar
    Signed-off-by: Trinabh Gupta
    Tested-by: Jean Pihet
    Acked-by: Arjan van de Ven
    Reviewed-by: Kevin Hilman
    Signed-off-by: Len Brown

    Deepthi Dharwar
     
  • Cpuidle governor only suggests the state to enter using the
    governor->select() interface, but allows the low level driver to
    override the recommended state. The actual entered state
    may be different because of software or hardware demotion. Software
    demotion is done by the back-end cpuidle driver and can be accounted
    correctly. Current cpuidle code uses last_state field to capture the
    actual state entered and based on that updates the statistics for the
    state entered.

    Ideally the driver enter routine should update the counters,
    and it should return the state actually entered rather than the time
    spent there. The generic cpuidle code should simply handle where
    the counters live in the sysfs namespace, not updating the counters.

    Reference:
    https://lkml.org/lkml/2011/3/25/52

    Signed-off-by: Deepthi Dharwar
    Signed-off-by: Trinabh Gupta
    Tested-by: Jean Pihet
    Reviewed-by: Kevin Hilman
    Acked-by: Arjan van de Ven
    Acked-by: Kevin Hilman
    Signed-off-by: Len Brown

    Deepthi Dharwar
     

01 Nov, 2011

2 commits


25 Aug, 2011

1 commit


04 Aug, 2011

3 commits

  • cpuidle users should call cpuidle_call_idle() directly
    rather than via (pm_idle)() function pointer.

    Architecture may choose to continue using (pm_idle)(),
    but cpuidle need not depend on it:

    my_arch_cpu_idle()
    ...
    if(cpuidle_call_idle())
    pm_idle();

    cc: Kevin Hilman
    cc: Paul Mundt
    cc: x86@kernel.org
    Acked-by: H. Peter Anvin
    Signed-off-by: Len Brown

    Len Brown
     
  • When a Xen Dom0 kernel boots on a hypervisor, it gets access
    to the raw-hardware ACPI tables. While it parses the idle tables
    for the hypervisor's beneift, it uses HLT for its own idle.

    Rather than have xen scribble on pm_idle and access default_idle,
    have it simply disable_cpuidle() so acpi_idle will not load and
    architecture default HLT will be used.

    cc: xen-devel@lists.xensource.com
    Tested-by: Konrad Rzeszutek Wilk
    Acked-by: H. Peter Anvin
    Signed-off-by: Len Brown

    Len Brown
     
  • useful for disabling cpuidle to fall back
    to architecture-default idle loop

    cpuidle drivers and governors will fail to register.
    on x86 they'll say so:

    intel_idle: intel_idle yielding to (null)
    ACPI: acpi_idle yielding to (null)

    Signed-off-by: Len Brown

    Len Brown
     

30 May, 2011

1 commit

  • * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param
    x86 idle: deprecate "no-hlt" cmdline param
    x86 idle APM: deprecate CONFIG_APM_CPU_IDLE
    x86 idle floppy: deprecate disable_hlt()
    x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it
    x86 idle: clarify AMD erratum 400 workaround
    idle governor: Avoid lock acquisition to read pm_qos before entering idle
    cpuidle: menu: fixed wrapping timers at 4.294 seconds

    Linus Torvalds