aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtasd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/rtasd.c')
-rw-r--r--arch/powerpc/kernel/rtasd.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 2e4832ab210..638883e23e3 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -20,6 +20,7 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/cpu.h> 21#include <linux/cpu.h>
22#include <linux/workqueue.h> 22#include <linux/workqueue.h>
23#include <linux/slab.h>
23 24
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25#include <asm/io.h> 26#include <asm/io.h>
@@ -410,9 +411,9 @@ static void rtas_event_scan(struct work_struct *w)
410 411
411 get_online_cpus(); 412 get_online_cpus();
412 413
413 cpu = next_cpu(smp_processor_id(), cpu_online_map); 414 cpu = cpumask_next(smp_processor_id(), cpu_online_mask);
414 if (cpu == NR_CPUS) { 415 if (cpu >= nr_cpu_ids) {
415 cpu = first_cpu(cpu_online_map); 416 cpu = cpumask_first(cpu_online_mask);
416 417
417 if (first_pass) { 418 if (first_pass) {
418 first_pass = 0; 419 first_pass = 0;
@@ -465,8 +466,8 @@ static void start_event_scan(void)
465 /* Retreive errors from nvram if any */ 466 /* Retreive errors from nvram if any */
466 retreive_nvram_error_log(); 467 retreive_nvram_error_log();
467 468
468 schedule_delayed_work_on(first_cpu(cpu_online_map), &event_scan_work, 469 schedule_delayed_work_on(cpumask_first(cpu_online_mask),
469 event_scan_delay); 470 &event_scan_work, event_scan_delay);
470} 471}
471 472
472static int __init rtas_init(void) 473static int __init rtas_init(void)
@@ -489,6 +490,12 @@ static int __init rtas_init(void)
489 return -ENODEV; 490 return -ENODEV;
490 } 491 }
491 492
493 if (!rtas_event_scan_rate) {
494 /* Broken firmware: take a rate of zero to mean don't scan */
495 printk(KERN_DEBUG "rtasd: scan rate is 0, not scanning\n");
496 return 0;
497 }
498
492 /* Make room for the sequence number */ 499 /* Make room for the sequence number */
493 rtas_error_log_max = rtas_get_error_log_max(); 500 rtas_error_log_max = rtas_get_error_log_max();
494 rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); 501 rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);