From patchwork Mon Sep 1 14:57:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 36369 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2A9182032B for ; Mon, 1 Sep 2014 14:59:34 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id w7sf19034858qcr.11 for ; Mon, 01 Sep 2014 07:59:34 -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=RYZciZmXnisM7ntwN7/DeG6hlHtxDUjC/ikE2FMmgCU=; b=XrhpIMhSvl6CpzTKI6hczMq2JwV7D05D6OudG+6SyTXHm5zJe+7UmlCX9PgXulZl17 ZSanTbUgst3ibQOaQ0YGiHS/aTdumPmjH5fY2/SIM6MVXg/Tqf16JJJA+wePGJdvg1BY bRxlp+QGertcYZi7QzEfw6VWtK8HpMVXbxbW50xUAyLzgBYVBSwIi1C3c8rksX46kE6G oMaE1hGn1Nwrt51/ja1sNUsl1HAKimppD6re0UDr0QIGyfyssFnCwjeWo3Afqs6Y+Nvv STcnKgb1RUy30uv88hLrkmhmn/sDyfModAKOq9DdKI6Yg/5uhTBW2LMjGl5FQnHurjbU Bs6g== X-Gm-Message-State: ALoCoQnI4fHgnaIg6yN+n6Glj3slxAw+O5ejBwJVur9yqar4Fm7m+6dZwAnsMRGd2Z7Wu2EHkXoA X-Received: by 10.236.126.103 with SMTP id a67mr16502967yhi.4.1409583574019; Mon, 01 Sep 2014 07:59:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.100 with SMTP id l91ls1962178qge.69.gmail; Mon, 01 Sep 2014 07:59:33 -0700 (PDT) X-Received: by 10.220.130.131 with SMTP id t3mr1283097vcs.30.1409583573927; Mon, 01 Sep 2014 07:59:33 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id x7si561857vcs.31.2014.09.01.07.59.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 07:59:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so5509823vcb.7 for ; Mon, 01 Sep 2014 07:59:33 -0700 (PDT) X-Received: by 10.220.172.8 with SMTP id j8mr859596vcz.32.1409583573838; Mon, 01 Sep 2014 07:59:33 -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.45.67 with SMTP id uj3csp399476vcb; Mon, 1 Sep 2014 07:59:33 -0700 (PDT) X-Received: by 10.70.137.98 with SMTP id qh2mr40424876pdb.61.1409583572946; Mon, 01 Sep 2014 07:59:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp5si1479166pdb.196.2014.09.01.07.59.32 for ; Mon, 01 Sep 2014 07:59:32 -0700 (PDT) Received-SPF: none (google.com: linux-acpi-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 S1754406AbaIAO7Z (ORCPT + 7 others); Mon, 1 Sep 2014 10:59:25 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:46937 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754405AbaIAO7Z (ORCPT ); Mon, 1 Sep 2014 10:59:25 -0400 Received: by mail-pd0-f173.google.com with SMTP id p10so6363944pdj.32 for ; Mon, 01 Sep 2014 07:59:24 -0700 (PDT) X-Received: by 10.69.18.203 with SMTP id go11mr39745982pbd.50.1409583564144; Mon, 01 Sep 2014 07:59:24 -0700 (PDT) Received: from localhost ([202.104.114.248]) by mx.google.com with ESMTPSA id q13sm1621102pdj.44.2014.09.01.07.59.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Sep 2014 07:59:23 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely Cc: Graeme Gregory , Arnd Bergmann , 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 v3 03/17] ARM64 / ACPI: Introduce lowlevel suspend function Date: Mon, 1 Sep 2014 22:57:41 +0800 Message-Id: <1409583475-6978-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1409583475-6978-1-git-send-email-hanjun.guo@linaro.org> References: <1409583475-6978-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@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.176 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 8b837ab..02bbb0b 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 9252f72..b6940a0 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -67,3 +67,10 @@ void __init acpi_boot_table_init(void) if (acpi_table_init()) disable_acpi(); } + +/* + * acpi_suspend_lowlevel() - save kernel state and suspend. + * + * TBD when ARM/ARM64 starts to support suspend... + */ +int (*acpi_suspend_lowlevel)(void) = NULL;