From patchwork Tue Jul 19 17:52:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 72351 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp209054qga; Tue, 19 Jul 2016 10:54:06 -0700 (PDT) X-Received: by 10.98.63.1 with SMTP id m1mr47804628pfa.14.1468950840302; Tue, 19 Jul 2016 10:54:00 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jy14si33839478pad.41.2016.07.19.10.54.00; Tue, 19 Jul 2016 10:54:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbcGSRxz (ORCPT + 29 others); Tue, 19 Jul 2016 13:53:55 -0400 Received: from foss.arm.com ([217.140.101.70]:37491 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753730AbcGSRxv (ORCPT ); Tue, 19 Jul 2016 13:53:51 -0400 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 4358BBB4; Tue, 19 Jul 2016 10:55:00 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 380573F25F; Tue, 19 Jul 2016 10:53:48 -0700 (PDT) From: Sudeep Holla To: ACPI List , "Rafael J . Wysocki" Cc: Sudeep Holla , Vikas Sajjan , Sunil , Lorenzo Pieralisi , PrashanthPrakash , Al Stone , Ashwin Chaugule , Daniel Lezcano , LKML , ALKML , Will Deacon , Mark Rutland Subject: [PATCH v10 6/7] arm64: add support for ACPI Low Power Idle(LPI) Date: Tue, 19 Jul 2016 18:52:58 +0100 Message-Id: <1468950779-21745-7-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468950779-21745-1-git-send-email-sudeep.holla@arm.com> References: <1468950779-21745-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds appropriate callbacks to support ACPI Low Power Idle (LPI) on ARM64. Cc: Will Deacon Cc: Mark Rutland Cc: "Rafael J. Wysocki" Acked-by: Catalin Marinas Acked-by: Lorenzo Pieralisi Signed-off-by: Sudeep Holla --- arch/arm64/kernel/cpuidle.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.7.4 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