diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-03 18:56:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:01 -0400 |
commit | 0287ebedfa032a57bb47f4bc5cb5e268ecd844ad (patch) | |
tree | a30b87a024e4cedcc0fdcb242e7511f8a4c22aaf /arch/ppc64/kernel/rtasd.c | |
parent | 233ccd0d0452682edb51725410e0f8c0384e8b34 (diff) |
[PATCH] ppc64: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() in ppc64-specific
code to cleanup/simplify the sleeping logic. Change the units of the
parameter of do_event_scan_all_cpus() to milliseconds from jiffies. The
return value of rtas_extended_busy_delay_time() was incorrectly being used
as a jiffies value (it is actually milliseconds), which is fixed by using
the value as a parameter to msleep_interruptible(). Also, use
rtas_extended_busy_delay_time() in another case where similar logic is
duplicated.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/rtasd.c')
-rw-r--r-- | arch/ppc64/kernel/rtasd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c index b0c3b829fe47..e26b0420b6dd 100644 --- a/arch/ppc64/kernel/rtasd.c +++ b/arch/ppc64/kernel/rtasd.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/vmalloc.h> | 19 | #include <linux/vmalloc.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/delay.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
@@ -412,8 +413,7 @@ static void do_event_scan_all_cpus(long delay) | |||
412 | 413 | ||
413 | /* Drop hotplug lock, and sleep for the specified delay */ | 414 | /* Drop hotplug lock, and sleep for the specified delay */ |
414 | unlock_cpu_hotplug(); | 415 | unlock_cpu_hotplug(); |
415 | set_current_state(TASK_INTERRUPTIBLE); | 416 | msleep_interruptible(delay); |
416 | schedule_timeout(delay); | ||
417 | lock_cpu_hotplug(); | 417 | lock_cpu_hotplug(); |
418 | 418 | ||
419 | cpu = next_cpu(cpu, cpu_online_map); | 419 | cpu = next_cpu(cpu, cpu_online_map); |
@@ -442,7 +442,7 @@ static int rtasd(void *unused) | |||
442 | 442 | ||
443 | printk(KERN_INFO "RTAS daemon started\n"); | 443 | printk(KERN_INFO "RTAS daemon started\n"); |
444 | 444 | ||
445 | DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2); | 445 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); |
446 | 446 | ||
447 | /* See if we have any error stored in NVRAM */ | 447 | /* See if we have any error stored in NVRAM */ |
448 | memset(logdata, 0, rtas_error_log_max); | 448 | memset(logdata, 0, rtas_error_log_max); |
@@ -459,7 +459,7 @@ static int rtasd(void *unused) | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /* First pass. */ | 461 | /* First pass. */ |
462 | do_event_scan_all_cpus(HZ); | 462 | do_event_scan_all_cpus(1000); |
463 | 463 | ||
464 | if (surveillance_timeout != -1) { | 464 | if (surveillance_timeout != -1) { |
465 | DEBUG("enabling surveillance\n"); | 465 | DEBUG("enabling surveillance\n"); |
@@ -471,7 +471,7 @@ static int rtasd(void *unused) | |||
471 | * machines have problems if we call event-scan too | 471 | * machines have problems if we call event-scan too |
472 | * quickly. */ | 472 | * quickly. */ |
473 | for (;;) | 473 | for (;;) |
474 | do_event_scan_all_cpus((HZ*60/rtas_event_scan_rate) / 2); | 474 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); |
475 | 475 | ||
476 | error: | 476 | error: |
477 | /* Should delete proc entries */ | 477 | /* Should delete proc entries */ |