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: 34204 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D521420C7F for ; Thu, 24 Jul 2014 13:01:28 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id el20sf1905446lab.4 for ; Thu, 24 Jul 2014 06:01:27 -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=9d2WcYZy1W44afem9b5KnyhlLMvYgqUSJM2vWOn3pyE=; b=B8sGiZd7YUQe5QTDLIWwp2NbaAnN0PyipWFjLuB32PZ9beLrQj2UPZLrTNWeh4kuAc 1G+WjXZTTBZMNvfWcnrpvfch7exOA8DrlWs2B1mzI382deqtrrjjMcjnDF8DbYzDBolW coclZXixSU6vXFxdLoZyscAC2NO8q4Teju7m4AtYltKKaloyn6A0l9eDRcDmsqA862Nd Tf6nlUDZY08GJftJ5APYn4TyHFChWZZ8cYrcx9TawlCQqq6Z4sOQYQZA1acuC0EzAHCY 0dgMQI9rJUVn6bWUXE4TtNbHka8r1eGK+zU3qRF4D2IG1gAq9tpeV1PDNS6g5pbyjp83 Ptzw== X-Gm-Message-State: ALoCoQk2Zz4V2sv/kak5fGXINM6kwGmTiZps/rjrStG03qBoRGzs4+IxB+lyMPY/6k5fPl+BCUs6 X-Received: by 10.112.145.233 with SMTP id sx9mr882538lbb.2.1406206886816; Thu, 24 Jul 2014 06:01:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.17 with SMTP id z17ls762498qge.74.gmail; Thu, 24 Jul 2014 06:01:26 -0700 (PDT) X-Received: by 10.52.24.68 with SMTP id s4mr9783900vdf.37.1406206886616; Thu, 24 Jul 2014 06:01:26 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id b8si4907572vcf.7.2014.07.24.06.01.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so4672275vcb.24 for ; Thu, 24 Jul 2014 06:01:25 -0700 (PDT) X-Received: by 10.220.50.8 with SMTP id x8mr11640428vcf.18.1406206885783; Thu, 24 Jul 2014 06:01:25 -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 tc5csp362811vcb; Thu, 24 Jul 2014 06:01:25 -0700 (PDT) X-Received: by 10.68.129.99 with SMTP id nv3mr9966168pbb.128.1406206884840; Thu, 24 Jul 2014 06:01:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wu7si5953101pbc.34.2014.07.24.06.01.24 for ; Thu, 24 Jul 2014 06:01:24 -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 S1759047AbaGXNBW (ORCPT + 13 others); Thu, 24 Jul 2014 09:01:22 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:39705 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759023AbaGXNBS (ORCPT ); Thu, 24 Jul 2014 09:01:18 -0400 Received: by mail-pa0-f44.google.com with SMTP id eu11so3892926pac.17 for ; Thu, 24 Jul 2014 06:01:17 -0700 (PDT) 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 Cc: Graeme Gregory , Arnd Bergmann , Grant Likely , Sudeep Holla , Will Deacon , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles.Garcia-Tobin@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi-private@linaro.org, Hanjun Guo 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> 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.179 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 ++++++++++++ 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);