kernel/smp: replace schedule_timeout() with ssleep()
Subsystems (2)
PATCH 1/1 kernel/smp: replace schedule_timeout() with ssleep()
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 <[email protected]>
Signed-off-by Domen Puncer <[email protected]>
---
kj-domen/kernel/power/smp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/power/smp.c renamed from kernel/power/smp.c~ssleep-kernel_power_smp +2 -2
@@ -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)printk ("Freezing CPUs (at %d)" ,smp_processor_id ()); oldmask = current->cpus_allowed;set_cpus_allowed (current,cpumask_of_cpu (0 )); - current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (HZ ); +ssleep (1 );printk ("..." );BUG_ON (smp_processor_id () !=0 );
_
Hi!
Quoted 6 lines
Use
ssleep()instead ofschedule_timeout(). The original code usesTASK_INTERRUPTIBLE, but does not check for signals, so I believe the change tossleep()is appropriate.Signed-off-by Nishanth Aravamudan <[email protected]>Signed-off-by Domen Puncer <[email protected]>
Actually this code should be rewritten to use cpu hotplug infrastructure, but this seems simple enough. ACK. [Heh, would be nice if someone could test it...]
Pavel
Quoted 22 lines
diff -puN
kernel/power/smp.c~ssleep-kernel_power_smpkernel/power/smp.ckernel/power/smp.c renamed from kernel/power/smp.c~ssleep-kernel_power_smp +2
-2@@ -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)printk ("Freezing CPUs (at %d)" ,smp_processor_id ()); oldmask = current->cpus_allowed;set_cpus_allowed (current,cpumask_of_cpu (0 )); - current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (HZ ); +ssleep (1 );printk ("..." );BUG_ON (smp_processor_id () !=0 );_
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!