Commit 46ec4a5b authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Never call event-scan faster than once per second, required on some machines

parent 2c5c4f1f
...@@ -147,8 +147,8 @@ static int enable_surveillance(void) ...@@ -147,8 +147,8 @@ static int enable_surveillance(void)
{ {
int error; int error;
error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL, SURVEILLANCE_TOKEN, error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL,
0, SURVEILLANCE_TIMEOUT); SURVEILLANCE_TOKEN, 0, SURVEILLANCE_TIMEOUT);
if (error) { if (error) {
printk(KERN_ERR "rtasd: could not enable surveillance\n"); printk(KERN_ERR "rtasd: could not enable surveillance\n");
...@@ -243,11 +243,13 @@ static int rtasd(void *unused) ...@@ -243,11 +243,13 @@ static int rtasd(void *unused)
} while(error == 0); } while(error == 0);
/* Check all cpus for pending events before sleeping*/ /*
if (!first_pass) { * Check all cpus for pending events quickly, sleeping for
set_current_state(TASK_INTERRUPTIBLE); * at least one second since some machines have problems
schedule_timeout((HZ*60/rtas_event_scan_rate) / 2); * 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) { if (first_pass && surveillance_requested) {
...@@ -255,10 +257,9 @@ static int rtasd(void *unused) ...@@ -255,10 +257,9 @@ static int rtasd(void *unused)
if (enable_surveillance()) if (enable_surveillance())
goto error_vfree; goto error_vfree;
DEBUG("surveillance enabled\n"); DEBUG("surveillance enabled\n");
} else {
first_pass = 0;
} }
first_pass = 0;
goto repeat; goto repeat;
error_vfree: error_vfree:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment