From patchwork Fri Jun 27 03:49:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4433271 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 60E06BEEAA for ; Fri, 27 Jun 2014 03:54:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A8AB201EF for ; Fri, 27 Jun 2014 03:54:09 +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 6F1CE201C0 for ; Fri, 27 Jun 2014 03:54:08 +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 1X0NCv-0004dC-U0; Fri, 27 Jun 2014 03:52:13 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0NCl-0004HZ-Vi for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2014 03:52:04 +0000 Received: by mail-pa0-f53.google.com with SMTP id ey11so3996426pad.26 for ; Thu, 26 Jun 2014 20:51:42 -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=sz+dzFojp1ZwUEJ406EMrXD8mObfdFn/yM2084v+vgA=; b=aHEDYeg0FfST7OEoiuy4it07kUkvyHbTPP88SIAwsMLheIEizV4nwNhI5i5EEDRPRK Tud6qW09i/oThIVP+6yMMgbP4ebDpx25jXKACRDqwZq7xc7j2i5xPzuN0Vz+JqdkBJ65 Vkgyz3ve+6mtfVfveKbaSj1x6IUz/ALmXl6b0QlbsLSaWOY62p7y6KSjpdM1Ky5dLLKj 2+vU/QA+X7NC7yAiVccDVTUT0/i7xVcEJJuppV+eGrw/enzt0uQVksNJkqu/tfnsTYhq Eck9cm/tut1sNHnqKmaSgmPoA3OS9yrvDTGXj3t0LCmDon8875bCvhu+foX+UZwVZoiQ MpgQ== X-Gm-Message-State: ALoCoQnq53FZxC8i4LnHaUxH7h358hrCkcWbSf3SoECzvBhaw2wSHqY+WrV+UeteEoUh2zA4aoCK X-Received: by 10.68.220.137 with SMTP id pw9mr27823338pbc.24.1403841102556; Thu, 26 Jun 2014 20:51:42 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id qv3sm12289326pbb.87.2014.06.26.20.51.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Jun 2014 20:51:41 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 07/13] ARM64 / ACPI: Introduce lowlevel suspend function Date: Fri, 27 Jun 2014 11:49:30 +0800 Message-Id: <1403840976-7456-8-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403840976-7456-1-git-send-email-hanjun.guo@linaro.org> References: <1403840976-7456-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_205204_068445_997CFFD1 X-CRM114-Status: GOOD ( 11.59 ) X-Spam-Score: -0.7 (/) Cc: Mark Rutland , lorenzo.pieralisi@arm.com, rric@kernel.org, Graeme Gregory , Arnd Bergmann , linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org, Grant Likely , Hanjun Guo , Sudeep Holla , Bjorn Helgaas , Charles.Garcia-Tobin@arm.com 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, T_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 ++++++++++++ drivers/acpi/plat/arm-core.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 3ea6b84..a93e8ae 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -39,6 +39,18 @@ static inline void disable_acpi(void) */ #define cpu_physical_id(cpu) -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 just we + * just introduce function and macro needed by + * ACPI core, and revisit them when the spec is ready. + */ +extern int (*acpi_suspend_lowlevel)(void); +#define acpi_wakeup_address (0) + static inline bool acpi_arch_is_smp(void) { return 1; diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index cf46c25..0155a98 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -129,3 +129,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);