From patchwork Thu Jul 24 13:00:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4617791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6AE9F9F295 for ; Thu, 24 Jul 2014 13:04:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A1F3201F5 for ; Thu, 24 Jul 2014 13:04:15 +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 8ED1E201E4 for ; Thu, 24 Jul 2014 13:04:14 +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 1XAIeh-00086L-FR; Thu, 24 Jul 2014 13:01:55 +0000 Received: from mail-pa0-f51.google.com ([209.85.220.51]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAIeU-0007We-4E for linux-arm-kernel@lists.infradead.org; Thu, 24 Jul 2014 13:01:42 +0000 Received: by mail-pa0-f51.google.com with SMTP id ey11so3890964pad.38 for ; Thu, 24 Jul 2014 06:01:17 -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=Rq4N+jkLYU9f/lE5NzWCc7FySgoFPHKkViNLutZXtfc=; b=PybzzC4wVwSldJAmL+N0UmsnkDP9L/NnhMJHFRGWzQAOyHAjug8nFl6do2DCtodHHQ 6L5isGc1JVo/a8VhTybY5o51xIK9p7THsZGz65FewqZWMFqu2/8NG6DPIg8IAN+NOrQv VQXInZEKeBPjCosyKe+owWkmOIvWYKyqFVg8vytkcUJ9teylDTRhJJsJVsi2elhyRUQU Doee1rZUaYkyUHdgZ40xkIZSJkxXyCViRayZ8oZA2gpYJTD6E0FOAw22AyXaqbXifyPL MpsfhsIgEDrTZUkfjLlCcep2YJtzH5CTL4U/sAAN5FKzc3y6CEtCmXaxIwSV77DtgTV0 HVcw== X-Gm-Message-State: ALoCoQknt9NPTR4/auMFcYYRh/2q/LzV/1PCe7PApkSqNfuX+paBGNIRRGcHlOqkfikm8MRvtt7s X-Received: by 10.70.34.228 with SMTP id c4mr10059458pdj.76.1406206876998; Thu, 24 Jul 2014 06:01:16 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id oy12sm5572775pbb.27.2014.07.24.06.01.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:01:15 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland Subject: [PATCH 03/19] ARM64 / ACPI: Introduce lowlevel suspend function Date: Thu, 24 Jul 2014 21:00:09 +0800 Message-Id: <1406206825-15590-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> References: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140724_060142_189087_6B9B5003 X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: -0.7 (/) Cc: Mark Brown , Liviu Dudau , Lv Zheng , 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 , linaro-acpi-private@linaro.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , Sudeep Holla 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=-1.9 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. Reviewed-by: Grant Likely 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 e8581ea..44b617f 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -36,6 +36,18 @@ static inline bool acpi_has_cpu_in_madt(void) return 1; } +/* 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 ac78e4e..f5a10b5 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -95,3 +95,10 @@ static int __init parse_acpi(char *arg) return 0; } early_param("acpi", parse_acpi); + +/* + * acpi_suspend_lowlevel() - save kernel state and suspend. + * + * TBD when ARM/ARM64 starts to support suspend... + */ +int (*acpi_suspend_lowlevel)(void);