lkml.org 
[lkml]   [2005]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 1/2] kernel/smp: replace schedule_timeout() with ssleep()
From: Nishanth Aravamudan <nacc@us.ibm.com>



Use ssleep() instead of schedule_timeout(). The original code uses
TASK_INTERRUPTIBLE, but does not check for signals, so I believe the change to
ssleep() is appropriate.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
smp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

Index: quilt/kernel/power/smp.c
===================================================================
--- quilt.orig/kernel/power/smp.c
+++ quilt/kernel/power/smp.c
@@ -13,6 +13,7 @@
#include <linux/interrupt.h>
#include <linux/suspend.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <asm/atomic.h>
#include <asm/tlbflush.h>

@@ -49,8 +50,7 @@ void disable_nonboot_cpus(void)
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(0));
printk("Freezing CPUs (at %d)", _smp_processor_id());
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
printk("...");
BUG_ON(_smp_processor_id() != 0);

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-21 07:50    [W:0.024 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site