lkml.org 
[lkml]   [2013]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/3] cpuidle/powernv: Enable idle powernv cpu to call into the cpuidle framework.
    From
    Date
    This patch enables idle powernv cpu to hook on to the cpuidle
    framework, if available, else call on to default idle platform
    code.

    Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
    ---
    arch/powerpc/platforms/powernv/setup.c | 12 +++++++++++-
    1 file changed, 11 insertions(+), 1 deletion(-)

    diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
    index 84438af..97d0951 100644
    --- a/arch/powerpc/platforms/powernv/setup.c
    +++ b/arch/powerpc/platforms/powernv/setup.c
    @@ -25,6 +25,7 @@
    #include <linux/of.h>
    #include <linux/interrupt.h>
    #include <linux/bug.h>
    +#include <linux/cpuidle.h>

    #include <asm/machdep.h>
    #include <asm/firmware.h>
    @@ -196,6 +197,15 @@ static int __init pnv_probe(void)
    return 1;
    }

    +void powernv_idle(void)
    +{
    + /* Hook to cpuidle framework if available, else
    + * call on default platform idle code
    + */
    + if (cpuidle_idle_call())
    + power7_idle();
    +}
    +
    define_machine(powernv) {
    .name = "PowerNV",
    .probe = pnv_probe,
    @@ -205,7 +215,7 @@ define_machine(powernv) {
    .show_cpuinfo = pnv_show_cpuinfo,
    .progress = pnv_progress,
    .machine_shutdown = pnv_shutdown,
    - .power_save = power7_idle,
    + .power_save = powernv_idle,
    .calibrate_decr = generic_calibrate_decr,
    #ifdef CONFIG_KEXEC
    .kexec_cpu_down = pnv_kexec_cpu_down,


    \
     
     \ /
      Last update: 2013-07-23 11:41    [W:3.825 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site