From patchwork Fri Jul 8 17:07:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 71695 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp554896qgy; Fri, 8 Jul 2016 10:10:56 -0700 (PDT) X-Received: by 10.66.47.100 with SMTP id c4mr11608313pan.105.1467997856675; Fri, 08 Jul 2016 10:10:56 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id zw4si204054pac.130.2016.07.08.10.10.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 10:10:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLZHq-0001oj-M5; Fri, 08 Jul 2016 17:09:58 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLZGh-0000WQ-BX for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2016 17:08:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E115ABBC; Fri, 8 Jul 2016 10:09:21 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.207.160]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D0C7A3F41F; Fri, 8 Jul 2016 10:08:18 -0700 (PDT) From: Sudeep Holla To: ACPI List , "Rafael J . Wysocki" Subject: [PATCH v9 6/7] arm64: add support for ACPI Low Power Idle(LPI) Date: Fri, 8 Jul 2016 18:07:57 +0100 Message-Id: <1467997678-7107-7-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467997678-7107-1-git-send-email-sudeep.holla@arm.com> References: <1467997678-7107-1-git-send-email-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160708_100847_621521_BB129E6E X-CRM114-Status: UNSURE ( 6.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , Catalin Marinas , Prashanth Prakash , Al Stone , Vikas Sajjan , Daniel Lezcano , Will Deacon , LKML , Ashwin Chaugule , Sudeep Holla , ALKML , Sunil MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This patch adds appropriate callbacks to support ACPI Low Power Idle (LPI) on ARM64. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: "Rafael J. Wysocki" Acked-by: Lorenzo Pieralisi Signed-off-by: Sudeep Holla --- arch/arm64/kernel/cpuidle.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c index 06786fdaadeb..75a0f8acef66 100644 --- a/arch/arm64/kernel/cpuidle.c +++ b/arch/arm64/kernel/cpuidle.c @@ -9,6 +9,9 @@ * published by the Free Software Foundation. */ +#include +#include +#include #include #include @@ -39,3 +42,18 @@ int arm_cpuidle_suspend(int index) return cpu_ops[cpu]->cpu_suspend(index); } + +#ifdef CONFIG_ACPI + +#include + +int acpi_processor_ffh_lpi_probe(unsigned int cpu) +{ + return arm_cpuidle_init(cpu); +} + +int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi) +{ + return CPU_PM_CPU_IDLE_ENTER(arm_cpuidle_suspend, lpi->index); +} +#endif