sh: machine_ops based reboot support.
This provides a machine_ops-based reboot interface loosely cloned from x86, and converts the native sh32 and sh64 cases over to it. Necessary both for tying in SMP support and also enabling platforms like SDK7786 to add support for their microcontroller-based power managers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@ -20,10 +20,9 @@
|
||||
#include <asm/system.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
static int hlt_counter;
|
||||
void (*pm_idle)(void) = NULL;
|
||||
void (*pm_power_off)(void);
|
||||
EXPORT_SYMBOL(pm_power_off);
|
||||
|
||||
static int hlt_counter;
|
||||
|
||||
static int __init nohlt_setup(char *__unused)
|
||||
{
|
||||
@ -131,6 +130,15 @@ static void do_nothing(void *unused)
|
||||
{
|
||||
}
|
||||
|
||||
void stop_this_cpu(void *unused)
|
||||
{
|
||||
local_irq_disable();
|
||||
cpu_clear(smp_processor_id(), cpu_online_map);
|
||||
|
||||
for (;;)
|
||||
cpu_sleep();
|
||||
}
|
||||
|
||||
/*
|
||||
* cpu_idle_wait - Used to ensure that all the CPUs discard old value of
|
||||
* pm_idle and update to new pm_idle value. Required while changing pm_idle
|
||||
|
Reference in New Issue
Block a user