From patchwork Tue Aug 4 05:48:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 51892 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 2CD07229FD for ; Tue, 4 Aug 2015 05:51:30 +0000 (UTC) Received: by lbbnr7 with SMTP id nr7sf48722865lbb.2 for ; Mon, 03 Aug 2015 22:51:29 -0700 (PDT) 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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=wxQmT3PO10IZlx7lh+68PhpU5yLfDmkO+mFOo9nxDnk=; b=MOejbpodvCs73SzHoamlK726IcE4rPhLskSCGsirCzGVzflkZyd2KfVNGdhlYX5+6Y v4crCBOdO3zwo36M/fIC5fpzW2Nl4SmgvfN3e3HxTXMyNRGIvqz1QXY0PF0DpPXmlP8u 1ftzhBfBZ3yqFb+Yp9V7ILTnWs7Muw4XCOLWR8X8lhGI8d99eDYhsihyiFkl4uuPaj3U 2fCFSioFYxy3NqeImdNXyCKHMDiqFNFlelwu9JA2TYVJS+b5+HpEoQ0uhXEq2mom80wJ jz7pg7R42iao+An+U20JyJf6jk1zZxfJmzRi9xrhhN36EVVHfi6w2z8CHbx7sycUeIkh UJcw== X-Gm-Message-State: ALoCoQlh9M2UXPmAAN+4/O8F0b0URKlQJraSjOMreYkkPkrUEk9DIi0ko8mj8Y8yN+1HgrDRnQhf X-Received: by 10.194.173.3 with SMTP id bg3mr561710wjc.5.1438667489086; Mon, 03 Aug 2015 22:51:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.99 with SMTP id p3ls600015laj.57.gmail; Mon, 03 Aug 2015 22:51:28 -0700 (PDT) X-Received: by 10.152.23.72 with SMTP id k8mr1553397laf.34.1438667488914; Mon, 03 Aug 2015 22:51:28 -0700 (PDT) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com. [2a00:1450:4010:c03::229]) by mx.google.com with ESMTPS id s12si13859979lbp.106.2015.08.03.22.51.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 22:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::229 as permitted sender) client-ip=2a00:1450:4010:c03::229; Received: by labgo9 with SMTP id go9so42352524lab.3 for ; Mon, 03 Aug 2015 22:51:28 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr1482126lbc.19.1438667488828; Mon, 03 Aug 2015 22:51:28 -0700 (PDT) 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.112.7.198 with SMTP id l6csp2226856lba; Mon, 3 Aug 2015 22:51:27 -0700 (PDT) X-Received: by 10.68.134.129 with SMTP id pk1mr4122682pbb.65.1438667486951; Mon, 03 Aug 2015 22:51:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pm3si30647352pdb.3.2015.08.03.22.51.25; Mon, 03 Aug 2015 22:51:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 S1752082AbbHDFvY (ORCPT + 12 others); Tue, 4 Aug 2015 01:51:24 -0400 Received: from m50-112.126.com ([123.125.50.112]:39819 "EHLO m50-112.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750849AbbHDFvY (ORCPT ); Tue, 4 Aug 2015 01:51:24 -0400 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp6 (Coremail) with SMTP id j9KowAAXLUKAUsBVumIjAQ--.6195S3; Tue, 04 Aug 2015 13:50:00 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org, Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Xunlei Pang Subject: [PATCH v2 1/3] cpuidle/coupled: Remove cpuidle_device::safe_state_index Date: Tue, 4 Aug 2015 13:48:55 +0800 Message-Id: <1438667337-16903-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: j9KowAAXLUKAUsBVumIjAQ--.6195S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZFW3CF43JF1fXr17Jw4rAFb_yoW8Xw4DpF WDW3yakr1kt348W397Zw10kFyUW34kurWrKrW5Ka43XFn7tFnYqan8tF98Zrs7AFWkCF12 q3sFyr98JayjgF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j2_M3UUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbi6AlMv1UJRnDBvQAAsE Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::229 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@126.com; dmarc=fail (p=NONE dis=NONE) header.from=126.com 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: , From: Xunlei Pang cpuidle_device::safe_state_index need to be initialized before use, it should be the same as cpuidle_driver::safe_state_index. We tackled this issue by removing the safe_state_index from the cpuidle_device structure and use the one in the cpuidle_driver structure instead. Suggested-by: Daniel Lezcano Signed-off-by: Xunlei Pang --- drivers/cpuidle/coupled.c | 4 ++-- include/linux/cpuidle.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 7936dce..6493e40 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -473,7 +473,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev, return entered_state; } entered_state = cpuidle_enter_state(dev, drv, - dev->safe_state_index); + drv->safe_state_index); local_irq_disable(); } @@ -521,7 +521,7 @@ retry: } entered_state = cpuidle_enter_state(dev, drv, - dev->safe_state_index); + drv->safe_state_index); local_irq_disable(); } diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index d075d34..786ad32 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -84,7 +84,6 @@ struct cpuidle_device { struct list_head device_list; #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED - int safe_state_index; cpumask_t coupled_cpus; struct cpuidle_coupled *coupled; #endif