* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-13 8:14 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-13 8:14 UTC (permalink / raw) To: Catalin Marinas, Rafael J. Wysocki, Will Deacon, Olof Johansson, Grant Likely Cc: Lorenzo Pieralisi, Arnd Bergmann, Mark Rutland, Graeme Gregory, Sudeep Holla, Jon Masters, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Hanjun Guo From: Graeme Gregory <graeme.gregory@linaro.org> ACPI 5.1 does not currently support S states for ARM64 hardware but ACPI code will call acpi_target_system_state() and acpi_sleep_init() for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP and select it for x86 and ia64 only to make sleep functions available, and also introduce stub function to allow other drivers to function until S states are defined for ARM64. It will be no functional change for x86 and IA64. CC: Rafael J. Wysocki <rjw@rjwysocki.net> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Robert Richter <rrichter@cavium.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> --- arch/ia64/Kconfig | 1 + arch/x86/Kconfig | 1 + drivers/acpi/Kconfig | 4 ++++ drivers/acpi/Makefile | 2 +- drivers/acpi/internal.h | 4 ++++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 074e52b..e8728d7 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -10,6 +10,7 @@ config IA64 select ARCH_MIGHT_HAVE_PC_SERIO select PCI if (!IA64_HP_SIM) select ACPI if (!IA64_HP_SIM) + select ACPI_GENERIC_SLEEP if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b7d31ca..9804431 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -22,6 +22,7 @@ config X86_64 ### Arch settings config X86 def_bool y + select ACPI_GENERIC_SLEEP if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_HAS_FAST_MULTIPLIER diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index e6c3ddd..a7b9120 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -48,9 +48,13 @@ config ACPI_LEGACY_TABLES_LOOKUP config ARCH_MIGHT_HAVE_ACPI_PDC bool +config ACPI_GENERIC_SLEEP + bool + config ACPI_SLEEP bool depends on SUSPEND || HIBERNATION + depends on ACPI_GENERIC_SLEEP default y config ACPI_PROCFS_POWER diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 623b117..2397822 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,7 +23,7 @@ acpi-y += nvs.o # Power management related files acpi-y += wakeup.o -acpi-y += sleep.o +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o acpi-y += device_pm.o acpi-$(CONFIG_ACPI_SLEEP) += proc.o diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 56b321a..6f08c85 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -161,7 +161,11 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); /*-------------------------------------------------------------------------- Suspend/Resume -------------------------------------------------------------------------- */ +#ifdef CONFIG_ACPI_GENERIC_SLEEP extern int acpi_sleep_init(void); +#else +static inline int acpi_sleep_init(void) { return -ENXIO; } +#endif #ifdef CONFIG_ACPI_SLEEP int acpi_sleep_proc_init(void); -- 1.9.1 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-13 8:14 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-13 8:14 UTC (permalink / raw) To: linux-arm-kernel From: Graeme Gregory <graeme.gregory@linaro.org> ACPI 5.1 does not currently support S states for ARM64 hardware but ACPI code will call acpi_target_system_state() and acpi_sleep_init() for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP and select it for x86 and ia64 only to make sleep functions available, and also introduce stub function to allow other drivers to function until S states are defined for ARM64. It will be no functional change for x86 and IA64. CC: Rafael J. Wysocki <rjw@rjwysocki.net> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Robert Richter <rrichter@cavium.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> --- arch/ia64/Kconfig | 1 + arch/x86/Kconfig | 1 + drivers/acpi/Kconfig | 4 ++++ drivers/acpi/Makefile | 2 +- drivers/acpi/internal.h | 4 ++++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 074e52b..e8728d7 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -10,6 +10,7 @@ config IA64 select ARCH_MIGHT_HAVE_PC_SERIO select PCI if (!IA64_HP_SIM) select ACPI if (!IA64_HP_SIM) + select ACPI_GENERIC_SLEEP if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b7d31ca..9804431 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -22,6 +22,7 @@ config X86_64 ### Arch settings config X86 def_bool y + select ACPI_GENERIC_SLEEP if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_HAS_FAST_MULTIPLIER diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index e6c3ddd..a7b9120 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -48,9 +48,13 @@ config ACPI_LEGACY_TABLES_LOOKUP config ARCH_MIGHT_HAVE_ACPI_PDC bool +config ACPI_GENERIC_SLEEP + bool + config ACPI_SLEEP bool depends on SUSPEND || HIBERNATION + depends on ACPI_GENERIC_SLEEP default y config ACPI_PROCFS_POWER diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 623b117..2397822 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,7 +23,7 @@ acpi-y += nvs.o # Power management related files acpi-y += wakeup.o -acpi-y += sleep.o +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o acpi-y += device_pm.o acpi-$(CONFIG_ACPI_SLEEP) += proc.o diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 56b321a..6f08c85 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -161,7 +161,11 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); /*-------------------------------------------------------------------------- Suspend/Resume -------------------------------------------------------------------------- */ +#ifdef CONFIG_ACPI_GENERIC_SLEEP extern int acpi_sleep_init(void); +#else +static inline int acpi_sleep_init(void) { return -ENXIO; } +#endif #ifdef CONFIG_ACPI_SLEEP int acpi_sleep_proc_init(void); -- 1.9.1 ^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-13 8:14 ` Hanjun Guo @ 2015-03-13 21:49 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-13 21:49 UTC (permalink / raw) 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > From: Graeme Gregory <graeme.gregory@linaro.org> > > ACPI 5.1 does not currently support S states for ARM64 hardware but > ACPI code will call acpi_target_system_state() and acpi_sleep_init() > for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP > and select it for x86 and ia64 only to make sleep functions available, > and also introduce stub function to allow other drivers to function > until S states are defined for ARM64. > > It will be no functional change for x86 and IA64. > > CC: Rafael J. Wysocki <rjw@rjwysocki.net> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Acked-by: Robert Richter <rrichter@cavium.com> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > --- > arch/ia64/Kconfig | 1 + > arch/x86/Kconfig | 1 + > drivers/acpi/Kconfig | 4 ++++ > drivers/acpi/Makefile | 2 +- > drivers/acpi/internal.h | 4 ++++ > 5 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 074e52b..e8728d7 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -10,6 +10,7 @@ config IA64 > select ARCH_MIGHT_HAVE_PC_SERIO > select PCI if (!IA64_HP_SIM) > select ACPI if (!IA64_HP_SIM) > + select ACPI_GENERIC_SLEEP if ACPI > select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > select HAVE_UNSTABLE_SCHED_CLOCK > select HAVE_IDE > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index b7d31ca..9804431 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -22,6 +22,7 @@ config X86_64 > ### Arch settings > config X86 > def_bool y > + select ACPI_GENERIC_SLEEP if ACPI One more nit. If you did + select ACPI_GENERIC_SLEEP if ACPI_SLEEP here (and above for ia64), you'd avoid having to make ACPI_SLEEP depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS > select ARCH_HAS_FAST_MULTIPLIER > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index e6c3ddd..a7b9120 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -48,9 +48,13 @@ config ACPI_LEGACY_TABLES_LOOKUP > config ARCH_MIGHT_HAVE_ACPI_PDC > bool > > +config ACPI_GENERIC_SLEEP > + bool > + > config ACPI_SLEEP > bool > depends on SUSPEND || HIBERNATION > + depends on ACPI_GENERIC_SLEEP > default y > > config ACPI_PROCFS_POWER > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > index 623b117..2397822 100644 > --- a/drivers/acpi/Makefile > +++ b/drivers/acpi/Makefile > @@ -23,7 +23,7 @@ acpi-y += nvs.o > > # Power management related files > acpi-y += wakeup.o > -acpi-y += sleep.o > +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > acpi-y += device_pm.o > acpi-$(CONFIG_ACPI_SLEEP) += proc.o > > diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h > index 56b321a..6f08c85 100644 > --- a/drivers/acpi/internal.h > +++ b/drivers/acpi/internal.h > @@ -161,7 +161,11 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); > /*-------------------------------------------------------------------------- > Suspend/Resume > -------------------------------------------------------------------------- */ > +#ifdef CONFIG_ACPI_GENERIC_SLEEP > extern int acpi_sleep_init(void); > +#else > +static inline int acpi_sleep_init(void) { return -ENXIO; } > +#endif > > #ifdef CONFIG_ACPI_SLEEP > int acpi_sleep_proc_init(void); > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-13 21:49 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-13 21:49 UTC (permalink / raw) To: linux-arm-kernel On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > From: Graeme Gregory <graeme.gregory@linaro.org> > > ACPI 5.1 does not currently support S states for ARM64 hardware but > ACPI code will call acpi_target_system_state() and acpi_sleep_init() > for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP > and select it for x86 and ia64 only to make sleep functions available, > and also introduce stub function to allow other drivers to function > until S states are defined for ARM64. > > It will be no functional change for x86 and IA64. > > CC: Rafael J. Wysocki <rjw@rjwysocki.net> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Acked-by: Robert Richter <rrichter@cavium.com> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > --- > arch/ia64/Kconfig | 1 + > arch/x86/Kconfig | 1 + > drivers/acpi/Kconfig | 4 ++++ > drivers/acpi/Makefile | 2 +- > drivers/acpi/internal.h | 4 ++++ > 5 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 074e52b..e8728d7 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -10,6 +10,7 @@ config IA64 > select ARCH_MIGHT_HAVE_PC_SERIO > select PCI if (!IA64_HP_SIM) > select ACPI if (!IA64_HP_SIM) > + select ACPI_GENERIC_SLEEP if ACPI > select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > select HAVE_UNSTABLE_SCHED_CLOCK > select HAVE_IDE > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index b7d31ca..9804431 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -22,6 +22,7 @@ config X86_64 > ### Arch settings > config X86 > def_bool y > + select ACPI_GENERIC_SLEEP if ACPI One more nit. If you did + select ACPI_GENERIC_SLEEP if ACPI_SLEEP here (and above for ia64), you'd avoid having to make ACPI_SLEEP depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS > select ARCH_HAS_FAST_MULTIPLIER > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index e6c3ddd..a7b9120 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -48,9 +48,13 @@ config ACPI_LEGACY_TABLES_LOOKUP > config ARCH_MIGHT_HAVE_ACPI_PDC > bool > > +config ACPI_GENERIC_SLEEP > + bool > + > config ACPI_SLEEP > bool > depends on SUSPEND || HIBERNATION > + depends on ACPI_GENERIC_SLEEP > default y > > config ACPI_PROCFS_POWER > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > index 623b117..2397822 100644 > --- a/drivers/acpi/Makefile > +++ b/drivers/acpi/Makefile > @@ -23,7 +23,7 @@ acpi-y += nvs.o > > # Power management related files > acpi-y += wakeup.o > -acpi-y += sleep.o > +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > acpi-y += device_pm.o > acpi-$(CONFIG_ACPI_SLEEP) += proc.o > > diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h > index 56b321a..6f08c85 100644 > --- a/drivers/acpi/internal.h > +++ b/drivers/acpi/internal.h > @@ -161,7 +161,11 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); > /*-------------------------------------------------------------------------- > Suspend/Resume > -------------------------------------------------------------------------- */ > +#ifdef CONFIG_ACPI_GENERIC_SLEEP > extern int acpi_sleep_init(void); > +#else > +static inline int acpi_sleep_init(void) { return -ENXIO; } > +#endif > > #ifdef CONFIG_ACPI_SLEEP > int acpi_sleep_proc_init(void); > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-13 21:49 ` Rafael J. Wysocki (?) @ 2015-03-16 12:14 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-16 12:14 UTC (permalink / raw) To: Rafael J. Wysocki 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> From: Graeme Gregory <graeme.gregory@linaro.org> >> >> ACPI 5.1 does not currently support S states for ARM64 hardware but >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP >> and select it for x86 and ia64 only to make sleep functions available, >> and also introduce stub function to allow other drivers to function >> until S states are defined for ARM64. >> >> It will be no functional change for x86 and IA64. >> >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> Acked-by: Robert Richter <rrichter@cavium.com> >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> >> --- >> arch/ia64/Kconfig | 1 + >> arch/x86/Kconfig | 1 + >> drivers/acpi/Kconfig | 4 ++++ >> drivers/acpi/Makefile | 2 +- >> drivers/acpi/internal.h | 4 ++++ >> 5 files changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >> index 074e52b..e8728d7 100644 >> --- a/arch/ia64/Kconfig >> +++ b/arch/ia64/Kconfig >> @@ -10,6 +10,7 @@ config IA64 >> select ARCH_MIGHT_HAVE_PC_SERIO >> select PCI if (!IA64_HP_SIM) >> select ACPI if (!IA64_HP_SIM) >> + select ACPI_GENERIC_SLEEP if ACPI >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >> select HAVE_UNSTABLE_SCHED_CLOCK >> select HAVE_IDE >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index b7d31ca..9804431 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -22,6 +22,7 @@ config X86_64 >> ### Arch settings >> config X86 >> def_bool y >> + select ACPI_GENERIC_SLEEP if ACPI > > One more nit. If you did > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. In sleep.c, #ifdef CONFIG_ACPI_SLEEP acpi_target_system_state() { } #endif and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, which one of them will be enabled on ARM64 so ACPI_SLEEP will also enabled too. So if we +select ACPI_GENERIC_SLEEP if ACPI_SLEEP and +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o it will lead to errors for acpi_target_system_state() that is declared but not defined, so I will keep the code as it is, what do you think? Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-16 12:14 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-16 12:14 UTC (permalink / raw) To: linux-arm-kernel On 2015?03?14? 05:49, Rafael J. Wysocki wrote: > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> From: Graeme Gregory <graeme.gregory@linaro.org> >> >> ACPI 5.1 does not currently support S states for ARM64 hardware but >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP >> and select it for x86 and ia64 only to make sleep functions available, >> and also introduce stub function to allow other drivers to function >> until S states are defined for ARM64. >> >> It will be no functional change for x86 and IA64. >> >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> Acked-by: Robert Richter <rrichter@cavium.com> >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> >> --- >> arch/ia64/Kconfig | 1 + >> arch/x86/Kconfig | 1 + >> drivers/acpi/Kconfig | 4 ++++ >> drivers/acpi/Makefile | 2 +- >> drivers/acpi/internal.h | 4 ++++ >> 5 files changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >> index 074e52b..e8728d7 100644 >> --- a/arch/ia64/Kconfig >> +++ b/arch/ia64/Kconfig >> @@ -10,6 +10,7 @@ config IA64 >> select ARCH_MIGHT_HAVE_PC_SERIO >> select PCI if (!IA64_HP_SIM) >> select ACPI if (!IA64_HP_SIM) >> + select ACPI_GENERIC_SLEEP if ACPI >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >> select HAVE_UNSTABLE_SCHED_CLOCK >> select HAVE_IDE >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index b7d31ca..9804431 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -22,6 +22,7 @@ config X86_64 >> ### Arch settings >> config X86 >> def_bool y >> + select ACPI_GENERIC_SLEEP if ACPI > > One more nit. If you did > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. In sleep.c, #ifdef CONFIG_ACPI_SLEEP acpi_target_system_state() { } #endif and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, which one of them will be enabled on ARM64 so ACPI_SLEEP will also enabled too. So if we +select ACPI_GENERIC_SLEEP if ACPI_SLEEP and +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o it will lead to errors for acpi_target_system_state() that is declared but not defined, so I will keep the code as it is, what do you think? Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-16 12:14 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-16 12:14 UTC (permalink / raw) To: Rafael J. Wysocki 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> From: Graeme Gregory <graeme.gregory@linaro.org> >> >> ACPI 5.1 does not currently support S states for ARM64 hardware but >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP >> and select it for x86 and ia64 only to make sleep functions available, >> and also introduce stub function to allow other drivers to function >> until S states are defined for ARM64. >> >> It will be no functional change for x86 and IA64. >> >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> Acked-by: Robert Richter <rrichter@cavium.com> >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> >> --- >> arch/ia64/Kconfig | 1 + >> arch/x86/Kconfig | 1 + >> drivers/acpi/Kconfig | 4 ++++ >> drivers/acpi/Makefile | 2 +- >> drivers/acpi/internal.h | 4 ++++ >> 5 files changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >> index 074e52b..e8728d7 100644 >> --- a/arch/ia64/Kconfig >> +++ b/arch/ia64/Kconfig >> @@ -10,6 +10,7 @@ config IA64 >> select ARCH_MIGHT_HAVE_PC_SERIO >> select PCI if (!IA64_HP_SIM) >> select ACPI if (!IA64_HP_SIM) >> + select ACPI_GENERIC_SLEEP if ACPI >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >> select HAVE_UNSTABLE_SCHED_CLOCK >> select HAVE_IDE >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index b7d31ca..9804431 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -22,6 +22,7 @@ config X86_64 >> ### Arch settings >> config X86 >> def_bool y >> + select ACPI_GENERIC_SLEEP if ACPI > > One more nit. If you did > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. In sleep.c, #ifdef CONFIG_ACPI_SLEEP acpi_target_system_state() { } #endif and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, which one of them will be enabled on ARM64 so ACPI_SLEEP will also enabled too. So if we +select ACPI_GENERIC_SLEEP if ACPI_SLEEP and +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o it will lead to errors for acpi_target_system_state() that is declared but not defined, so I will keep the code as it is, what do you think? Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-16 12:14 ` Hanjun Guo (?) @ 2015-03-16 23:15 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-16 23:15 UTC (permalink / raw) 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> From: Graeme Gregory <graeme.gregory@linaro.org> > >> > >> ACPI 5.1 does not currently support S states for ARM64 hardware but > >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() > >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP > >> and select it for x86 and ia64 only to make sleep functions available, > >> and also introduce stub function to allow other drivers to function > >> until S states are defined for ARM64. > >> > >> It will be no functional change for x86 and IA64. > >> > >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> > >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > >> Acked-by: Robert Richter <rrichter@cavium.com> > >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> > >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > >> --- > >> arch/ia64/Kconfig | 1 + > >> arch/x86/Kconfig | 1 + > >> drivers/acpi/Kconfig | 4 ++++ > >> drivers/acpi/Makefile | 2 +- > >> drivers/acpi/internal.h | 4 ++++ > >> 5 files changed, 11 insertions(+), 1 deletion(-) > >> > >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >> index 074e52b..e8728d7 100644 > >> --- a/arch/ia64/Kconfig > >> +++ b/arch/ia64/Kconfig > >> @@ -10,6 +10,7 @@ config IA64 > >> select ARCH_MIGHT_HAVE_PC_SERIO > >> select PCI if (!IA64_HP_SIM) > >> select ACPI if (!IA64_HP_SIM) > >> + select ACPI_GENERIC_SLEEP if ACPI > >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >> select HAVE_UNSTABLE_SCHED_CLOCK > >> select HAVE_IDE > >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >> index b7d31ca..9804431 100644 > >> --- a/arch/x86/Kconfig > >> +++ b/arch/x86/Kconfig > >> @@ -22,6 +22,7 @@ config X86_64 > >> ### Arch settings > >> config X86 > >> def_bool y > >> + select ACPI_GENERIC_SLEEP if ACPI > > > > One more nit. If you did > > > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > > In sleep.c, > > #ifdef CONFIG_ACPI_SLEEP > acpi_target_system_state() > { > } > #endif > > and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > which one of them will be enabled on ARM64 so ACPI_SLEEP > will also enabled too. > > So if we > > +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > and > > +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > > it will lead to errors for acpi_target_system_state() that > is declared but not defined, so I will keep the code as > it is, what do you think? No, we need to hash this out. Having two different Kconfig options meaning almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. Do you need ACPI_SLEEP on ARM64 at all? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-16 23:15 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-16 23:15 UTC (permalink / raw) To: linux-arm-kernel On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > On 2015?03?14? 05:49, Rafael J. Wysocki wrote: > > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> From: Graeme Gregory <graeme.gregory@linaro.org> > >> > >> ACPI 5.1 does not currently support S states for ARM64 hardware but > >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() > >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP > >> and select it for x86 and ia64 only to make sleep functions available, > >> and also introduce stub function to allow other drivers to function > >> until S states are defined for ARM64. > >> > >> It will be no functional change for x86 and IA64. > >> > >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> > >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > >> Acked-by: Robert Richter <rrichter@cavium.com> > >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> > >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > >> --- > >> arch/ia64/Kconfig | 1 + > >> arch/x86/Kconfig | 1 + > >> drivers/acpi/Kconfig | 4 ++++ > >> drivers/acpi/Makefile | 2 +- > >> drivers/acpi/internal.h | 4 ++++ > >> 5 files changed, 11 insertions(+), 1 deletion(-) > >> > >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >> index 074e52b..e8728d7 100644 > >> --- a/arch/ia64/Kconfig > >> +++ b/arch/ia64/Kconfig > >> @@ -10,6 +10,7 @@ config IA64 > >> select ARCH_MIGHT_HAVE_PC_SERIO > >> select PCI if (!IA64_HP_SIM) > >> select ACPI if (!IA64_HP_SIM) > >> + select ACPI_GENERIC_SLEEP if ACPI > >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >> select HAVE_UNSTABLE_SCHED_CLOCK > >> select HAVE_IDE > >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >> index b7d31ca..9804431 100644 > >> --- a/arch/x86/Kconfig > >> +++ b/arch/x86/Kconfig > >> @@ -22,6 +22,7 @@ config X86_64 > >> ### Arch settings > >> config X86 > >> def_bool y > >> + select ACPI_GENERIC_SLEEP if ACPI > > > > One more nit. If you did > > > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > > In sleep.c, > > #ifdef CONFIG_ACPI_SLEEP > acpi_target_system_state() > { > } > #endif > > and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > which one of them will be enabled on ARM64 so ACPI_SLEEP > will also enabled too. > > So if we > > +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > and > > +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > > it will lead to errors for acpi_target_system_state() that > is declared but not defined, so I will keep the code as > it is, what do you think? No, we need to hash this out. Having two different Kconfig options meaning almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. Do you need ACPI_SLEEP on ARM64 at all? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-16 23:15 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-16 23:15 UTC (permalink / raw) 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > > On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> From: Graeme Gregory <graeme.gregory@linaro.org> > >> > >> ACPI 5.1 does not currently support S states for ARM64 hardware but > >> ACPI code will call acpi_target_system_state() and acpi_sleep_init() > >> for device power management, so introduce CONFIG_ACPI_GENERIC_SLEEP > >> and select it for x86 and ia64 only to make sleep functions available, > >> and also introduce stub function to allow other drivers to function > >> until S states are defined for ARM64. > >> > >> It will be no functional change for x86 and IA64. > >> > >> CC: Rafael J. Wysocki <rjw@rjwysocki.net> > >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > >> Acked-by: Robert Richter <rrichter@cavium.com> > >> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > >> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> > >> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > >> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > >> --- > >> arch/ia64/Kconfig | 1 + > >> arch/x86/Kconfig | 1 + > >> drivers/acpi/Kconfig | 4 ++++ > >> drivers/acpi/Makefile | 2 +- > >> drivers/acpi/internal.h | 4 ++++ > >> 5 files changed, 11 insertions(+), 1 deletion(-) > >> > >> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >> index 074e52b..e8728d7 100644 > >> --- a/arch/ia64/Kconfig > >> +++ b/arch/ia64/Kconfig > >> @@ -10,6 +10,7 @@ config IA64 > >> select ARCH_MIGHT_HAVE_PC_SERIO > >> select PCI if (!IA64_HP_SIM) > >> select ACPI if (!IA64_HP_SIM) > >> + select ACPI_GENERIC_SLEEP if ACPI > >> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >> select HAVE_UNSTABLE_SCHED_CLOCK > >> select HAVE_IDE > >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >> index b7d31ca..9804431 100644 > >> --- a/arch/x86/Kconfig > >> +++ b/arch/x86/Kconfig > >> @@ -22,6 +22,7 @@ config X86_64 > >> ### Arch settings > >> config X86 > >> def_bool y > >> + select ACPI_GENERIC_SLEEP if ACPI > > > > One more nit. If you did > > > > + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > > > here (and above for ia64), you'd avoid having to make ACPI_SLEEP > > depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > > In sleep.c, > > #ifdef CONFIG_ACPI_SLEEP > acpi_target_system_state() > { > } > #endif > > and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > which one of them will be enabled on ARM64 so ACPI_SLEEP > will also enabled too. > > So if we > > +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > > and > > +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > > it will lead to errors for acpi_target_system_state() that > is declared but not defined, so I will keep the code as > it is, what do you think? No, we need to hash this out. Having two different Kconfig options meaning almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. Do you need ACPI_SLEEP on ARM64 at all? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-16 23:15 ` Rafael J. Wysocki (?) @ 2015-03-17 1:08 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 1:08 UTC (permalink / raw) To: Rafael J. Wysocki, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On 2015/3/17 7:15, Rafael J. Wysocki wrote: > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: [...] >>>> >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>> index 074e52b..e8728d7 100644 >>>> --- a/arch/ia64/Kconfig >>>> +++ b/arch/ia64/Kconfig >>>> @@ -10,6 +10,7 @@ config IA64 >>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>> select PCI if (!IA64_HP_SIM) >>>> select ACPI if (!IA64_HP_SIM) >>>> + select ACPI_GENERIC_SLEEP if ACPI >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>> select HAVE_IDE >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>> index b7d31ca..9804431 100644 >>>> --- a/arch/x86/Kconfig >>>> +++ b/arch/x86/Kconfig >>>> @@ -22,6 +22,7 @@ config X86_64 >>>> ### Arch settings >>>> config X86 >>>> def_bool y >>>> + select ACPI_GENERIC_SLEEP if ACPI >>> One more nit. If you did >>> >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>> >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >> In sleep.c, >> >> #ifdef CONFIG_ACPI_SLEEP >> acpi_target_system_state() >> { >> } >> #endif >> >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >> which one of them will be enabled on ARM64 so ACPI_SLEEP >> will also enabled too. >> >> So if we >> >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >> >> and >> >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >> >> it will lead to errors for acpi_target_system_state() that >> is declared but not defined, so I will keep the code as >> it is, what do you think? > No, we need to hash this out. Having two different Kconfig options meaning > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > Do you need ACPI_SLEEP on ARM64 at all? No, at least for now we don't need it, the spec for sleep is not ready for ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 1:08 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 1:08 UTC (permalink / raw) To: linux-arm-kernel On 2015/3/17 7:15, Rafael J. Wysocki wrote: > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: [...] >>>> >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>> index 074e52b..e8728d7 100644 >>>> --- a/arch/ia64/Kconfig >>>> +++ b/arch/ia64/Kconfig >>>> @@ -10,6 +10,7 @@ config IA64 >>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>> select PCI if (!IA64_HP_SIM) >>>> select ACPI if (!IA64_HP_SIM) >>>> + select ACPI_GENERIC_SLEEP if ACPI >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>> select HAVE_IDE >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>> index b7d31ca..9804431 100644 >>>> --- a/arch/x86/Kconfig >>>> +++ b/arch/x86/Kconfig >>>> @@ -22,6 +22,7 @@ config X86_64 >>>> ### Arch settings >>>> config X86 >>>> def_bool y >>>> + select ACPI_GENERIC_SLEEP if ACPI >>> One more nit. If you did >>> >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>> >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >> In sleep.c, >> >> #ifdef CONFIG_ACPI_SLEEP >> acpi_target_system_state() >> { >> } >> #endif >> >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >> which one of them will be enabled on ARM64 so ACPI_SLEEP >> will also enabled too. >> >> So if we >> >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >> >> and >> >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >> >> it will lead to errors for acpi_target_system_state() that >> is declared but not defined, so I will keep the code as >> it is, what do you think? > No, we need to hash this out. Having two different Kconfig options meaning > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > Do you need ACPI_SLEEP on ARM64 at all? No, at least for now we don't need it, the spec for sleep is not ready for ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 1:08 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 1:08 UTC (permalink / raw) To: Rafael J. Wysocki, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On 2015/3/17 7:15, Rafael J. Wysocki wrote: > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: [...] >>>> >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>> index 074e52b..e8728d7 100644 >>>> --- a/arch/ia64/Kconfig >>>> +++ b/arch/ia64/Kconfig >>>> @@ -10,6 +10,7 @@ config IA64 >>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>> select PCI if (!IA64_HP_SIM) >>>> select ACPI if (!IA64_HP_SIM) >>>> + select ACPI_GENERIC_SLEEP if ACPI >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>> select HAVE_IDE >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>> index b7d31ca..9804431 100644 >>>> --- a/arch/x86/Kconfig >>>> +++ b/arch/x86/Kconfig >>>> @@ -22,6 +22,7 @@ config X86_64 >>>> ### Arch settings >>>> config X86 >>>> def_bool y >>>> + select ACPI_GENERIC_SLEEP if ACPI >>> One more nit. If you did >>> >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>> >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >> In sleep.c, >> >> #ifdef CONFIG_ACPI_SLEEP >> acpi_target_system_state() >> { >> } >> #endif >> >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >> which one of them will be enabled on ARM64 so ACPI_SLEEP >> will also enabled too. >> >> So if we >> >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >> >> and >> >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >> >> it will lead to errors for acpi_target_system_state() that >> is declared but not defined, so I will keep the code as >> it is, what do you think? > No, we need to hash this out. Having two different Kconfig options meaning > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > Do you need ACPI_SLEEP on ARM64 at all? No, at least for now we don't need it, the spec for sleep is not ready for ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 1:08 ` Hanjun Guo (?) @ 2015-03-17 2:28 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 2:28 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > On 2015/3/17 7:15, Rafael J. Wysocki wrote: > > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > [...] > >>>> > >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>> index 074e52b..e8728d7 100644 > >>>> --- a/arch/ia64/Kconfig > >>>> +++ b/arch/ia64/Kconfig > >>>> @@ -10,6 +10,7 @@ config IA64 > >>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>> select PCI if (!IA64_HP_SIM) > >>>> select ACPI if (!IA64_HP_SIM) > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>> select HAVE_IDE > >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>> index b7d31ca..9804431 100644 > >>>> --- a/arch/x86/Kconfig > >>>> +++ b/arch/x86/Kconfig > >>>> @@ -22,6 +22,7 @@ config X86_64 > >>>> ### Arch settings > >>>> config X86 > >>>> def_bool y > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>> One more nit. If you did > >>> > >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>> > >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >> In sleep.c, > >> > >> #ifdef CONFIG_ACPI_SLEEP > >> acpi_target_system_state() > >> { > >> } > >> #endif > >> > >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >> which one of them will be enabled on ARM64 so ACPI_SLEEP > >> will also enabled too. > >> > >> So if we > >> > >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >> > >> and > >> > >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >> > >> it will lead to errors for acpi_target_system_state() that > >> is declared but not defined, so I will keep the code as > >> it is, what do you think? > > No, we need to hash this out. Having two different Kconfig options meaning > > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > > > Do you need ACPI_SLEEP on ARM64 at all? > > No, at least for now we don't need it, the spec for sleep is not ready for > ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Well, so what about selecting ACPI_SLEEP from the architectures that use it? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 2:28 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 2:28 UTC (permalink / raw) To: linux-arm-kernel On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > On 2015/3/17 7:15, Rafael J. Wysocki wrote: > > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: > >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > [...] > >>>> > >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>> index 074e52b..e8728d7 100644 > >>>> --- a/arch/ia64/Kconfig > >>>> +++ b/arch/ia64/Kconfig > >>>> @@ -10,6 +10,7 @@ config IA64 > >>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>> select PCI if (!IA64_HP_SIM) > >>>> select ACPI if (!IA64_HP_SIM) > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>> select HAVE_IDE > >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>> index b7d31ca..9804431 100644 > >>>> --- a/arch/x86/Kconfig > >>>> +++ b/arch/x86/Kconfig > >>>> @@ -22,6 +22,7 @@ config X86_64 > >>>> ### Arch settings > >>>> config X86 > >>>> def_bool y > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>> One more nit. If you did > >>> > >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>> > >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >> In sleep.c, > >> > >> #ifdef CONFIG_ACPI_SLEEP > >> acpi_target_system_state() > >> { > >> } > >> #endif > >> > >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >> which one of them will be enabled on ARM64 so ACPI_SLEEP > >> will also enabled too. > >> > >> So if we > >> > >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >> > >> and > >> > >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >> > >> it will lead to errors for acpi_target_system_state() that > >> is declared but not defined, so I will keep the code as > >> it is, what do you think? > > No, we need to hash this out. Having two different Kconfig options meaning > > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > > > Do you need ACPI_SLEEP on ARM64 at all? > > No, at least for now we don't need it, the spec for sleep is not ready for > ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Well, so what about selecting ACPI_SLEEP from the architectures that use it? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 2:28 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 2:28 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > On 2015/3/17 7:15, Rafael J. Wysocki wrote: > > On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > [...] > >>>> > >>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>> index 074e52b..e8728d7 100644 > >>>> --- a/arch/ia64/Kconfig > >>>> +++ b/arch/ia64/Kconfig > >>>> @@ -10,6 +10,7 @@ config IA64 > >>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>> select PCI if (!IA64_HP_SIM) > >>>> select ACPI if (!IA64_HP_SIM) > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>> select HAVE_IDE > >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>> index b7d31ca..9804431 100644 > >>>> --- a/arch/x86/Kconfig > >>>> +++ b/arch/x86/Kconfig > >>>> @@ -22,6 +22,7 @@ config X86_64 > >>>> ### Arch settings > >>>> config X86 > >>>> def_bool y > >>>> + select ACPI_GENERIC_SLEEP if ACPI > >>> One more nit. If you did > >>> > >>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>> > >>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >> In sleep.c, > >> > >> #ifdef CONFIG_ACPI_SLEEP > >> acpi_target_system_state() > >> { > >> } > >> #endif > >> > >> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >> which one of them will be enabled on ARM64 so ACPI_SLEEP > >> will also enabled too. > >> > >> So if we > >> > >> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >> > >> and > >> > >> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >> > >> it will lead to errors for acpi_target_system_state() that > >> is declared but not defined, so I will keep the code as > >> it is, what do you think? > > No, we need to hash this out. Having two different Kconfig options meaning > > almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > > > > Do you need ACPI_SLEEP on ARM64 at all? > > No, at least for now we don't need it, the spec for sleep is not ready for > ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. Well, so what about selecting ACPI_SLEEP from the architectures that use it? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 2:28 ` Rafael J. Wysocki (?) @ 2015-03-17 2:36 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 2:36 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 10:28, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> [...] >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>> index 074e52b..e8728d7 100644 >>>>>> --- a/arch/ia64/Kconfig >>>>>> +++ b/arch/ia64/Kconfig >>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>> select PCI if (!IA64_HP_SIM) >>>>>> select ACPI if (!IA64_HP_SIM) >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>> select HAVE_IDE >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>> index b7d31ca..9804431 100644 >>>>>> --- a/arch/x86/Kconfig >>>>>> +++ b/arch/x86/Kconfig >>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>> ### Arch settings >>>>>> config X86 >>>>>> def_bool y >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>> One more nit. If you did >>>>> >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>> >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>> In sleep.c, >>>> >>>> #ifdef CONFIG_ACPI_SLEEP >>>> acpi_target_system_state() >>>> { >>>> } >>>> #endif >>>> >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>> will also enabled too. >>>> >>>> So if we >>>> >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>> >>>> and >>>> >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>> >>>> it will lead to errors for acpi_target_system_state() that >>>> is declared but not defined, so I will keep the code as >>>> it is, what do you think? >>> No, we need to hash this out. Having two different Kconfig options meaning >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>> >>> Do you need ACPI_SLEEP on ARM64 at all? >> No, at least for now we don't need it, the spec for sleep is not ready for >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > Well, so what about selecting ACPI_SLEEP from the architectures that use it? Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if we doing so)? Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 2:36 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 2:36 UTC (permalink / raw) To: linux-arm-kernel On 2015/3/17 10:28, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> [...] >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>> index 074e52b..e8728d7 100644 >>>>>> --- a/arch/ia64/Kconfig >>>>>> +++ b/arch/ia64/Kconfig >>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>> select PCI if (!IA64_HP_SIM) >>>>>> select ACPI if (!IA64_HP_SIM) >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>> select HAVE_IDE >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>> index b7d31ca..9804431 100644 >>>>>> --- a/arch/x86/Kconfig >>>>>> +++ b/arch/x86/Kconfig >>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>> ### Arch settings >>>>>> config X86 >>>>>> def_bool y >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>> One more nit. If you did >>>>> >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>> >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>> In sleep.c, >>>> >>>> #ifdef CONFIG_ACPI_SLEEP >>>> acpi_target_system_state() >>>> { >>>> } >>>> #endif >>>> >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>> will also enabled too. >>>> >>>> So if we >>>> >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>> >>>> and >>>> >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>> >>>> it will lead to errors for acpi_target_system_state() that >>>> is declared but not defined, so I will keep the code as >>>> it is, what do you think? >>> No, we need to hash this out. Having two different Kconfig options meaning >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>> >>> Do you need ACPI_SLEEP on ARM64 at all? >> No, at least for now we don't need it, the spec for sleep is not ready for >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > Well, so what about selecting ACPI_SLEEP from the architectures that use it? Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if we doing so)? Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 2:36 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 2:36 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 10:28, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >> [...] >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>> index 074e52b..e8728d7 100644 >>>>>> --- a/arch/ia64/Kconfig >>>>>> +++ b/arch/ia64/Kconfig >>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>> select PCI if (!IA64_HP_SIM) >>>>>> select ACPI if (!IA64_HP_SIM) >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>> select HAVE_IDE >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>> index b7d31ca..9804431 100644 >>>>>> --- a/arch/x86/Kconfig >>>>>> +++ b/arch/x86/Kconfig >>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>> ### Arch settings >>>>>> config X86 >>>>>> def_bool y >>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>> One more nit. If you did >>>>> >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>> >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>> In sleep.c, >>>> >>>> #ifdef CONFIG_ACPI_SLEEP >>>> acpi_target_system_state() >>>> { >>>> } >>>> #endif >>>> >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>> will also enabled too. >>>> >>>> So if we >>>> >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>> >>>> and >>>> >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>> >>>> it will lead to errors for acpi_target_system_state() that >>>> is declared but not defined, so I will keep the code as >>>> it is, what do you think? >>> No, we need to hash this out. Having two different Kconfig options meaning >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>> >>> Do you need ACPI_SLEEP on ARM64 at all? >> No, at least for now we don't need it, the spec for sleep is not ready for >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > Well, so what about selecting ACPI_SLEEP from the architectures that use it? Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if we doing so)? Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 2:36 ` Hanjun Guo (?) @ 2015-03-17 3:23 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 3:23 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > On 2015/3/17 10:28, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> [...] > >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>> index 074e52b..e8728d7 100644 > >>>>>> --- a/arch/ia64/Kconfig > >>>>>> +++ b/arch/ia64/Kconfig > >>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>> select PCI if (!IA64_HP_SIM) > >>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>> select HAVE_IDE > >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>> index b7d31ca..9804431 100644 > >>>>>> --- a/arch/x86/Kconfig > >>>>>> +++ b/arch/x86/Kconfig > >>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>> ### Arch settings > >>>>>> config X86 > >>>>>> def_bool y > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>> One more nit. If you did > >>>>> > >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>> > >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>> In sleep.c, > >>>> > >>>> #ifdef CONFIG_ACPI_SLEEP > >>>> acpi_target_system_state() > >>>> { > >>>> } > >>>> #endif > >>>> > >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>> will also enabled too. > >>>> > >>>> So if we > >>>> > >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>> > >>>> and > >>>> > >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>> > >>>> it will lead to errors for acpi_target_system_state() that > >>>> is declared but not defined, so I will keep the code as > >>>> it is, what do you think? > >>> No, we need to hash this out. Having two different Kconfig options meaning > >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>> > >>> Do you need ACPI_SLEEP on ARM64 at all? > >> No, at least for now we don't need it, the spec for sleep is not ready for > >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > > Well, so what about selecting ACPI_SLEEP from the architectures that use it? > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > we doing so)? Well, almost. There is one problem with that, becuase sleep.c contains code outside of the ACPI_SLEEP-dependent blocks. That code is used for powering off ACPI platforms. I guess you don't want that code on ARM too, right? Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the only arch setting it at least for the time being, is that correct? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 3:23 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 3:23 UTC (permalink / raw) To: linux-arm-kernel On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > On 2015/3/17 10:28, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: > >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> [...] > >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>> index 074e52b..e8728d7 100644 > >>>>>> --- a/arch/ia64/Kconfig > >>>>>> +++ b/arch/ia64/Kconfig > >>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>> select PCI if (!IA64_HP_SIM) > >>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>> select HAVE_IDE > >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>> index b7d31ca..9804431 100644 > >>>>>> --- a/arch/x86/Kconfig > >>>>>> +++ b/arch/x86/Kconfig > >>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>> ### Arch settings > >>>>>> config X86 > >>>>>> def_bool y > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>> One more nit. If you did > >>>>> > >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>> > >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>> In sleep.c, > >>>> > >>>> #ifdef CONFIG_ACPI_SLEEP > >>>> acpi_target_system_state() > >>>> { > >>>> } > >>>> #endif > >>>> > >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>> will also enabled too. > >>>> > >>>> So if we > >>>> > >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>> > >>>> and > >>>> > >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>> > >>>> it will lead to errors for acpi_target_system_state() that > >>>> is declared but not defined, so I will keep the code as > >>>> it is, what do you think? > >>> No, we need to hash this out. Having two different Kconfig options meaning > >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>> > >>> Do you need ACPI_SLEEP on ARM64 at all? > >> No, at least for now we don't need it, the spec for sleep is not ready for > >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > > Well, so what about selecting ACPI_SLEEP from the architectures that use it? > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > we doing so)? Well, almost. There is one problem with that, becuase sleep.c contains code outside of the ACPI_SLEEP-dependent blocks. That code is used for powering off ACPI platforms. I guess you don't want that code on ARM too, right? Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the only arch setting it at least for the time being, is that correct? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 3:23 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 3:23 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > On 2015/3/17 10:28, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >> [...] > >>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>> index 074e52b..e8728d7 100644 > >>>>>> --- a/arch/ia64/Kconfig > >>>>>> +++ b/arch/ia64/Kconfig > >>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>> select PCI if (!IA64_HP_SIM) > >>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>> select HAVE_IDE > >>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>> index b7d31ca..9804431 100644 > >>>>>> --- a/arch/x86/Kconfig > >>>>>> +++ b/arch/x86/Kconfig > >>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>> ### Arch settings > >>>>>> config X86 > >>>>>> def_bool y > >>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>> One more nit. If you did > >>>>> > >>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>> > >>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>> In sleep.c, > >>>> > >>>> #ifdef CONFIG_ACPI_SLEEP > >>>> acpi_target_system_state() > >>>> { > >>>> } > >>>> #endif > >>>> > >>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>> will also enabled too. > >>>> > >>>> So if we > >>>> > >>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>> > >>>> and > >>>> > >>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>> > >>>> it will lead to errors for acpi_target_system_state() that > >>>> is declared but not defined, so I will keep the code as > >>>> it is, what do you think? > >>> No, we need to hash this out. Having two different Kconfig options meaning > >>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>> > >>> Do you need ACPI_SLEEP on ARM64 at all? > >> No, at least for now we don't need it, the spec for sleep is not ready for > >> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > > Well, so what about selecting ACPI_SLEEP from the architectures that use it? > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > we doing so)? Well, almost. There is one problem with that, becuase sleep.c contains code outside of the ACPI_SLEEP-dependent blocks. That code is used for powering off ACPI platforms. I guess you don't want that code on ARM too, right? Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the only arch setting it at least for the time being, is that correct? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 3:23 ` Rafael J. Wysocki (?) @ 2015-03-17 4:10 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 4:10 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 11:23, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>> [...] >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>> select HAVE_IDE >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>> index b7d31ca..9804431 100644 >>>>>>>> --- a/arch/x86/Kconfig >>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>> ### Arch settings >>>>>>>> config X86 >>>>>>>> def_bool y >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>> One more nit. If you did >>>>>>> >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>> >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>> In sleep.c, >>>>>> >>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>> acpi_target_system_state() >>>>>> { >>>>>> } >>>>>> #endif >>>>>> >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>> will also enabled too. >>>>>> >>>>>> So if we >>>>>> >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>> >>>>>> and >>>>>> >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>> >>>>>> it will lead to errors for acpi_target_system_state() that >>>>>> is declared but not defined, so I will keep the code as >>>>>> it is, what do you think? >>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>> >>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >> >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >> >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >> we doing so)? > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? Yes, you are right. > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the Sorry, I can't fully understand your intention here, could you please explain it more? Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 has no such limitation, if I miss something here, please let me know. > only arch setting it at least for the time being, is that correct? That's pretty sure for now. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 4:10 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 4:10 UTC (permalink / raw) To: linux-arm-kernel On 2015/3/17 11:23, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>> [...] >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>> select HAVE_IDE >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>> index b7d31ca..9804431 100644 >>>>>>>> --- a/arch/x86/Kconfig >>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>> ### Arch settings >>>>>>>> config X86 >>>>>>>> def_bool y >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>> One more nit. If you did >>>>>>> >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>> >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>> In sleep.c, >>>>>> >>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>> acpi_target_system_state() >>>>>> { >>>>>> } >>>>>> #endif >>>>>> >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>> will also enabled too. >>>>>> >>>>>> So if we >>>>>> >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>> >>>>>> and >>>>>> >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>> >>>>>> it will lead to errors for acpi_target_system_state() that >>>>>> is declared but not defined, so I will keep the code as >>>>>> it is, what do you think? >>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>> >>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >> >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >> >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >> we doing so)? > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? Yes, you are right. > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the Sorry, I can't fully understand your intention here, could you please explain it more? Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 has no such limitation, if I miss something here, please let me know. > only arch setting it at least for the time being, is that correct? That's pretty sure for now. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 4:10 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 4:10 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 11:23, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>> [...] >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>> select HAVE_IDE >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>> index b7d31ca..9804431 100644 >>>>>>>> --- a/arch/x86/Kconfig >>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>> ### Arch settings >>>>>>>> config X86 >>>>>>>> def_bool y >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>> One more nit. If you did >>>>>>> >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>> >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>> In sleep.c, >>>>>> >>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>> acpi_target_system_state() >>>>>> { >>>>>> } >>>>>> #endif >>>>>> >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>> will also enabled too. >>>>>> >>>>>> So if we >>>>>> >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>> >>>>>> and >>>>>> >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>> >>>>>> it will lead to errors for acpi_target_system_state() that >>>>>> is declared but not defined, so I will keep the code as >>>>>> it is, what do you think? >>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>> >>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >> >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >> >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >> we doing so)? > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? Yes, you are right. > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the Sorry, I can't fully understand your intention here, could you please explain it more? Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 has no such limitation, if I miss something here, please let me know. > only arch setting it at least for the time being, is that correct? That's pretty sure for now. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 4:10 ` Hanjun Guo @ 2015-03-17 5:59 ` Jon Masters -1 siblings, 0 replies; 45+ messages in thread From: Jon Masters @ 2015-03-17 5:59 UTC (permalink / raw) To: Hanjun Guo, Rafael J. Wysocki Cc: Hanjun Guo, Catalin Marinas, Will Deacon, Olof Johansson, Grant Likely, Lorenzo Pieralisi, Arnd Bergmann, Mark Rutland, Graeme Gregory, Sudeep Holla, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 03/17/2015 12:10 AM, Hanjun Guo wrote: > On 2015/3/17 11:23, Rafael J. Wysocki wrote: >> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >> Well, almost. There is one problem with that, becuase sleep.c contains code >> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >> off ACPI platforms. >> >> I guess you don't want that code on ARM too, right? > > Yes, you are right. >> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > Sorry, I can't fully understand your intention here, could you please > explain it more? > > Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for > powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec > only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 > has no such limitation, if I miss something here, please let me know. If helpful to the discussion, current SBBR (Server Base Boot Requirements[0]) design guidance is that for power off itself, we will prefer calling an EFI Runtime Service (that will preferentially call an PSCI - ARM Power State Coordination Interface - Secure Monitor Call (SMC - think SMI-like) internally to perform the shutdown/reboot) for the action of powering off or resetting 64-bit ARM SBBR platforms. Therefore if the alternative of an ACPI-based power off solution were not initially supported, I don't think it would have much practical impact, and it could be addressed after the initial support merged. That's just my $0.02. Jon. [0] The Server Base Boot Requirements are the platform specification we created for 64-bit ARM servers. They mandate the use of EFI and ACPI in compliant platforms: http://infocenter.arm.com/help/topic/com.arm.doc.den0044a/Server_Base_Boot_Requirements.pdf ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 5:59 ` Jon Masters 0 siblings, 0 replies; 45+ messages in thread From: Jon Masters @ 2015-03-17 5:59 UTC (permalink / raw) To: linux-arm-kernel On 03/17/2015 12:10 AM, Hanjun Guo wrote: > On 2015/3/17 11:23, Rafael J. Wysocki wrote: >> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >> Well, almost. There is one problem with that, becuase sleep.c contains code >> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >> off ACPI platforms. >> >> I guess you don't want that code on ARM too, right? > > Yes, you are right. >> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > Sorry, I can't fully understand your intention here, could you please > explain it more? > > Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for > powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec > only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 > has no such limitation, if I miss something here, please let me know. If helpful to the discussion, current SBBR (Server Base Boot Requirements[0]) design guidance is that for power off itself, we will prefer calling an EFI Runtime Service (that will preferentially call an PSCI - ARM Power State Coordination Interface - Secure Monitor Call (SMC - think SMI-like) internally to perform the shutdown/reboot) for the action of powering off or resetting 64-bit ARM SBBR platforms. Therefore if the alternative of an ACPI-based power off solution were not initially supported, I don't think it would have much practical impact, and it could be addressed after the initial support merged. That's just my $0.02. Jon. [0] The Server Base Boot Requirements are the platform specification we created for 64-bit ARM servers. They mandate the use of EFI and ACPI in compliant platforms: http://infocenter.arm.com/help/topic/com.arm.doc.den0044a/Server_Base_Boot_Requirements.pdf ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 5:59 ` Jon Masters (?) @ 2015-03-17 6:31 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 6:31 UTC (permalink / raw) To: Jon Masters, Rafael J. Wysocki Cc: Hanjun Guo, Catalin Marinas, Will Deacon, Olof Johansson, Grant Likely, Lorenzo Pieralisi, Arnd Bergmann, Mark Rutland, Graeme Gregory, Sudeep Holla, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 13:59, Jon Masters wrote: > On 03/17/2015 12:10 AM, Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > If helpful to the discussion, current SBBR (Server Base Boot > Requirements[0]) design guidance is that for power off itself, we will > prefer calling an EFI Runtime Service (that will preferentially call an > PSCI - ARM Power State Coordination Interface - Secure Monitor Call (SMC > - think SMI-like) internally to perform the shutdown/reboot) for the > action of powering off or resetting 64-bit ARM SBBR platforms. Agreed, PSCI is the prefer method for power off on ARM64 I think. > > Therefore if the alternative of an ACPI-based power off solution were > not initially supported, I don't think it would have much practical > impact, and it could be addressed after the initial support merged. I agree. Actually we already removed ACPI power off code for ARM64 in v9 and v10 regardless the ACPI sepc statement about S5, I just want to confirm with Rafael that how to use ACPI_REDUCED_HARDWARE_ONLY properly to do the same thing as we do in v10 (patch - ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP), or if we have some other way to do that :) Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 6:31 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 6:31 UTC (permalink / raw) To: linux-arm-kernel On 2015/3/17 13:59, Jon Masters wrote: > On 03/17/2015 12:10 AM, Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > If helpful to the discussion, current SBBR (Server Base Boot > Requirements[0]) design guidance is that for power off itself, we will > prefer calling an EFI Runtime Service (that will preferentially call an > PSCI - ARM Power State Coordination Interface - Secure Monitor Call (SMC > - think SMI-like) internally to perform the shutdown/reboot) for the > action of powering off or resetting 64-bit ARM SBBR platforms. Agreed, PSCI is the prefer method for power off on ARM64 I think. > > Therefore if the alternative of an ACPI-based power off solution were > not initially supported, I don't think it would have much practical > impact, and it could be addressed after the initial support merged. I agree. Actually we already removed ACPI power off code for ARM64 in v9 and v10 regardless the ACPI sepc statement about S5, I just want to confirm with Rafael that how to use ACPI_REDUCED_HARDWARE_ONLY properly to do the same thing as we do in v10 (patch - ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP), or if we have some other way to do that :) Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 6:31 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-17 6:31 UTC (permalink / raw) To: Jon Masters, Rafael J. Wysocki Cc: Hanjun Guo, Catalin Marinas, Will Deacon, Olof Johansson, Grant Likely, Lorenzo Pieralisi, Arnd Bergmann, Mark Rutland, Graeme Gregory, Sudeep Holla, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 13:59, Jon Masters wrote: > On 03/17/2015 12:10 AM, Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > If helpful to the discussion, current SBBR (Server Base Boot > Requirements[0]) design guidance is that for power off itself, we will > prefer calling an EFI Runtime Service (that will preferentially call an > PSCI - ARM Power State Coordination Interface - Secure Monitor Call (SMC > - think SMI-like) internally to perform the shutdown/reboot) for the > action of powering off or resetting 64-bit ARM SBBR platforms. Agreed, PSCI is the prefer method for power off on ARM64 I think. > > Therefore if the alternative of an ACPI-based power off solution were > not initially supported, I don't think it would have much practical > impact, and it could be addressed after the initial support merged. I agree. Actually we already removed ACPI power off code for ARM64 in v9 and v10 regardless the ACPI sepc statement about S5, I just want to confirm with Rafael that how to use ACPI_REDUCED_HARDWARE_ONLY properly to do the same thing as we do in v10 (patch - ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP), or if we have some other way to do that :) Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 4:10 ` Hanjun Guo (?) @ 2015-03-17 14:33 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:33 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: > On 2015/3/17 11:23, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: > >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >>>> [...] > >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>>>> index 074e52b..e8728d7 100644 > >>>>>>>> --- a/arch/ia64/Kconfig > >>>>>>>> +++ b/arch/ia64/Kconfig > >>>>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>>>> select PCI if (!IA64_HP_SIM) > >>>>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>>>> select HAVE_IDE > >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>>>> index b7d31ca..9804431 100644 > >>>>>>>> --- a/arch/x86/Kconfig > >>>>>>>> +++ b/arch/x86/Kconfig > >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>>>> ### Arch settings > >>>>>>>> config X86 > >>>>>>>> def_bool y > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>> One more nit. If you did > >>>>>>> > >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>>> > >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>>>> In sleep.c, > >>>>>> > >>>>>> #ifdef CONFIG_ACPI_SLEEP > >>>>>> acpi_target_system_state() > >>>>>> { > >>>>>> } > >>>>>> #endif > >>>>>> > >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>>>> will also enabled too. > >>>>>> > >>>>>> So if we > >>>>>> > >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>> > >>>>>> and > >>>>>> > >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>>>> > >>>>>> it will lead to errors for acpi_target_system_state() that > >>>>>> is declared but not defined, so I will keep the code as > >>>>>> it is, what do you think? > >>>>> No, we need to hash this out. Having two different Kconfig options meaning > >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>>>> > >>>>> Do you need ACPI_SLEEP on ARM64 at all? > >>>> No, at least for now we don't need it, the spec for sleep is not ready for > >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? > >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > >> > >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > >> > >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > >> we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > Yes, you are right. > > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > Sorry, I can't fully understand your intention here, could you please > explain it more? > > Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for > powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec > only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 > has no such limitation, if I miss something here, please let me know. OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 14:33 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:33 UTC (permalink / raw) To: linux-arm-kernel On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: > On 2015/3/17 11:23, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: > >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>>>> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: > >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >>>> [...] > >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>>>> index 074e52b..e8728d7 100644 > >>>>>>>> --- a/arch/ia64/Kconfig > >>>>>>>> +++ b/arch/ia64/Kconfig > >>>>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>>>> select PCI if (!IA64_HP_SIM) > >>>>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>>>> select HAVE_IDE > >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>>>> index b7d31ca..9804431 100644 > >>>>>>>> --- a/arch/x86/Kconfig > >>>>>>>> +++ b/arch/x86/Kconfig > >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>>>> ### Arch settings > >>>>>>>> config X86 > >>>>>>>> def_bool y > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>> One more nit. If you did > >>>>>>> > >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>>> > >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>>>> In sleep.c, > >>>>>> > >>>>>> #ifdef CONFIG_ACPI_SLEEP > >>>>>> acpi_target_system_state() > >>>>>> { > >>>>>> } > >>>>>> #endif > >>>>>> > >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>>>> will also enabled too. > >>>>>> > >>>>>> So if we > >>>>>> > >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>> > >>>>>> and > >>>>>> > >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>>>> > >>>>>> it will lead to errors for acpi_target_system_state() that > >>>>>> is declared but not defined, so I will keep the code as > >>>>>> it is, what do you think? > >>>>> No, we need to hash this out. Having two different Kconfig options meaning > >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>>>> > >>>>> Do you need ACPI_SLEEP on ARM64 at all? > >>>> No, at least for now we don't need it, the spec for sleep is not ready for > >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? > >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > >> > >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > >> > >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > >> we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > Yes, you are right. > > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > Sorry, I can't fully understand your intention here, could you please > explain it more? > > Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for > powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec > only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 > has no such limitation, if I miss something here, please let me know. OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 14:33 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:33 UTC (permalink / raw) To: Hanjun Guo Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: > On 2015/3/17 11:23, Rafael J. Wysocki wrote: > > On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: > >> On 2015/3/17 10:28, Rafael J. Wysocki wrote: > >>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: > >>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: > >>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: > >>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: > >>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: > >>>> [...] > >>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > >>>>>>>> index 074e52b..e8728d7 100644 > >>>>>>>> --- a/arch/ia64/Kconfig > >>>>>>>> +++ b/arch/ia64/Kconfig > >>>>>>>> @@ -10,6 +10,7 @@ config IA64 > >>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO > >>>>>>>> select PCI if (!IA64_HP_SIM) > >>>>>>>> select ACPI if (!IA64_HP_SIM) > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI > >>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK > >>>>>>>> select HAVE_IDE > >>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > >>>>>>>> index b7d31ca..9804431 100644 > >>>>>>>> --- a/arch/x86/Kconfig > >>>>>>>> +++ b/arch/x86/Kconfig > >>>>>>>> @@ -22,6 +22,7 @@ config X86_64 > >>>>>>>> ### Arch settings > >>>>>>>> config X86 > >>>>>>>> def_bool y > >>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI > >>>>>>> One more nit. If you did > >>>>>>> > >>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>>> > >>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP > >>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. > >>>>>> In sleep.c, > >>>>>> > >>>>>> #ifdef CONFIG_ACPI_SLEEP > >>>>>> acpi_target_system_state() > >>>>>> { > >>>>>> } > >>>>>> #endif > >>>>>> > >>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, > >>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP > >>>>>> will also enabled too. > >>>>>> > >>>>>> So if we > >>>>>> > >>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP > >>>>>> > >>>>>> and > >>>>>> > >>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o > >>>>>> > >>>>>> it will lead to errors for acpi_target_system_state() that > >>>>>> is declared but not defined, so I will keep the code as > >>>>>> it is, what do you think? > >>>>> No, we need to hash this out. Having two different Kconfig options meaning > >>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. > >>>>> > >>>>> Do you need ACPI_SLEEP on ARM64 at all? > >>>> No, at least for now we don't need it, the spec for sleep is not ready for > >>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. > >>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? > >> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > >> > >> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > >> > >> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > >> we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > Yes, you are right. > > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > Sorry, I can't fully understand your intention here, could you please > explain it more? > > Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for > powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec > only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 > has no such limitation, if I miss something here, please let me know. OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 14:33 ` Rafael J. Wysocki (?) @ 2015-03-18 1:56 ` Hanjun Guo -1 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-18 1:56 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 22:33, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>>> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>>>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>>>> [...] >>>>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>>>> select HAVE_IDE >>>>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>>>> index b7d31ca..9804431 100644 >>>>>>>>>> --- a/arch/x86/Kconfig >>>>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>>>> ### Arch settings >>>>>>>>>> config X86 >>>>>>>>>> def_bool y >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>> One more nit. If you did >>>>>>>>> >>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>>> >>>>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>>>> In sleep.c, >>>>>>>> >>>>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>>>> acpi_target_system_state() >>>>>>>> { >>>>>>>> } >>>>>>>> #endif >>>>>>>> >>>>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>>>> will also enabled too. >>>>>>>> >>>>>>>> So if we >>>>>>>> >>>>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>> >>>>>>>> and >>>>>>>> >>>>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>>>> >>>>>>>> it will lead to errors for acpi_target_system_state() that >>>>>>>> is declared but not defined, so I will keep the code as >>>>>>>> it is, what do you think? >>>>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>>>> >>>>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>>>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >>>> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >>>> >>>> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >>>> >>>> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >>>> we doing so)? >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >> >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with > ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. OK, I will send a updated patch. Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-18 1:56 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-18 1:56 UTC (permalink / raw) To: linux-arm-kernel On 2015/3/17 22:33, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>>> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>>>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>>>> On 2015?03?14? 05:49, Rafael J. Wysocki wrote: >>>>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>>>> [...] >>>>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>>>> select HAVE_IDE >>>>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>>>> index b7d31ca..9804431 100644 >>>>>>>>>> --- a/arch/x86/Kconfig >>>>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>>>> ### Arch settings >>>>>>>>>> config X86 >>>>>>>>>> def_bool y >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>> One more nit. If you did >>>>>>>>> >>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>>> >>>>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>>>> In sleep.c, >>>>>>>> >>>>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>>>> acpi_target_system_state() >>>>>>>> { >>>>>>>> } >>>>>>>> #endif >>>>>>>> >>>>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>>>> will also enabled too. >>>>>>>> >>>>>>>> So if we >>>>>>>> >>>>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>> >>>>>>>> and >>>>>>>> >>>>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>>>> >>>>>>>> it will lead to errors for acpi_target_system_state() that >>>>>>>> is declared but not defined, so I will keep the code as >>>>>>>> it is, what do you think? >>>>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>>>> >>>>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>>>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >>>> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >>>> >>>> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >>>> >>>> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >>>> we doing so)? >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >> >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with > ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. OK, I will send a updated patch. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-18 1:56 ` Hanjun Guo 0 siblings, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-18 1:56 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Hanjun Guo, 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, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On 2015/3/17 22:33, Rafael J. Wysocki wrote: > On Tuesday, March 17, 2015 12:10:02 PM Hanjun Guo wrote: >> On 2015/3/17 11:23, Rafael J. Wysocki wrote: >>> On Tuesday, March 17, 2015 10:36:47 AM Hanjun Guo wrote: >>>> On 2015/3/17 10:28, Rafael J. Wysocki wrote: >>>>> On Tuesday, March 17, 2015 09:08:45 AM Hanjun Guo wrote: >>>>>> On 2015/3/17 7:15, Rafael J. Wysocki wrote: >>>>>>> On Monday, March 16, 2015 08:14:52 PM Hanjun Guo wrote: >>>>>>>> On 2015年03月14日 05:49, Rafael J. Wysocki wrote: >>>>>>>>> On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote: >>>>>> [...] >>>>>>>>>> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig >>>>>>>>>> index 074e52b..e8728d7 100644 >>>>>>>>>> --- a/arch/ia64/Kconfig >>>>>>>>>> +++ b/arch/ia64/Kconfig >>>>>>>>>> @@ -10,6 +10,7 @@ config IA64 >>>>>>>>>> select ARCH_MIGHT_HAVE_PC_SERIO >>>>>>>>>> select PCI if (!IA64_HP_SIM) >>>>>>>>>> select ACPI if (!IA64_HP_SIM) >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>>> select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI >>>>>>>>>> select HAVE_UNSTABLE_SCHED_CLOCK >>>>>>>>>> select HAVE_IDE >>>>>>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>>>>>>>> index b7d31ca..9804431 100644 >>>>>>>>>> --- a/arch/x86/Kconfig >>>>>>>>>> +++ b/arch/x86/Kconfig >>>>>>>>>> @@ -22,6 +22,7 @@ config X86_64 >>>>>>>>>> ### Arch settings >>>>>>>>>> config X86 >>>>>>>>>> def_bool y >>>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI >>>>>>>>> One more nit. If you did >>>>>>>>> >>>>>>>>> + select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>>> >>>>>>>>> here (and above for ia64), you'd avoid having to make ACPI_SLEEP >>>>>>>>> depend on ACPI_GENERIC_SLEEP which goes somewhat backwards. >>>>>>>> In sleep.c, >>>>>>>> >>>>>>>> #ifdef CONFIG_ACPI_SLEEP >>>>>>>> acpi_target_system_state() >>>>>>>> { >>>>>>>> } >>>>>>>> #endif >>>>>>>> >>>>>>>> and CONFIG_ACPI_SLEEP depends on SUSPEND || HIBERNATION, >>>>>>>> which one of them will be enabled on ARM64 so ACPI_SLEEP >>>>>>>> will also enabled too. >>>>>>>> >>>>>>>> So if we >>>>>>>> >>>>>>>> +select ACPI_GENERIC_SLEEP if ACPI_SLEEP >>>>>>>> >>>>>>>> and >>>>>>>> >>>>>>>> +acpi-$(CONFIG_ACPI_GENERIC_SLEEP) += sleep.o >>>>>>>> >>>>>>>> it will lead to errors for acpi_target_system_state() that >>>>>>>> is declared but not defined, so I will keep the code as >>>>>>>> it is, what do you think? >>>>>>> No, we need to hash this out. Having two different Kconfig options meaning >>>>>>> almost the same thing (ACPI_SLEEP and ACPI_GENERIC_SLEEP) is beyond ugly. >>>>>>> >>>>>>> Do you need ACPI_SLEEP on ARM64 at all? >>>>>> No, at least for now we don't need it, the spec for sleep is not ready for >>>>>> ARM64 arch, so ACPI_SLEEP will not work at all on ARM64. >>>>> Well, so what about selecting ACPI_SLEEP from the architectures that use it? >>>> Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and >>>> >>>> +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o >>>> >>>> as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if >>>> we doing so)? >>> Well, almost. There is one problem with that, becuase sleep.c contains code >>> outside of the ACPI_SLEEP-dependent blocks. That code is used for powering >>> off ACPI platforms. >>> >>> I guess you don't want that code on ARM too, right? >> Yes, you are right. >> >>> Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the >> Sorry, I can't fully understand your intention here, could you please >> explain it more? >> >> Let me guess a little bit. Do you mean use ACPI_REDUCED_HARDWARE_ONLY for >> powering off ACPI platforms? if so, I guess it's not a good idea, ACPI spec >> only says that S4BIOS is not supported on HW-reduced ACPI platforms, S5 >> has no such limitation, if I miss something here, please let me know. > OK, so in your current patch, please replace ACPI_GENERIC_SLEEP with > ACPI_SYSTEM_POWER_STATES_SUPPORT and all should be clear. OK, I will send a updated patch. Thanks Hanjun ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 3:23 ` Rafael J. Wysocki (?) @ 2015-03-17 12:35 ` Lorenzo Pieralisi -1 siblings, 0 replies; 45+ messages in thread From: Lorenzo Pieralisi @ 2015-03-17 12:35 UTC (permalink / raw) To: Rafael J. Wysocki Cc: guohanjun, hanjun.guo, Catalin Marinas, Will Deacon, Olof Johansson, grant.likely, Arnd Bergmann, Mark Rutland, graeme.gregory, Sudeep Holla, jcm, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: [...] > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > only arch setting it at least for the time being, is that correct? HW reduced only platforms are still required to support sleep states that on arm64 are totally meaningless at present, so I do not think ACPI_REDUCED_HARDWARE_ONLY will cut it. Factoring out power_off methods from sleep.c ? I know, it is not nicer since you split the S-states management in multiple files. Side note: is the acpi_suspend() function in sleep.c used in the kernel ? Lorenzo ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 12:35 ` Lorenzo Pieralisi 0 siblings, 0 replies; 45+ messages in thread From: Lorenzo Pieralisi @ 2015-03-17 12:35 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: [...] > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > only arch setting it at least for the time being, is that correct? HW reduced only platforms are still required to support sleep states that on arm64 are totally meaningless at present, so I do not think ACPI_REDUCED_HARDWARE_ONLY will cut it. Factoring out power_off methods from sleep.c ? I know, it is not nicer since you split the S-states management in multiple files. Side note: is the acpi_suspend() function in sleep.c used in the kernel ? Lorenzo ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 12:35 ` Lorenzo Pieralisi 0 siblings, 0 replies; 45+ messages in thread From: Lorenzo Pieralisi @ 2015-03-17 12:35 UTC (permalink / raw) To: Rafael J. Wysocki Cc: guohanjun, hanjun.guo, Catalin Marinas, Will Deacon, Olof Johansson, grant.likely, Arnd Bergmann, Mark Rutland, graeme.gregory, Sudeep Holla, jcm, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: [...] > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > we doing so)? > > Well, almost. There is one problem with that, becuase sleep.c contains code > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > off ACPI platforms. > > I guess you don't want that code on ARM too, right? > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > only arch setting it at least for the time being, is that correct? HW reduced only platforms are still required to support sleep states that on arm64 are totally meaningless at present, so I do not think ACPI_REDUCED_HARDWARE_ONLY will cut it. Factoring out power_off methods from sleep.c ? I know, it is not nicer since you split the S-states management in multiple files. Side note: is the acpi_suspend() function in sleep.c used in the kernel ? Lorenzo ^ permalink raw reply [flat|nested] 45+ messages in thread
[parent not found: <CAGHbJ3DhUB688K7ooT7ai=2QjRp7S+_E_Y+a+GupeTvjR5omMg@mail.gmail.com>]
* [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used [not found] ` <CAGHbJ3DhUB688K7ooT7ai=2QjRp7S+_E_Y+a+GupeTvjR5omMg@mail.gmail.com> @ 2015-03-17 14:29 ` Rafael J. Wysocki 2015-03-17 14:24 ` Lorenzo Pieralisi 2015-03-18 1:17 ` Hanjun Guo 0 siblings, 2 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:29 UTC (permalink / raw) To: ACPI Devel Maling List Cc: Hanjun Guo, Lorenzo Pieralisi, Linux Kernel Mailing List From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> The acpi_suspend() function has no callers, so drop it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- drivers/acpi/sleep.c | 15 --------------- drivers/acpi/sleep.h | 2 -- 2 files changed, 17 deletions(-) Index: linux-pm/drivers/acpi/sleep.c =================================================================== --- linux-pm.orig/drivers/acpi/sleep.c +++ linux-pm/drivers/acpi/sleep.c @@ -806,21 +806,6 @@ static void acpi_sleep_hibernate_setup(v static inline void acpi_sleep_hibernate_setup(void) {} #endif /* !CONFIG_HIBERNATION */ -int acpi_suspend(u32 acpi_state) -{ - suspend_state_t states[] = { - [1] = PM_SUSPEND_STANDBY, - [3] = PM_SUSPEND_MEM, - [5] = PM_SUSPEND_MAX - }; - - if (acpi_state < 6 && states[acpi_state]) - return pm_suspend(states[acpi_state]); - if (acpi_state == 4) - return hibernate(); - return -EINVAL; -} - static void acpi_power_off_prepare(void) { /* Prepare to power off the system */ Index: linux-pm/drivers/acpi/sleep.h =================================================================== --- linux-pm.orig/drivers/acpi/sleep.h +++ linux-pm/drivers/acpi/sleep.h @@ -1,6 +1,4 @@ -extern int acpi_suspend(u32 state); - extern void acpi_enable_wakeup_devices(u8 sleep_state); extern void acpi_disable_wakeup_devices(u8 sleep_state); ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used 2015-03-17 14:29 ` [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used Rafael J. Wysocki @ 2015-03-17 14:24 ` Lorenzo Pieralisi 2015-03-18 1:17 ` Hanjun Guo 1 sibling, 0 replies; 45+ messages in thread From: Lorenzo Pieralisi @ 2015-03-17 14:24 UTC (permalink / raw) To: Rafael J. Wysocki Cc: ACPI Devel Maling List, hanjun.guo, Linux Kernel Mailing List On Tue, Mar 17, 2015 at 02:29:23PM +0000, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > The acpi_suspend() function has no callers, so drop it. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > --- > drivers/acpi/sleep.c | 15 --------------- > drivers/acpi/sleep.h | 2 -- > 2 files changed, 17 deletions(-) > > Index: linux-pm/drivers/acpi/sleep.c > =================================================================== > --- linux-pm.orig/drivers/acpi/sleep.c > +++ linux-pm/drivers/acpi/sleep.c > @@ -806,21 +806,6 @@ static void acpi_sleep_hibernate_setup(v > static inline void acpi_sleep_hibernate_setup(void) {} > #endif /* !CONFIG_HIBERNATION */ > > -int acpi_suspend(u32 acpi_state) > -{ > - suspend_state_t states[] = { > - [1] = PM_SUSPEND_STANDBY, > - [3] = PM_SUSPEND_MEM, > - [5] = PM_SUSPEND_MAX > - }; > - > - if (acpi_state < 6 && states[acpi_state]) > - return pm_suspend(states[acpi_state]); > - if (acpi_state == 4) > - return hibernate(); > - return -EINVAL; > -} > - > static void acpi_power_off_prepare(void) > { > /* Prepare to power off the system */ > Index: linux-pm/drivers/acpi/sleep.h > =================================================================== > --- linux-pm.orig/drivers/acpi/sleep.h > +++ linux-pm/drivers/acpi/sleep.h > @@ -1,6 +1,4 @@ > > -extern int acpi_suspend(u32 state); > - > extern void acpi_enable_wakeup_devices(u8 sleep_state); > extern void acpi_disable_wakeup_devices(u8 sleep_state); > > > > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used 2015-03-17 14:29 ` [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used Rafael J. Wysocki 2015-03-17 14:24 ` Lorenzo Pieralisi @ 2015-03-18 1:17 ` Hanjun Guo 1 sibling, 0 replies; 45+ messages in thread From: Hanjun Guo @ 2015-03-18 1:17 UTC (permalink / raw) To: Rafael J. Wysocki, ACPI Devel Maling List Cc: Hanjun Guo, Lorenzo Pieralisi, Linux Kernel Mailing List On 2015/3/17 22:29, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > The acpi_suspend() function has no callers, so drop it. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> > --- > drivers/acpi/sleep.c | 15 --------------- > drivers/acpi/sleep.h | 2 -- > 2 files changed, 17 deletions(-) > > Index: linux-pm/drivers/acpi/sleep.c > =================================================================== > --- linux-pm.orig/drivers/acpi/sleep.c > +++ linux-pm/drivers/acpi/sleep.c > @@ -806,21 +806,6 @@ static void acpi_sleep_hibernate_setup(v > static inline void acpi_sleep_hibernate_setup(void) {} > #endif /* !CONFIG_HIBERNATION */ > > -int acpi_suspend(u32 acpi_state) > -{ > - suspend_state_t states[] = { > - [1] = PM_SUSPEND_STANDBY, > - [3] = PM_SUSPEND_MEM, > - [5] = PM_SUSPEND_MAX > - }; > - > - if (acpi_state < 6 && states[acpi_state]) > - return pm_suspend(states[acpi_state]); > - if (acpi_state == 4) > - return hibernate(); > - return -EINVAL; > -} > - > static void acpi_power_off_prepare(void) > { > /* Prepare to power off the system */ > Index: linux-pm/drivers/acpi/sleep.h > =================================================================== > --- linux-pm.orig/drivers/acpi/sleep.h > +++ linux-pm/drivers/acpi/sleep.h > @@ -1,6 +1,4 @@ > > -extern int acpi_suspend(u32 state); > - > extern void acpi_enable_wakeup_devices(u8 sleep_state); > extern void acpi_disable_wakeup_devices(u8 sleep_state); > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > . > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP 2015-03-17 12:35 ` Lorenzo Pieralisi (?) @ 2015-03-17 14:30 ` Rafael J. Wysocki -1 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:30 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: guohanjun, hanjun.guo, Catalin Marinas, Will Deacon, Olof Johansson, grant.likely, Arnd Bergmann, Mark Rutland, graeme.gregory, Sudeep Holla, jcm, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel On Tuesday, March 17, 2015 12:35:36 PM Lorenzo Pieralisi wrote: > On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: > > [...] > > > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > > we doing so)? > > > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > only arch setting it at least for the time being, is that correct? > > HW reduced only platforms are still required to support sleep > states that on arm64 are totally meaningless at present, so I do > not think ACPI_REDUCED_HARDWARE_ONLY will cut it. > > Factoring out power_off methods from sleep.c ? I know, it is not nicer > since you split the S-states management in multiple files. > > Side note: is the acpi_suspend() function in sleep.c used in the kernel ? No, it isn't. I've just sent a patch to drop it. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 14:30 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:30 UTC (permalink / raw) To: linux-arm-kernel On Tuesday, March 17, 2015 12:35:36 PM Lorenzo Pieralisi wrote: > On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: > > [...] > > > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > > we doing so)? > > > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > only arch setting it at least for the time being, is that correct? > > HW reduced only platforms are still required to support sleep > states that on arm64 are totally meaningless at present, so I do > not think ACPI_REDUCED_HARDWARE_ONLY will cut it. > > Factoring out power_off methods from sleep.c ? I know, it is not nicer > since you split the S-states management in multiple files. > > Side note: is the acpi_suspend() function in sleep.c used in the kernel ? No, it isn't. I've just sent a patch to drop it. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP @ 2015-03-17 14:30 ` Rafael J. Wysocki 0 siblings, 0 replies; 45+ messages in thread From: Rafael J. Wysocki @ 2015-03-17 14:30 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: guohanjun, hanjun.guo, Catalin Marinas, Will Deacon, Olof Johansson, grant.likely, Arnd Bergmann, Mark Rutland, graeme.gregory, Sudeep Holla, jcm, Marc Zyngier, Mark Brown, Robert Richter, Timur Tabi, Ashwin Chaugule, suravee.suthikulpanit, linux-acpi, linux-arm-kernel, linux-kernel, linaro-acpi, Tomasz Nowicki, Zhangdianfang On Tuesday, March 17, 2015 12:35:36 PM Lorenzo Pieralisi wrote: > On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote: > > [...] > > > > Do you mean remove CONFIG_ACPI_GENERIC_SLEEP and > > > > > > +acpi-$(CONFIG_ACPI_SLEEP) += sleep.o > > > > > > as well (also need to remove duplicate #ifdef CONFIG_ACPI_SLEEP in sleep.c if > > > we doing so)? > > > > Well, almost. There is one problem with that, becuase sleep.c contains code > > outside of the ACPI_SLEEP-dependent blocks. That code is used for powering > > off ACPI platforms. > > > > I guess you don't want that code on ARM too, right? > > > > Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the > > only arch setting it at least for the time being, is that correct? > > HW reduced only platforms are still required to support sleep > states that on arm64 are totally meaningless at present, so I do > not think ACPI_REDUCED_HARDWARE_ONLY will cut it. > > Factoring out power_off methods from sleep.c ? I know, it is not nicer > since you split the S-states management in multiple files. > > Side note: is the acpi_suspend() function in sleep.c used in the kernel ? No, it isn't. I've just sent a patch to drop it. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2015-03-18 1:57 UTC | newest] Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-13 8:14 [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP Hanjun Guo 2015-03-13 8:14 ` Hanjun Guo 2015-03-13 21:49 ` Rafael J. Wysocki 2015-03-13 21:49 ` Rafael J. Wysocki 2015-03-16 12:14 ` Hanjun Guo 2015-03-16 12:14 ` Hanjun Guo 2015-03-16 12:14 ` Hanjun Guo 2015-03-16 23:15 ` Rafael J. Wysocki 2015-03-16 23:15 ` Rafael J. Wysocki 2015-03-16 23:15 ` Rafael J. Wysocki 2015-03-17 1:08 ` Hanjun Guo 2015-03-17 1:08 ` Hanjun Guo 2015-03-17 1:08 ` Hanjun Guo 2015-03-17 2:28 ` Rafael J. Wysocki 2015-03-17 2:28 ` Rafael J. Wysocki 2015-03-17 2:28 ` Rafael J. Wysocki 2015-03-17 2:36 ` Hanjun Guo 2015-03-17 2:36 ` Hanjun Guo 2015-03-17 2:36 ` Hanjun Guo 2015-03-17 3:23 ` Rafael J. Wysocki 2015-03-17 3:23 ` Rafael J. Wysocki 2015-03-17 3:23 ` Rafael J. Wysocki 2015-03-17 4:10 ` Hanjun Guo 2015-03-17 4:10 ` Hanjun Guo 2015-03-17 4:10 ` Hanjun Guo 2015-03-17 5:59 ` Jon Masters 2015-03-17 5:59 ` Jon Masters 2015-03-17 6:31 ` Hanjun Guo 2015-03-17 6:31 ` Hanjun Guo 2015-03-17 6:31 ` Hanjun Guo 2015-03-17 14:33 ` Rafael J. Wysocki 2015-03-17 14:33 ` Rafael J. Wysocki 2015-03-17 14:33 ` Rafael J. Wysocki 2015-03-18 1:56 ` Hanjun Guo 2015-03-18 1:56 ` Hanjun Guo 2015-03-18 1:56 ` Hanjun Guo 2015-03-17 12:35 ` Lorenzo Pieralisi 2015-03-17 12:35 ` Lorenzo Pieralisi 2015-03-17 12:35 ` Lorenzo Pieralisi [not found] ` <CAGHbJ3DhUB688K7ooT7ai=2QjRp7S+_E_Y+a+GupeTvjR5omMg@mail.gmail.com> 2015-03-17 14:29 ` [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used Rafael J. Wysocki 2015-03-17 14:24 ` Lorenzo Pieralisi 2015-03-18 1:17 ` Hanjun Guo 2015-03-17 14:30 ` [update][PATCH v10 06/21] ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP Rafael J. Wysocki 2015-03-17 14:30 ` Rafael J. Wysocki 2015-03-17 14:30 ` Rafael J. Wysocki
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.