From: Domenico Andreoli <domenico.andreoli@xxxxxxxxx> Proof of concept: ARM64 as a consumer of the machine reset hooks. Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: linux-arch@xxxxxxxxxxxxxxx Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx Signed-off-by: Domenico Andreoli <domenico.andreoli@xxxxxxxxx> --- arch/arm64/kernel/process.c | 5 +++++ kernel/power/Kconfig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index: b/kernel/power/Kconfig =================================================================== --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -297,4 +297,4 @@ config CPU_PM config MACHINE_RESET bool default n - depends on ARM + depends on ARM || ARM64 Index: b/arch/arm64/kernel/process.c =================================================================== --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -29,6 +29,7 @@ #include <linux/user.h> #include <linux/delay.h> #include <linux/reboot.h> +#include <linux/machine_reset.h> #include <linux/interrupt.h> #include <linux/kallsyms.h> #include <linux/init.h> @@ -120,6 +121,8 @@ void machine_power_off(void) machine_shutdown(); if (pm_power_off) pm_power_off(); + else + default_power_off(); } void machine_restart(char *cmd) @@ -133,6 +136,8 @@ void machine_restart(char *cmd) /* Now call the architecture specific reboot code. */ if (arm_pm_restart) arm_pm_restart(reboot_mode, cmd); + else + default_restart(reboot_mode, cmd); /* * Whoops - the architecture was unable to reboot. -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html