From 16dcb4bbda579c4e3d80048b755ac124d8fab21a Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Tue, 26 Jul 2005 11:32:34 -0600 Subject: [PATCH] Fix the arguments to machine_restart on cris It appears machine_restart has been working cris just by luck. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds --- arch/cris/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/cris/kernel/process.c') diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 9f7cad7c784..7645c4d4de6 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c @@ -113,6 +113,7 @@ #include #include #include +#include //#define DEBUG @@ -208,7 +209,7 @@ void cpu_idle (void) void hard_reset_now (void); -void machine_restart(void) +void machine_restart(char *cmd) { hard_reset_now(); } -- cgit v1.2.3 From 59586e5a262a29361c45c929ea3253d4aec830b0 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Tue, 26 Jul 2005 11:36:01 -0600 Subject: [PATCH] Don't export machine_restart, machine_halt, or machine_power_off. machine_restart, machine_halt and machine_power_off are machine specific hooks deep into the reboot logic, that modules have no business messing with. Usually code should be calling kernel_restart, kernel_halt, kernel_power_off, or emergency_restart. So don't export machine_restart, machine_halt, and machine_power_off so we can catch buggy users. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds --- arch/cris/kernel/process.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/cris/kernel/process.c') diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 7645c4d4de6..a5ad2b67585 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c @@ -214,8 +214,6 @@ void machine_restart(char *cmd) hard_reset_now(); } -EXPORT_SYMBOL(machine_restart); - /* * Similar to machine_power_off, but don't shut off power. Add code * here to freeze the system for e.g. post-mortem debug purpose when @@ -226,16 +224,12 @@ void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); - /* If or when software power-off is implemented, add code here. */ void machine_power_off(void) { } -EXPORT_SYMBOL(machine_power_off); - /* * When a process does an "exec", machine state like FPU and debug * registers need to be reset. This is a hook function for that. -- cgit v1.2.3 From 5d01e6ce785884a5db5792cd2e5bb36fa82fe23c Mon Sep 17 00:00:00 2001 From: Mikael Starvik Date: Wed, 27 Jul 2005 11:44:43 -0700 Subject: [PATCH] CRIS update: updates for 2.6.12 Patches to make CRIS work with 2.6.12. Signed-off-by: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/cris/kernel/process.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'arch/cris/kernel/process.c') diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index a5ad2b67585..949a0e40e03 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.17 2004/04/05 13:53:48 starvik Exp $ +/* $Id: process.c,v 1.21 2005/03/04 08:16:17 starvik Exp $ * * linux/arch/cris/kernel/process.c * @@ -8,6 +8,18 @@ * Authors: Bjorn Wesen (bjornw@axis.com) * * $Log: process.c,v $ + * Revision 1.21 2005/03/04 08:16:17 starvik + * Merge of Linux 2.6.11. + * + * Revision 1.20 2005/01/18 05:57:22 starvik + * Renamed hlt_counter to cris_hlt_counter and made it global. + * + * Revision 1.19 2004/10/19 13:07:43 starvik + * Merge of Linux 2.6.9 + * + * Revision 1.18 2004/08/16 12:37:23 starvik + * Merge of Linux 2.6.8 + * * Revision 1.17 2004/04/05 13:53:48 starvik * Merge of Linux 2.6.5 * @@ -161,18 +173,18 @@ EXPORT_SYMBOL(init_task); * region by enable_hlt/disable_hlt. */ -static int hlt_counter=0; +int cris_hlt_counter=0; void disable_hlt(void) { - hlt_counter++; + cris_hlt_counter++; } EXPORT_SYMBOL(disable_hlt); void enable_hlt(void) { - hlt_counter--; + cris_hlt_counter--; } EXPORT_SYMBOL(enable_hlt); @@ -195,16 +207,19 @@ void cpu_idle (void) /* endless idle loop with no priority at all */ while (1) { while (!need_resched()) { - void (*idle)(void) = pm_idle; - + void (*idle)(void); + /* + * Mark this as an RCU critical section so that + * synchronize_kernel() in the unload path waits + * for our completion. + */ + idle = pm_idle; if (!idle) idle = default_idle; - idle(); } schedule(); } - } void hard_reset_now (void); -- cgit v1.2.3