git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
arch
/
sh
/
kernel
/
process.c
diff --git
a/arch/sh/kernel/process.c
b/arch/sh/kernel/process.c
index
6b4cb09
..
8ba6dd3
100644
(file)
--- a/
arch/sh/kernel/process.c
+++ b/
arch/sh/kernel/process.c
@@
-1,4
+1,4
@@
-/* $Id: process.c,v 1.2
6 2004/02/06 14:14:14 kkojima
Exp $
+/* $Id: process.c,v 1.2
8 2004/05/05 16:54:23 lethal
Exp $
*
* linux/arch/sh/kernel/process.c
*
*
* linux/arch/sh/kernel/process.c
*
@@
-25,6
+25,11
@@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/elf.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/elf.h>
+#if defined(CONFIG_SH_HS7751RVOIP)
+#include <asm/hs7751rvoip/hs7751rvoip.h>
+#elif defined(CONFIG_SH_RTS7751R2D)
+#include <asm/rts7751r2d/rts7751r2d.h>
+#endif
static int hlt_counter=0;
static int hlt_counter=0;
@@
-50,8
+55,14
@@
void default_idle(void)
{
/* endless idle loop with no priority at all */
while (1) {
{
/* endless idle loop with no priority at all */
while (1) {
- while (!need_resched())
- cpu_relax();
+ if (hlt_counter) {
+ while (1)
+ if (need_resched())
+ break;
+ } else {
+ while (!need_resched())
+ cpu_sleep();
+ }
schedule();
}
schedule();
}
@@
-73,14
+84,30
@@
EXPORT_SYMBOL(machine_restart);
void machine_halt(void)
{
void machine_halt(void)
{
+#if defined(CONFIG_SH_HS7751RVOIP)
+ unsigned short value;
+
+ value = ctrl_inw(PA_OUTPORTR);
+ ctrl_outw((value & 0xffdf), PA_OUTPORTR);
+#elif defined(CONFIG_SH_RTS7751R2D)
+ ctrl_outw(0x0001, PA_POWOFF);
+#endif
while (1)
while (1)
- cpu_
relax
();
+ cpu_
sleep
();
}
EXPORT_SYMBOL(machine_halt);
void machine_power_off(void)
{
}
EXPORT_SYMBOL(machine_halt);
void machine_power_off(void)
{
+#if defined(CONFIG_SH_HS7751RVOIP)
+ unsigned short value;
+
+ value = ctrl_inw(PA_OUTPORTR);
+ ctrl_outw((value & 0xffdf), PA_OUTPORTR);
+#elif defined(CONFIG_SH_RTS7751R2D)
+ ctrl_outw(0x0001, PA_POWOFF);
+#endif
}
EXPORT_SYMBOL(machine_power_off);
}
EXPORT_SYMBOL(machine_power_off);