From patchwork Thu Oct 30 03:55:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 5193301 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7ABB6C11AC for ; Thu, 30 Oct 2014 03:55:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4CB020274 for ; Thu, 30 Oct 2014 03:55:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD93B20268 for ; Thu, 30 Oct 2014 03:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbaJ3Dzn (ORCPT ); Wed, 29 Oct 2014 23:55:43 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:60535 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752297AbaJ3Dzn (ORCPT ); Wed, 29 Oct 2014 23:55:43 -0400 Received: by mail-pd0-f177.google.com with SMTP id v10so4232822pde.8 for ; Wed, 29 Oct 2014 20:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ygfdmC9/FLoMVJldwxPffNbu7YUF7FHARu+gCET5/V4=; b=VLOtcxJg8bz2FIsgdk9kv+ecNzn6wUCwshMpPCXBahOqc5bAR1UVi0dG9v7V5NCSPA oJbuJJYCc0ytDZcXaPIpvpCAYfnnh3LQhXU1C5AYPtUqH1/1ok+UasIRoz/aDod9H+sY B5y2hPJr89FV0UjHppBWQH1e3eWoS887zKiSI4wNe0UAEC0705qLElnhYWQew3UkZ7W/ WOiYXp56Zw/R5vKzHhORml1iEmc78Vb5yWlKpcE/38LE7taliB/5CilSh5lT8/stx1bF p8p96pRxDq5Vs78hKDwW+BbLhIFrM2GXYYppfpnbLpBHsbccIcYuxe+0Slfqrjg8pJaw Thuw== X-Received: by 10.68.130.134 with SMTP id oe6mr14440080pbb.3.1414641342715; Wed, 29 Oct 2014 20:55:42 -0700 (PDT) Received: from localhost.localdomain ([14.140.216.146]) by mx.google.com with ESMTPSA id p10sm5669272pds.37.2014.10.29.20.55.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Oct 2014 20:55:42 -0700 (PDT) From: Amit Daniel Kachhap To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: Catalin Marinas , Mark Rutland , Lorenzo Pieralisi , Ashwin Chaugule , Vladimir Murzin Subject: [PATCH 2/3] arm64: psci: fix cpu_suspend to check idle state type for index Date: Thu, 30 Oct 2014 09:25:37 +0530 Message-Id: <1414641338-25279-2-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414641338-25279-1-git-send-email-amit.daniel@samsung.com> References: <1414641338-25279-1-git-send-email-amit.daniel@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fix rectifies the psci cpu_suspend to check the C-state type corresponding to the requested index. Signed-off-by: Amit Daniel Kachhap Acked-by: Lorenzo Pieralisi --- arch/arm64/kernel/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 2178d6e..4ebc146 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -530,7 +530,7 @@ static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index) if (WARN_ON_ONCE(!index || !state)) return -EINVAL; - if (state->type == PSCI_POWER_STATE_TYPE_STANDBY) + if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY) ret = psci_ops.cpu_suspend(state[index - 1], 0); else ret = __cpu_suspend(index, psci_suspend_finisher);