summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-02-13 13:28:18 +1100
committerAnton Blanchard <anton@samba.org>2003-02-13 13:28:18 +1100
commit46ec4a5b48e7d125258450e4e6992330cc4cc830 (patch)
tree9e45bda1c11fe9e828d88fc1d112de3b59a65992 /arch
parent2c5c4f1f10de3a6a0b31bcdb1c4ca00680fe7c37 (diff)
ppc64: Never call event-scan faster than once per second, required on some machines
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/kernel/rtasd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c
index 106620bc27d1..3a1b6ab9f150 100644
--- a/arch/ppc64/kernel/rtasd.c
+++ b/arch/ppc64/kernel/rtasd.c
@@ -147,8 +147,8 @@ static int enable_surveillance(void)
{
int error;
- error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL, SURVEILLANCE_TOKEN,
- 0, SURVEILLANCE_TIMEOUT);
+ error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL,
+ SURVEILLANCE_TOKEN, 0, SURVEILLANCE_TIMEOUT);
if (error) {
printk(KERN_ERR "rtasd: could not enable surveillance\n");
@@ -243,11 +243,13 @@ repeat:
} while(error == 0);
- /* Check all cpus for pending events before sleeping*/
- if (!first_pass) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((HZ*60/rtas_event_scan_rate) / 2);
- }
+ /*
+ * Check all cpus for pending events quickly, sleeping for
+ * at least one second since some machines have problems
+ * if we call event-scan too quickly
+ */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(first_pass ? HZ : (HZ*60/rtas_event_scan_rate) / 2);
}
if (first_pass && surveillance_requested) {
@@ -255,10 +257,9 @@ repeat:
if (enable_surveillance())
goto error_vfree;
DEBUG("surveillance enabled\n");
- } else {
- first_pass = 0;
}
+ first_pass = 0;
goto repeat;
error_vfree: