Skip to contentSkip to conversation

ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP

PATCH In review Hanjun Guo 5 participants 18 messages Mar 13, 2015 – Mar 18, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH v10 6/21 ACPI / sleep: Introduce CONFIG_ACPI_GENERIC_SLEEP

From: Graeme Gregory <[email protected]>

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.

---
 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(-)
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +1 -0
index b7d31ca..9804431 100644
@@ -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
drivers/acpi/Kconfig +4 -0
index e6c3ddd..a7b9120 100644
@@ -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
drivers/acpi/Makefile +1 -1
index 623b117..2397822 100644
@@ -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
 
drivers/acpi/internal.h +4 -0
index 56b321a..6f08c85 100644
@@ -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);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 43 lines · Hanjun Guo

From: Graeme Gregory <[email protected]>

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.

---
 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(-)
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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.

Quoted 51 lines
arch/x86/Kconfig +0 -0
 	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
 	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
 	select ARCH_HAS_FAST_MULTIPLIER
drivers/acpi/Kconfig +4 -0
index e6c3ddd..a7b9120 100644
@@ -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
drivers/acpi/Makefile +1 -1
index 623b117..2397822 100644
@@ -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
 
drivers/acpi/internal.h +4 -0
index 56b321a..6f08c85 100644
@@ -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);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
author
#2 lore raw
Quoted 53 lines · Rafael J. Wysocki
Quoted 43 lines · Hanjun Guo

From: Graeme Gregory <[email protected]>

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.

---
  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(-)
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

#3 lore raw
Quoted 73 lines · Hanjun Guo
Quoted 53 lines · Rafael J. Wysocki
Quoted 43 lines · Hanjun Guo

From: Graeme Gregory <[email protected]>

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.

---
  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(-)
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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?

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 48 lines
Quoted 48 lines
Quoted 26 lines
Quoted 18 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines
Quoted 3 lines

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

#5 lore raw
Quoted 59 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 54 lines
Quoted 44 lines
Quoted 26 lines
Quoted 18 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 4 lines
Quoted 1 line

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?

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw
Quoted 59 lines · Rafael J. Wysocki
Quoted 58 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 53 lines
Quoted 43 lines
Quoted 25 lines
Quoted 17 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

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

#7 lore raw
Quoted 63 lines · Hanjun Guo
Quoted 62 lines · Rafael J. Wysocki
Quoted 61 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 47 lines
Quoted 47 lines
Quoted 25 lines
Quoted 17 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines
Quoted 3 lines

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.

Quoted 8 lines
Quoted 1 line

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?

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
Quoted 69 lines · Rafael J. Wysocki
Quoted 68 lines · Hanjun Guo
Quoted 59 lines · Rafael J. Wysocki
Quoted 58 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 53 lines
Quoted 43 lines
Quoted 25 lines
Quoted 17 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

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

Quoted 7 lines
Quoted 2 lines

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.

Quoted 2 lines

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.

Quoted 1 line

only arch setting it at least for the time being, is that correct?

That's pretty sure for now.

Thanks
Hanjun

#9 lore raw
Quoted 13 lines · Hanjun Guo
Quoted 7 lines · Rafael J. Wysocki

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.

Quoted 1 line

Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the

Quoted 7 lines

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

#10 lore raw
Quoted 17 lines · Jon Masters
Quoted 8 lines · Hanjun Guo
Quoted 6 lines · Rafael J. Wysocki

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.

Quoted 8 lines
Quoted 1 line

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.

Quoted 6 lines

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.

Quoted 4 lines

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

#11 lore raw
In reply to Hanjun Guo
Quoted 83 lines · Hanjun Guo
Quoted 69 lines · Rafael J. Wysocki
Quoted 68 lines · Hanjun Guo
Quoted 59 lines · Rafael J. Wysocki
Quoted 58 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 53 lines
Quoted 43 lines
Quoted 25 lines
Quoted 17 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

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

Quoted 7 lines
Quoted 2 lines

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.

Quoted 2 lines

Perhaps we can use ACPI_REDUCED_HARDWARE_ONLY for that? ARM64 will be the

Quoted 7 lines

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.

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#12 lore raw
Quoted 84 lines · Rafael J. Wysocki
Quoted 83 lines · Hanjun Guo
Quoted 69 lines · Rafael J. Wysocki
Quoted 68 lines · Hanjun Guo
Quoted 59 lines · Rafael J. Wysocki
Quoted 58 lines · Hanjun Guo
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Hanjun Guo
Quoted 1 line · Rafael J. Wysocki

On Friday, March 13, 2015 04:14:29 PM Hanjun Guo wrote:

[...]

Quoted 53 lines
Quoted 43 lines
Quoted 25 lines
Quoted 17 lines
arch/ia64/Kconfig +1 -0
index 074e52b..e8728d7 100644
@@ -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
arch/x86/Kconfig +0 -0
index b7d31ca..9804431 100644

arch/x86/Kconfig config X86_64 · line 25

Quoted 4 lines
arch/x86/Kconfig +1 -0
@@ -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

(quoted diff) +1 -0
+	select ACPI_GENERIC_SLEEP if ACPI_SLEEP
Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

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

Quoted 7 lines
Quoted 2 lines

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.

Quoted 1 line

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?

Quoted 6 lines
Quoted 4 lines

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

#13 lore raw
In reply to Rafael J. Wysocki

On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote:

[...]

Quoted 7 lines
Quoted 6 lines

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)?

Quoted 8 lines

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

A message that is not in the archive (sent off-list or not yet received): CAGHbJ3DhUB688K7ooT7ai=2QjRp7S+_E_Y+a+GupeTvjR5omMg@mail.gmail.com

#15 lore raw

PATCH 1/1 ACPI / sleep: Drop acpi_suspend() which is not used

From: Rafael J. Wysocki <[email protected]>

The acpi_suspend() function has no callers, so drop it.

---
 drivers/acpi/sleep.c |   15 ---------------
 drivers/acpi/sleep.h |    2 --
 2 files changed, 17 deletions(-)
drivers/acpi/sleep.c +0 -15
Index: 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 */
drivers/acpi/sleep.h +0 -2
Index: 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);
 
Acked-by on v1 1/1
#16 lore raw

Re: [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used

Quoted 5 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The acpi_suspend() function has no callers, so drop it.

Quoted 45 lines
---
 drivers/acpi/sleep.c |   15 ---------------
 drivers/acpi/sleep.h |    2 --
 2 files changed, 17 deletions(-)

Index: linux-pm/drivers/acpi/sleep.c
===================================================================

drivers/acpi/sleep.c +0 -15
@@ -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
===================================================================

drivers/acpi/sleep.h +0 -2
@@ -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);
 
Reviewed-by on v1 1/1
#17 lore raw

Re: [PATCH] ACPI / sleep: Drop acpi_suspend() which is not used

In reply to Rafael J. Wysocki
Quoted 5 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The acpi_suspend() function has no callers, so drop it.

Quoted 50 lines
---
 drivers/acpi/sleep.c |   15 ---------------
 drivers/acpi/sleep.h |    2 --
 2 files changed, 17 deletions(-)

Index: linux-pm/drivers/acpi/sleep.c
===================================================================

drivers/acpi/sleep.c +0 -15
@@ -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
===================================================================

drivers/acpi/sleep.h +0 -3
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

.

#18 lore raw
In reply to Lorenzo Pieralisi
Quoted 20 lines · Lorenzo Pieralisi

On Tue, Mar 17, 2015 at 03:23:11AM +0000, Rafael J. Wysocki wrote:

[...]

Quoted 7 lines
Quoted 6 lines

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)?

Quoted 8 lines

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?

Quoted 8 lines

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.

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.