Skip to content

Commit

Permalink
(DO NOT MERGE) Revert "ARM: 9095/1: ARM64: Remove arm_pm_restart()"
Browse files Browse the repository at this point in the history
This reverts commit ab6cef1.

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: 59541fb "ODROID-COMMON: power:reset: Add odroid support"

Change-Id: Id81d2cb4c7a55e660e7158a8eb7937fff077abcf
  • Loading branch information
tobetter committed Sep 8, 2021
1 parent ef59683 commit 522f011
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/arm64/include/asm/system_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
7 changes: 6 additions & 1 deletion arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,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)
{
Expand Down Expand Up @@ -140,7 +142,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.
Expand Down

0 comments on commit 522f011

Please sign in to comment.