From patchwork Mon Aug 4 15:28:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4670891 Return-Path: X-Original-To: patchwork-linux-arm@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 D74E6C0338 for ; Mon, 4 Aug 2014 15:31:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E79EC2013A for ; Mon, 4 Aug 2014 15:31:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A403620127 for ; Mon, 4 Aug 2014 15:31:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEKCk-0006xB-TO; Mon, 04 Aug 2014 15:29:42 +0000 Received: from mail-pd0-f179.google.com ([209.85.192.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEKCf-0006p3-EF for linux-arm-kernel@lists.infradead.org; Mon, 04 Aug 2014 15:29:41 +0000 Received: by mail-pd0-f179.google.com with SMTP id ft15so9871308pdb.10 for ; Mon, 04 Aug 2014 08:29:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jUy2Y3nQkNK6bcx4kcYRhy22+r3rf4og22eEC9iHgZY=; b=bS2Iv1iHT8AHfQt+ipmHj6LUGK50RocvGAxJvuZjCn6ObAE5O+Cx8G+wYLwN6WvhIY RlDFlLaXxeY2XYl8NhsBdNCtMOUy8AkCdKrzj2SHIq3TMDAjWuIX1fnjUWOw7tDoCYeY zrcPCiVFeHSjQ0kP1hLKws2hT9FQSGBrgfPaiNVWvErfKnxwFyONeEGUu0fjGrRkIT9B azlKXhJzvr0F6HRhB2wIaxE6Pb92AVGXcvtxXW3tqnt0Og6a5VABcq/gz92wSH2mM8la OAuOERhyskAf/5YLyFjMN4G/x4B5Qf/5FyfC3F+fGR/ys/LtPZPdL9A1amM4z0Auzyih gJ2g== X-Gm-Message-State: ALoCoQnGFffwlKoh7QK0dSKzHmFNJtXuH1pEe2ptwYVIzDOv1b2NHa1slHW5ADiCRAdRvLtw/YyK X-Received: by 10.70.89.3 with SMTP id bk3mr942431pdb.41.1407166156510; Mon, 04 Aug 2014 08:29:16 -0700 (PDT) Received: from localhost ([39.182.20.233]) by mx.google.com with ESMTPSA id os4sm27207770pdb.67.2014.08.04.08.29.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Aug 2014 08:29:15 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland Subject: [PATCH v2 03/18] ARM64 / ACPI: Introduce lowlevel suspend function Date: Mon, 4 Aug 2014 23:28:10 +0800 Message-Id: <1407166105-17675-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1407166105-17675-1-git-send-email-hanjun.guo@linaro.org> References: <1407166105-17675-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140804_082937_534671_97567777 X-CRM114-Status: GOOD ( 12.13 ) X-Spam-Score: -1.4 (-) Cc: linaro-acpi@lists.linaro.org, Liviu Dudau , Lv Zheng , Rob Herring , Lorenzo Pieralisi , Daniel Lezcano , Robert Moore , linux-acpi@vger.kernel.org, Grant Likely , Charles.Garcia-Tobin@arm.com, Robert Richter , Jason Cooper , Arnd Bergmann , Marc Zyngier , Will Deacon , Mark Brown , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , Sudeep Holla , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, 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 From: Graeme Gregory acpi_wakeup_address is used on x86 as the address bios jumps into when machine wakes up from suspend. As arm64 does not have such a bios this mechanism will be provided by other means. But the define is still required inside the acpi core. Introduce a null stub for acpi_suspend_lowlevel as this is also required by core. This will be filled in when standards are defined for arm64 ACPI global power states. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 12 ++++++++++++ arch/arm64/kernel/acpi.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index e06da63..6400312 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -40,6 +40,18 @@ static inline bool acpi_has_cpu_in_madt(void) static inline void arch_fix_phys_package_id(int num, u32 slot) { } +/* Low-level suspend routine. + * + * ACPI S-states for ARM64 have to be defined + * and approved before doing anything else, maybe + * we need update the ACPI spec, here we + * just introduce function and macro needed by + * ACPI core as IA64 did, and revisit them when + * the spec is ready. + */ +extern int (*acpi_suspend_lowlevel)(void); +#define acpi_wakeup_address 0 + #endif /* CONFIG_ACPI */ #endif /*_ASM_ACPI_H*/ diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 395778c..9cf9127 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -67,3 +67,10 @@ void __init acpi_boot_table_init(void) return; } } + +/* + * acpi_suspend_lowlevel() - save kernel state and suspend. + * + * TBD when ARM/ARM64 starts to support suspend... + */ +int (*acpi_suspend_lowlevel)(void) = NULL;