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)
{
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 @@ static int rtasd(void *unused)
} while(error == 0);
/* Check all cpus for pending events before sleeping*/
if (!first_pass) {
/*
* 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((HZ*60/rtas_event_scan_rate) / 2);
}
schedule_timeout(first_pass ? HZ : (HZ*60/rtas_event_scan_rate) / 2);
}
if (first_pass && surveillance_requested) {
......@@ -255,10 +257,9 @@ static int rtasd(void *unused)
if (enable_surveillance())
goto error_vfree;
DEBUG("surveillance enabled\n");
} else {
first_pass = 0;
}
first_pass = 0;
goto repeat;
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