mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
x86: fixup machine_ops reboot_{32|64}.c unification fallout
When reboot_32.c and reboot_64.c were unified (commit 4d022e35fd...), the machine_ops code was broken, leading to xen pvops kernels failing to properly halt/poweroff/reboot etc. This fixes that up. Signed-off-by: Jody Belka <knew-linux@pimb.org> Cc: Miguel Boton <mboton@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
1cdde19109
commit
416e2d6379
@ -326,7 +326,7 @@ static inline void kb_wait(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_emergency_restart(void)
|
static void native_machine_emergency_restart(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -376,7 +376,7 @@ void machine_emergency_restart(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_shutdown(void)
|
static void native_machine_shutdown(void)
|
||||||
{
|
{
|
||||||
/* Stop the cpus and apics */
|
/* Stop the cpus and apics */
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
@ -420,7 +420,7 @@ void machine_shutdown(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_restart(char *__unused)
|
static void native_machine_restart(char *__unused)
|
||||||
{
|
{
|
||||||
printk("machine restart\n");
|
printk("machine restart\n");
|
||||||
|
|
||||||
@ -429,11 +429,11 @@ void machine_restart(char *__unused)
|
|||||||
machine_emergency_restart();
|
machine_emergency_restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_halt(void)
|
static void native_machine_halt(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void machine_power_off(void)
|
static void native_machine_power_off(void)
|
||||||
{
|
{
|
||||||
if (pm_power_off) {
|
if (pm_power_off) {
|
||||||
if (!reboot_force)
|
if (!reboot_force)
|
||||||
@ -443,9 +443,35 @@ void machine_power_off(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct machine_ops machine_ops = {
|
struct machine_ops machine_ops = {
|
||||||
.power_off = machine_power_off,
|
.power_off = native_machine_power_off,
|
||||||
.shutdown = machine_shutdown,
|
.shutdown = native_machine_shutdown,
|
||||||
.emergency_restart = machine_emergency_restart,
|
.emergency_restart = native_machine_emergency_restart,
|
||||||
.restart = machine_restart,
|
.restart = native_machine_restart,
|
||||||
.halt = machine_halt
|
.halt = native_machine_halt
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void machine_power_off(void)
|
||||||
|
{
|
||||||
|
machine_ops.power_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_shutdown(void)
|
||||||
|
{
|
||||||
|
machine_ops.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_emergency_restart(void)
|
||||||
|
{
|
||||||
|
machine_ops.emergency_restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_restart(char *cmd)
|
||||||
|
{
|
||||||
|
machine_ops.restart(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
void machine_halt(void)
|
||||||
|
{
|
||||||
|
machine_ops.halt();
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user