Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16990
b: refs/heads/master
c: 5e38291
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jan 9, 2006
1 parent 02bbf32 commit 37e7a6b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87ba81dba431232548ce29d5d224115d0c2355ac
refs/heads/master: 5e38291d80086f6972f471c7caffa03184de0bf0
5 changes: 5 additions & 0 deletions trunk/arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
#include "proto.h"
#include "pci_impl.h"

/*
* Power off function, if any
*/
void (*pm_power_off)(void) = machine_power_off;

void
cpu_idle(void)
{
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/m32r/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
* Powermanagement idle function, if any..
*/
void (*pm_idle)(void) = NULL;
EXPORT_SYMBOL(pm_idle);

void (*pm_power_off)(void) = NULL;
EXPORT_SYMBOL(pm_power_off);

void disable_hlt(void)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/um/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "mode.h"
#include "choose-mode.h"

void (*pm_power_off)(void);

#ifdef CONFIG_SMP
static void kill_idlers(int me)
{
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void __user
magic2 != LINUX_REBOOT_MAGIC2C))
return -EINVAL;

/* Instead of trying to make the power_off code look like
* halt when pm_power_off is not set do it the easy way.
*/
if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
cmd = LINUX_REBOOT_CMD_HALT;

lock_kernel();
switch (cmd) {
case LINUX_REBOOT_CMD_RESTART:
Expand Down

0 comments on commit 37e7a6b

Please sign in to comment.