From patchwork Mon May 13 18:53:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 16888 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BBC9325E14 for ; Mon, 13 May 2013 18:54:36 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id s10sf8291079qcv.11 for ; Mon, 13 May 2013 11:54:03 -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=LYnHvQb8JHrgjz9K0FoNfSLIQJ4H5pc8sXNFo1ELSAUgWGoy55wbm6RS6l52lwcoXp 7D6j7rTvLp4Jan7y8DwvK86+Ud4WUM0v0AY0czN4ZK/AtnVadEsoW5TnPPfui+VsBeqN ZKmVjuk/MukLY/zG7csk7UbGCbkqMak8v7m3X1Fhjzo+wOGinbNFVk2eQ1b9MGH5bjr5 hKnyYgx5UYbH0YmAw1AiYkmHL16hOKCEcNSXhO5Lb8VJa2pvjHKwW+j267yNTYmNSqiX SKUqakUM+opXXNlTAhv3XwglIUcb/kTNO77Xq5emdqbwKmROrthW5DZFTxwbbQxfJauC k4kg== X-Received: by 10.58.247.34 with SMTP id yb2mr10628812vec.31.1368471243823; Mon, 13 May 2013 11:54:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.71 with SMTP id ok7ls3094516qeb.52.gmail; Mon, 13 May 2013 11:54:03 -0700 (PDT) X-Received: by 10.58.143.77 with SMTP id sc13mr19531355veb.21.1368471243621; Mon, 13 May 2013 11:54:03 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id tq4si9104117vdc.1.2013.05.13.11.54.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 11:54:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 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.180; Received: by mail-vc0-f180.google.com with SMTP id gd11so1333485vcb.11 for ; Mon, 13 May 2013 11:54:03 -0700 (PDT) X-Received: by 10.52.175.200 with SMTP id cc8mr16567266vdc.94.1368471243547; Mon, 13 May 2013 11:54:03 -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 hk15csp30204vcb; Mon, 13 May 2013 11:54:03 -0700 (PDT) X-Received: by 10.66.250.164 with SMTP id zd4mr9287041pac.141.1368471242543; Mon, 13 May 2013 11:54:02 -0700 (PDT) Received: from mail-da0-x236.google.com (mail-da0-x236.google.com [2607:f8b0:400e:c00::236]) by mx.google.com with ESMTPS id lq8si12462882pab.171.2013.05.13.11.54.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 11:54:02 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c00::236 is neither permitted nor denied by best guess record for domain of sebastian.capella@linaro.org) client-ip=2607:f8b0:400e:c00::236; Received: by mail-da0-f54.google.com with SMTP id z17so610561dal.27 for ; Mon, 13 May 2013 11:54:02 -0700 (PDT) X-Received: by 10.68.252.227 with SMTP id zv3mr31219787pbc.14.1368471242161; Mon, 13 May 2013 11:54:02 -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 lq4sm10014768pab.19.2013.05.13.11.54.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 13 May 2013 11:54:01 -0700 (PDT) From: Sebastian Capella To: lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, mark.hambleton@broadcom.com, jamesk@broadcom.com, Sebastian Capella Subject: [PATCH] cpuidle: arm_big_little: route target residency to mcpm Date: Mon, 13 May 2013 11:53:42 -0700 Message-Id: <1368471222-26434-2-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368471222-26434-1-git-send-email-sebastian.capella@linaro.org> References: <1368471222-26434-1-git-send-email-sebastian.capella@linaro.org> X-Gm-Message-State: ALoCoQk/R3/if5c/kJMB51AUaanlq04y18VIuOg2KnKjua8aHiwD+aJrvj9cyNg5IvDNEo9q9g2Q X-Original-Sender: sebastian.capella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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();