From patchwork Mon May 13 18:29:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 16887 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BFE0C25E14 for ; Mon, 13 May 2013 18:30:00 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id q16sf8200162vbe.3 for ; Mon, 13 May 2013 11:29:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=6RwbuGodzCyGipsi8Ic+a6OORaxOwB2s7Vyt4Rwc80o=; b=HS4nvOyvmk+tMZrqsm73DO9HbI6eCgYn9YOaY7TTjZXothg3QhuPcvV6DFMruf+MR3 S9RMPExAWhmCEzOfBSVwEt50QCm7YhU7NRSa8cLy2at4z74uXFStDhK9t4pelcDVuiI1 JZv29C0rBSMjrne7hBjrZwU2I0Zdjoy7OHVEDkyeMauu0mswA7UQxbnNZPBLwKogWN7f dJScrr+5sSXe1HcBR9ZXyRW/uZDb/Dba5/NlkdsJ3HFlC/a4xwoKnRCcvvrwcY/LR1B+ L9BhXSmYJcRxthFnQK+rHatU1wxnBV3MDHyD2+XGj+mGdqlSrc1Ani51KBRCLjpN7Wh7 F7FQ== X-Received: by 10.59.10.9 with SMTP id dw9mr10993060ved.3.1368469767893; Mon, 13 May 2013 11:29:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.27.231 with SMTP id w7ls3087328qeg.41.gmail; Mon, 13 May 2013 11:29:27 -0700 (PDT) X-Received: by 10.58.75.46 with SMTP id z14mr2059057vev.52.1368469767667; Mon, 13 May 2013 11:29:27 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id p8si3418937vdv.83.2013.05.13.11.29.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 11:29:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hz10so5833747vcb.10 for ; Mon, 13 May 2013 11:29:27 -0700 (PDT) X-Received: by 10.58.48.166 with SMTP id m6mr19020236ven.59.1368469767383; Mon, 13 May 2013 11:29:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp29447vcb; Mon, 13 May 2013 11:29:26 -0700 (PDT) X-Received: by 10.66.158.36 with SMTP id wr4mr30793182pab.28.1368469766351; Mon, 13 May 2013 11:29:26 -0700 (PDT) Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [2607:f8b0:400e:c01::231]) by mx.google.com with ESMTPS id ad8si5204415pbd.276.2013.05.13.11.29.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 11:29:26 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::231 is neither permitted nor denied by best guess record for domain of sebastian.capella@linaro.org) client-ip=2607:f8b0:400e:c01::231; Received: by mail-pb0-f49.google.com with SMTP id rp2so1937670pbb.8 for ; Mon, 13 May 2013 11:29:26 -0700 (PDT) X-Received: by 10.68.112.1 with SMTP id im1mr30549294pbb.116.1368469765964; Mon, 13 May 2013 11:29:25 -0700 (PDT) Received: from localhost (rrcs-108-178-170-106.west.biz.rr.com. [108.178.170.106]) by mx.google.com with ESMTPSA id ov2sm14925956pbc.34.2013.05.13.11.29.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 13 May 2013 11:29:25 -0700 (PDT) From: Sebastian Capella To: lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, Sebastian Capella Subject: [PATCH] cpuidle: arm_big_little: route target residency to mcpm Date: Mon, 13 May 2013 11:29:04 -0700 Message-Id: <1368469744-25810-2-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368469744-25810-1-git-send-email-sebastian.capella@linaro.org> References: <1368469744-25810-1-git-send-email-sebastian.capella@linaro.org> X-Gm-Message-State: ALoCoQljt6B8VxUzGvHxtjqa3DEWQF59/SgBNzchp7Ozeamp1Bdr9YeaYe4T8LgmbKakxGjDHkag X-Original-Sender: sebastian.capella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Pass residency information to the mcpm_cpu_suspend. The information is taken from the target_residency of the intended C-state. When a platform uses multiple powerdown cstates, the residency information indicates which powerdown state is targeted. Multiple powerdown cstate information can be maintained in the device tree and the vendor specific handling will then have enough information to determine what power state to enter without needing additional changes to the big_little framework. Signed-off-by: Sebastian Capella --- drivers/cpuidle/arm_big_little.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/arm_big_little.c b/drivers/cpuidle/arm_big_little.c index a430800..8332b05 100644 --- a/drivers/cpuidle/arm_big_little.c +++ b/drivers/cpuidle/arm_big_little.c @@ -89,7 +89,7 @@ static int notrace bl_powerdown_finisher(unsigned long arg) unsigned int cpu = mpidr & 0xf; mcpm_set_entry_vector(cpu, cluster, cpu_resume); - mcpm_cpu_suspend(0); /* 0 should be replaced with better value here */ + mcpm_cpu_suspend(arg); return 1; } @@ -107,6 +107,7 @@ static int bl_enter_powerdown(struct cpuidle_device *dev, { struct timespec ts_preidle, ts_postidle, ts_idle; int ret; + struct cpuidle_state *state = &drv->states[idx]; /* Used to keep track of the total time in idle */ getnstimeofday(&ts_preidle); @@ -117,7 +118,8 @@ static int bl_enter_powerdown(struct cpuidle_device *dev, clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); - ret = cpu_suspend((unsigned long) dev, bl_powerdown_finisher); + ret = cpu_suspend((unsigned long) state->target_residency, + bl_powerdown_finisher); if (ret) BUG();