From patchwork Mon Feb 17 15:59:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 24781 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 53970202B2 for ; Mon, 17 Feb 2014 16:00:59 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id to1sf8066934ieb.3 for ; Mon, 17 Feb 2014 08:00:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe :content-transfer-encoding; bh=fG1WxUl1RwkuxoCpDds06683NH4xqpFcIMPoUyUAXSc=; b=acpQ+ErJItgO04zbIJvKjSAVOFwzzKbR6UgRdVCzfkMOFhCveKG1fiZqw8k2soTQ/u Jo66x6LhjK7q29jMfCp3HzbZcuAvZ2X7QC/AXQx3faE7w9qyhouS1hzLWTGMOzs+IRmb +Z9ujY2CWbXvM0zOAJMZnCAbkU0rHb7+ylVSVOJ3Ri5D9TJqP1PKmfxZyCXCBBmCIW16 acXLnE1pd7g5s1nIb3fwVCjtOkOd+Zs14ewAUzB6hPrbT/Mof09Oy7+wzYxHjfr3ETyG V6YQiwrZ01xDW0EDYmEgT3TkrxctyNYN3+nB5w7bf4MTdl+G0T9Ef/oWux2NUGqiLMRO Igyg== X-Gm-Message-State: ALoCoQnGxLneB0U3v11jKYDHRpsQ/yhQhzL/1hzI4RNMm5E/iRyNvXP1VntKwp+++duoFTp2uOjD X-Received: by 10.182.109.200 with SMTP id hu8mr10955841obb.20.1392652858416; Mon, 17 Feb 2014 08:00:58 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.136 with SMTP id v8ls984920qgd.17.gmail; Mon, 17 Feb 2014 08:00:58 -0800 (PST) X-Received: by 10.52.170.241 with SMTP id ap17mr14652368vdc.13.1392652858303; Mon, 17 Feb 2014 08:00:58 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id t4si4554089vcz.133.2014.02.17.08.00.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 08:00:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id c14so12044267vea.6 for ; Mon, 17 Feb 2014 08:00:58 -0800 (PST) X-Received: by 10.220.192.71 with SMTP id dp7mr745945vcb.45.1392652858213; Mon, 17 Feb 2014 08:00:58 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp149368vcz; Mon, 17 Feb 2014 08:00:57 -0800 (PST) X-Received: by 10.68.198.97 with SMTP id jb1mr27192975pbc.104.1392652857068; Mon, 17 Feb 2014 08:00:57 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rx8si15209715pac.279.2014.02.17.08.00.56; Mon, 17 Feb 2014 08:00:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753822AbaBQQAX (ORCPT + 27 others); Mon, 17 Feb 2014 11:00:23 -0500 Received: from relais.videotron.ca ([24.201.245.36]:50032 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbaBQQAR (ORCPT ); Mon, 17 Feb 2014 11:00:17 -0500 Received: from yoda.home ([66.130.143.177]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N1500L44DS8FI41@VL-VM-MR003.ip.videotron.ca>; Mon, 17 Feb 2014 11:00:09 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id BEA6C2DA05F7; Mon, 17 Feb 2014 11:00:08 -0500 (EST) From: Nicolas Pitre To: Ingo Molnar , Peter Zijlstra Cc: Paul Burton , Deepthi Dharwar , Preeti U Murthy , "Rafael J. Wysocki" , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org Subject: [PATCH 1/2] cpuidle/powernv: remove redundant cpuidle_idle_call() Date: Mon, 17 Feb 2014 10:59:29 -0500 Message-id: <1392652770-19397-2-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 1.8.4.108.g55ea5f6 In-reply-to: <1392652770-19397-1-git-send-email-nicolas.pitre@linaro.org> References: <1392652770-19397-1-git-send-email-nicolas.pitre@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-transfer-encoding: 7BIT The core idle loop now takes care of it. We need to add the runlatch function calls to the idle routines which was earlier taken care of by the arch specific idle routine. Signed-off-by: Nicolas Pitre Signed-off-by: Preeti U Murthy Reviewed-by: Deepthi Dharwar Acked-by: Thomas Gleixner --- arch/powerpc/platforms/powernv/setup.c | 13 +------------ drivers/cpuidle/cpuidle-powernv.c | 5 +++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 110f4fbd31..81a7a0a79b 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -225,16 +224,6 @@ 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, @@ -244,7 +233,7 @@ define_machine(powernv) { .show_cpuinfo = pnv_show_cpuinfo, .progress = pnv_progress, .machine_shutdown = pnv_shutdown, - .power_save = powernv_idle, + .power_save = power7_idle, .calibrate_decr = generic_calibrate_decr, .dma_set_mask = pnv_dma_set_mask, #ifdef CONFIG_KEXEC diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 78fd174c57..f48607cd25 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c @@ -14,6 +14,7 @@ #include #include +#include struct cpuidle_driver powernv_idle_driver = { .name = "powernv_idle", @@ -30,12 +31,14 @@ static int snooze_loop(struct cpuidle_device *dev, local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG); + ppc64_runlatch_off(); while (!need_resched()) { HMT_low(); HMT_very_low(); } HMT_medium(); + ppc64_runlatch_on(); clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb(); return index; @@ -45,7 +48,9 @@ static int nap_loop(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { + ppc64_runlatch_off(); power7_idle(); + ppc64_runlatch_on(); return index; }