71 lines
2.4 KiB
Diff
71 lines
2.4 KiB
Diff
|
From fc25c0056c52231de1f0d321d33a379475b908e3 Mon Sep 17 00:00:00 2001
|
|||
|
From: Dongjin Kim <tobetter@gmail.com>
|
|||
|
Date: Wed, 8 Sep 2021 18:07:00 +0900
|
|||
|
Subject: [PATCH 70/75] (DO NOT MERGE) Revert "ARM: 9095/1: ARM64: Remove
|
|||
|
arm_pm_restart()"
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
This reverts commit ab6cef1d14475f1af33da99a6774626f73d278b6.
|
|||
|
|
|||
|
Temporary fix to compile error:
|
|||
|
/srv/source/drivers/power/reset/odroid-reboot.c: In function ‘odroid_restart_probe’:
|
|||
|
/srv/source/drivers/power/reset/odroid-reboot.c:141:3: error: ‘arm_pm_restart’
|
|||
|
undeclared (first use in this function); did you mean ‘alarm_restart’?
|
|||
|
141 | arm_pm_restart = do_odroid_restart;
|
|||
|
| ^~~~~~~~~~~~~~
|
|||
|
| alarm_restart
|
|||
|
/srv/source/drivers/power/reset/odroid-reboot.c:141:3: note: each
|
|||
|
undeclared identifier is reported only once for each function it appears in
|
|||
|
|
|||
|
commit: 59541fb75ee4 "ODROID-COMMON: power:reset: Add odroid support"
|
|||
|
|
|||
|
Change-Id: Id81d2cb4c7a55e660e7158a8eb7937fff077abcf
|
|||
|
---
|
|||
|
arch/arm64/include/asm/system_misc.h | 2 ++
|
|||
|
arch/arm64/kernel/process.c | 7 ++++++-
|
|||
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
|||
|
|
|||
|
diff --git a/arch/arm64/include/asm/system_misc.h b/arch/arm64/include/asm/system_misc.h
|
|||
|
index 305a7157c6a6..673be2d1263c 100644
|
|||
|
--- a/arch/arm64/include/asm/system_misc.h
|
|||
|
+++ b/arch/arm64/include/asm/system_misc.h
|
|||
|
@@ -32,6 +32,8 @@ void hook_debug_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
|
|||
|
struct mm_struct;
|
|||
|
extern void __show_regs(struct pt_regs *);
|
|||
|
|
|||
|
+extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
|||
|
+
|
|||
|
#endif /* __ASSEMBLY__ */
|
|||
|
|
|||
|
#endif /* __ASM_SYSTEM_MISC_H */
|
|||
|
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
|
|||
|
index 40adb8cdbf5a..81ba15ec68d5 100644
|
|||
|
--- a/arch/arm64/kernel/process.c
|
|||
|
+++ b/arch/arm64/kernel/process.c
|
|||
|
@@ -67,6 +67,8 @@ EXPORT_SYMBOL(__stack_chk_guard);
|
|||
|
void (*pm_power_off)(void);
|
|||
|
EXPORT_SYMBOL_GPL(pm_power_off);
|
|||
|
|
|||
|
+void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
|||
|
+
|
|||
|
#ifdef CONFIG_HOTPLUG_CPU
|
|||
|
void arch_cpu_idle_dead(void)
|
|||
|
{
|
|||
|
@@ -137,7 +139,10 @@ void machine_restart(char *cmd)
|
|||
|
efi_reboot(reboot_mode, NULL);
|
|||
|
|
|||
|
/* Now call the architecture specific reboot code. */
|
|||
|
- do_kernel_restart(cmd);
|
|||
|
+ if (arm_pm_restart)
|
|||
|
+ arm_pm_restart(reboot_mode, cmd);
|
|||
|
+ else
|
|||
|
+ do_kernel_restart(cmd);
|
|||
|
|
|||
|
/*
|
|||
|
* Whoops - the architecture was unable to reboot.
|
|||
|
--
|
|||
|
2.25.1
|
|||
|
|