From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbbCDWO0 (ORCPT ); Wed, 4 Mar 2015 17:14:26 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:64779 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752172AbbCDWOY (ORCPT ); Wed, 4 Mar 2015 17:14:24 -0500 From: "Rafael J. Wysocki" To: Hanjun Guo Cc: Catalin Marinas , Will Deacon , Olof Johansson , Grant Likely , Lorenzo Pieralisi , Arnd Bergmann , Mark Rutland , Graeme Gregory , Sudeep Holla , Jon Masters , Marc Zyngier , Mark Brown , Robert Richter , Timur Tabi , Ashwin Chaugule , suravee.suthikulpanit@amd.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Tomasz Nowicki Subject: Re: [PATCH v9 07/21] ACPI / sleep: Introduce arm64 specific acpi_sleep.c Date: Wed, 04 Mar 2015 23:38 +0100 Message-ID: <2076446.VFvTauDDiK@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.19.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1424853601-6675-8-git-send-email-hanjun.guo@linaro.org> References: <1424853601-6675-1-git-send-email-hanjun.guo@linaro.org> <1424853601-6675-8-git-send-email-hanjun.guo@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, February 25, 2015 04:39:47 PM Hanjun Guo wrote: > From: Graeme Gregory > > ACPI 5.1 does not currently support S states for ARM64 hardware but > ACPI code will call acpi_target_system_state() for device power > management, so introduce acpi_sleep.c to allow other drivers to function > until S states are defined. > > Since it is arm64 specific stub holder, so let acpi_sleep.c to ARM64 > specific. > > TODO: merge this with drivers/acpi/sleep.c once we fix the specification. > > CC: Rafael J. Wysocki > Tested-by: Suravee Suthikulpanit > Tested-by: Yijing Wang > Tested-by: Mark Langsdorf > Tested-by: Jon Masters > Tested-by: Timur Tabi > Tested-by: Robert Richter > Acked-by: Robert Richter > Signed-off-by: Graeme Gregory > Signed-off-by: Tomasz Nowicki > Signed-off-by: Hanjun Guo > --- > arch/arm64/kernel/Makefile | 2 +- > arch/arm64/kernel/acpi_sleep.c | 28 ++++++++++++++++++++++++++++ > drivers/acpi/Makefile | 2 ++ > 3 files changed, 31 insertions(+), 1 deletion(-) > create mode 100644 arch/arm64/kernel/acpi_sleep.c > > diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile > index 218eb7e..4435943 100644 > --- a/arch/arm64/kernel/Makefile > +++ b/arch/arm64/kernel/Makefile > @@ -34,7 +34,7 @@ arm64-obj-$(CONFIG_KGDB) += kgdb.o > arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o > arm64-obj-$(CONFIG_PCI) += pci.o > arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o > -arm64-obj-$(CONFIG_ACPI) += acpi.o > +arm64-obj-$(CONFIG_ACPI) += acpi.o acpi_sleep.o > > obj-y += $(arm64-obj-y) vdso/ > obj-m += $(arm64-obj-m) > diff --git a/arch/arm64/kernel/acpi_sleep.c b/arch/arm64/kernel/acpi_sleep.c > new file mode 100644 > index 0000000..54578ef > --- /dev/null > +++ b/arch/arm64/kernel/acpi_sleep.c > @@ -0,0 +1,28 @@ > +/* > + * ARM64 Specific Sleep Functionality > + * > + * Copyright (C) 2013-2014, Linaro Ltd. > + * Author: Graeme Gregory > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#include > + > +/* > + * Currently the ACPI 5.1 standard does not define S states in a > + * manner which is usable for ARM64. These two stubs are sufficient > + * that system initialises and device PM works. > + */ > +u32 acpi_target_system_state(void) > +{ > + return ACPI_STATE_S0; > +} > +EXPORT_SYMBOL_GPL(acpi_target_system_state); > + > +int __init acpi_sleep_init(void) > +{ > + return -ENOSYS; > +} > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > index 623b117..c32edf5 100644 > --- a/drivers/acpi/Makefile > +++ b/drivers/acpi/Makefile > @@ -23,7 +23,9 @@ acpi-y += nvs.o > > # Power management related files > acpi-y += wakeup.o > +ifneq (,$(findstring $(ARCH),x86 ia64)) This is super-ugly. Isn't there a better way to do that? > acpi-y += sleep.o > +endif > acpi-y += device_pm.o > acpi-$(CONFIG_ACPI_SLEEP) += proc.o > > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.