Commit fa830439 authored by Jing Li's avatar Jing Li Committed by guzitao
Browse files

sw64: acpi: support reset and S5

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

Now acpi_power_off() and acpi_reboot() can work if the firmware provides
necessary information.

Signed-off-by: default avatarJing Li <jingli@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent db544983
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ config SW64
	select ACPI_MCFG if (ACPI && PCI)
	select ACPI_PPTT if ACPI
	select ACPI_REDUCED_HARDWARE_ONLY
	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
	select ARCH_ATOMIC
	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
	select ARCH_HAS_ELF_RANDOMIZE
+12 −0
Original line number Diff line number Diff line
@@ -112,6 +112,18 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
	/* We take rcid as processor _UID */
	return cpu_physical_id(cpu);
}

static inline unsigned long acpi_get_wakeup_address(void)
{
	return 0;
}

static inline bool acpi_skip_set_wakeup_address(void)
{
	return true;
}

#define acpi_skip_set_wakeup_address acpi_skip_set_wakeup_address
#else /* !CONFIG_ACPI */

static inline void acpi_noirq_set(void) { }
+2 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ void machine_restart(char *command)
	/* VM cannot reach here */
	WARN_ON(!is_in_host());

	acpi_reboot();

	/**
	 * Compatibility with old firmware, can be removed
	 * when no longer support SW3231.