lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Mar 2015 22:49:25 +0000
From:	G Gregory <graeme.gregory@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Hanjun Guo <hanjun.guo@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Olof Johansson <olof@...om.net>,
	Grant Likely <grant.likely@...aro.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Arnd Bergmann <arnd@...db.de>,
	Mark Rutland <mark.rutland@....com>,
	Sudeep Holla <Sudeep.Holla@....com>,
	Jon Masters <jcm@...hat.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Mark Brown <broonie@...nel.org>,
	Robert Richter <rric@...nel.org>,
	Timur Tabi <timur@...eaurora.org>,
	Ashwin Chaugule <ashwinc@...eaurora.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linaro ACPI Mailman List <linaro-acpi@...ts.linaro.org>,
	Tomasz Nowicki <tomasz.nowicki@...aro.org>
Subject: Re: [PATCH v9 07/21] ACPI / sleep: Introduce arm64 specific acpi_sleep.c

On 4 March 2015 at 22:38, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> On Wednesday, February 25, 2015 04:39:47 PM Hanjun Guo wrote:
>> From: Graeme Gregory <graeme.gregory@...aro.org>
>>
>> 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 <rjw@...ysocki.net>
>> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
>> Tested-by: Yijing Wang <wangyijing@...wei.com>
>> Tested-by: Mark Langsdorf <mlangsdo@...hat.com>
>> Tested-by: Jon Masters <jcm@...hat.com>
>> Tested-by: Timur Tabi <timur@...eaurora.org>
>> Tested-by: Robert Richter <rrichter@...ium.com>
>> Acked-by: Robert Richter <rrichter@...ium.com>
>> Signed-off-by: Graeme Gregory <graeme.gregory@...aro.org>
>> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@...aro.org>
>> Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org>
>> ---
>>  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 <graeme.gregory@...aro.org>
>> + *
>> + *  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 <linux/acpi.h>
>> +
>> +/*
>> + * 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?
>
Its the standard example in the GNU Make manual, I would certainly
love if someone had a batter suggestion.

Graeme
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ