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: 32608 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D92A8201EF for ; Fri, 27 Jun 2014 03:51:56 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf25704829oag.5 for ; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Kv6CwU8NW0ekW9/03BlGdm9dpBjQVSDJUdSFoKsKu6o=; b=GCH4H8s88TSj5HMkk0P6EPRmBZVyyBDYOEYqycGqBN77/qrTWO6MFrTX39khr/VvdL C0Qv/FEGrQqCAg8yfqMbUJqUkfmsZZr4LAPE5tFdo6dcHleIsKIWvjnvGS7MG1YsXI9s NN1CzxaBwGNLC7BiEdZg7dUFvKOyJKILx3e2k7cts+FmCL20GAAuiQ7KmiVCgAFF30hR cG6IQP3xphY7+2NJcYZbifnVWMo3YCD25c6O2w/lOl+ZknXtjYmrF+1TGcNbIZbyc3ab MgxnuFzDcYupYsV1enqDnfk7DCNyf1Za6YoRsia4Nc+nnIjBtXI+CSoNVA6OqbpdXdD6 fjeQ== X-Gm-Message-State: ALoCoQmjEhcMekxzR756MfdeAUrSMMtXq+0zooTQqSLuVC4gg1+ifDWix6DGl3KRkIqZYnLpFeC5 X-Received: by 10.43.66.6 with SMTP id xo6mr8955058icb.33.1403841116412; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.19 with SMTP id 19ls456870qgc.69.gmail; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) X-Received: by 10.58.116.4 with SMTP id js4mr6548683veb.38.1403841116311; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id sj4si5735119vec.18.2014.06.26.20.51.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 20:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so4462349vcb.22 for ; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) X-Received: by 10.52.185.72 with SMTP id fa8mr14786075vdc.12.1403841116231; Thu, 26 Jun 2014 20:51:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp77037vcb; Thu, 26 Jun 2014 20:51:55 -0700 (PDT) X-Received: by 10.66.66.135 with SMTP id f7mr27603792pat.22.1403841115523; Thu, 26 Jun 2014 20:51:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sf3si724350pbb.149.2014.06.26.20.51.54; Thu, 26 Jun 2014 20:51:54 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbaF0Dvp (ORCPT + 27 others); Thu, 26 Jun 2014 23:51:45 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:43581 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbaF0Dvn (ORCPT ); Thu, 26 Jun 2014 23:51:43 -0400 Received: by mail-pb0-f50.google.com with SMTP id rp16so4006681pbb.23 for ; Thu, 26 Jun 2014 20:51:42 -0700 (PDT) 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 Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Bjorn Helgaas , rric@kernel.org, Grant Likely , Sudeep Holla , Mark Rutland , Charles.Garcia-Tobin@arm.com, lorenzo.pieralisi@arm.com, linaro-acpi@lists.linaro.org, Graeme Gregory , Hanjun Guo 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);