summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2014-10-01 11:04:37 +0200
committerHeiko Stuebner <heiko@sntech.de>2014-10-01 11:04:37 +0200
commitaec1d96c530674f634730bbc604a807f1ba65bfb (patch)
treeda253fde79d42ae7e0e34e045c8848763f22910b /arch
parentfc69ed70c16a31d6a77ec47a30a9fe941f763f1e (diff)
parent6cd6d94d96d9b1cd8a62da91aac44cf56e301e75 (diff)
downloadlinux-aec1d96c530674f634730bbc604a807f1ba65bfb.tar.gz
linux-aec1d96c530674f634730bbc604a807f1ba65bfb.tar.bz2
linux-aec1d96c530674f634730bbc604a807f1ba65bfb.zip
Merge tag 'tags/restart-handler-for-v3.18' into v3.18-next/cpuclk
Immutable branch with restart handler patches for v3.18
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/process.c12
-rw-r--r--arch/arm64/kernel/process.c3
2 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 81ef686a91ca..250b6f652afc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -114,18 +114,13 @@ void soft_restart(unsigned long addr)
BUG();
}
-static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
-{
-}
-
/*
* Function pointers to optional machine specific functions
*/
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
-void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
-EXPORT_SYMBOL_GPL(arm_pm_restart);
+void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
/*
* This is our default idle handler.
@@ -230,7 +225,10 @@ void machine_restart(char *cmd)
local_irq_disable();
smp_send_stop();
- arm_pm_restart(reboot_mode, cmd);
+ if (arm_pm_restart)
+ arm_pm_restart(reboot_mode, cmd);
+ else
+ do_kernel_restart(cmd);
/* Give a grace period for failure to restart of 1s */
mdelay(1000);
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 1309d64aa926..398ab05081b4 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -98,7 +98,6 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL_GPL(pm_power_off);
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
-EXPORT_SYMBOL_GPL(arm_pm_restart);
/*
* This is our default idle handler.
@@ -180,6 +179,8 @@ void machine_restart(char *cmd)
/* Now call the architecture specific reboot code. */
if (arm_pm_restart)
arm_pm_restart(reboot_mode, cmd);
+ else
+ do_kernel_restart(cmd);
/*
* Whoops - the architecture was unable to reboot.