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: 9221497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B14660467 for ; Fri, 8 Jul 2016 17:10:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 257EF27D76 for ; Fri, 8 Jul 2016 17:10:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19B5427D9B; Fri, 8 Jul 2016 17:10:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABDA727D76 for ; Fri, 8 Jul 2016 17:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756162AbcGHRKF (ORCPT ); Fri, 8 Jul 2016 13:10:05 -0400 Received: from foss.arm.com ([217.140.101.70]:44599 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932909AbcGHRIW (ORCPT ); Fri, 8 Jul 2016 13:08:22 -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 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" Cc: Sudeep Holla , Vikas Sajjan , Sunil , Lorenzo Pieralisi , Prashanth Prakash , Al Stone , Ashwin Chaugule , Daniel Lezcano , LKML , ALKML , Catalin Marinas , Will Deacon , Mark Rutland 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> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Catalin Marinas --- arch/arm64/kernel/cpuidle.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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