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: 34860 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C66F21F5F for ; Mon, 4 Aug 2014 15:29:28 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf35976677oif.1 for ; Mon, 04 Aug 2014 08:29: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=BMCiINOlioE1pSrEWpo4xwcOgPQg7D/7pO8xdn+IEzE=; b=bHdtXbv0epCsTNkQh2U+DY+Es4xeYt3C7I48neZlWPrOABgFCLSqrRx5Lu6CQFfaaM 1G+i8rePgdQ9u/Hxn1Mmmcho3sj3MtzFk/BXDEDQZIiEm/LQJ7b6BoLrxZlT8FDas78Q 4+hMGOLL5QfYZWAQyjkdx/zaDMHLV76USVtqsHA/PomXgnOdLsU0TTYMuqhmCV7UMJpj nPW6N3L9afdHf4mtVr9KVGQJih+0cIlnSCStM4nMNnvJxXnPGhGGjAVIueqBiD3q+90v MpzC72rTUs609OVyupDR9S+c0Vbz7FbThZIbwf2AonHRD71ZhyArpexE5xGyaMZg3lNp Qctw== X-Gm-Message-State: ALoCoQnFlqOI4cih9R3dB2U9sowrPoW9eYnZdw3LzlGWsutivTd4koj6dsKeH1ITS9GvxfgEbdJK X-Received: by 10.42.133.200 with SMTP id i8mr32938863ict.14.1407166167686; Mon, 04 Aug 2014 08:29:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.68 with SMTP id h62ls2232190qge.52.gmail; Mon, 04 Aug 2014 08:29:27 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr6219564vdb.27.1407166167548; Mon, 04 Aug 2014 08:29:27 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id g14si12161600vdh.66.2014.08.04.08.29.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Aug 2014 08:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so11266086vcb.15 for ; Mon, 04 Aug 2014 08:29:25 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr20618182vdc.8.1407166165819; Mon, 04 Aug 2014 08:29: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 tc5csp313234vcb; Mon, 4 Aug 2014 08:29:25 -0700 (PDT) X-Received: by 10.70.36.135 with SMTP id q7mr24978418pdj.79.1407166164697; Mon, 04 Aug 2014 08:29:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tg9si3460451pab.183.2014.08.04.08.29.24 for ; Mon, 04 Aug 2014 08:29: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 S1752921AbaHDP3V (ORCPT + 21 others); Mon, 4 Aug 2014 11:29:21 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:47432 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752880AbaHDP3S (ORCPT ); Mon, 4 Aug 2014 11:29:18 -0400 Received: by mail-pa0-f44.google.com with SMTP id eu11so10239357pac.31 for ; Mon, 04 Aug 2014 08:29:16 -0700 (PDT) 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 Cc: Graeme Gregory , Arnd Bergmann , Olof Johansson , Grant Likely , Sudeep Holla , Will Deacon , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Rob Herring , 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@lists.linaro.org, Hanjun Guo 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> 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.170 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. 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;