git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.infradead.org/~dwmw2/mtd-2.6.35
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
rtasd.c
diff --git
a/arch/powerpc/kernel/rtasd.c
b/arch/powerpc/kernel/rtasd.c
index
4190eae
..
638883e
100644
(file)
--- a/
arch/powerpc/kernel/rtasd.c
+++ b/
arch/powerpc/kernel/rtasd.c
@@
-411,9
+411,9
@@
static void rtas_event_scan(struct work_struct *w)
get_online_cpus();
get_online_cpus();
- cpu =
next_cpu(smp_processor_id(), cpu_online_map
);
-
if (cpu == NR_CPUS
) {
- cpu =
first_cpu(cpu_online_map
);
+ cpu =
cpumask_next(smp_processor_id(), cpu_online_mask
);
+
if (cpu >= nr_cpu_ids
) {
+ cpu =
cpumask_first(cpu_online_mask
);
if (first_pass) {
first_pass = 0;
if (first_pass) {
first_pass = 0;
@@
-466,8
+466,8
@@
static void start_event_scan(void)
/* Retreive errors from nvram if any */
retreive_nvram_error_log();
/* Retreive errors from nvram if any */
retreive_nvram_error_log();
- schedule_delayed_work_on(
first_cpu(cpu_online_map), &event_scan_work
,
- event_scan_delay);
+ schedule_delayed_work_on(
cpumask_first(cpu_online_mask)
,
+
&event_scan_work,
event_scan_delay);
}
static int __init rtas_init(void)
}
static int __init rtas_init(void)
@@
-490,6
+490,12
@@
static int __init rtas_init(void)
return -ENODEV;
}
return -ENODEV;
}
+ if (!rtas_event_scan_rate) {
+ /* Broken firmware: take a rate of zero to mean don't scan */
+ printk(KERN_DEBUG "rtasd: scan rate is 0, not scanning\n");
+ return 0;
+ }
+
/* Make room for the sequence number */
rtas_error_log_max = rtas_get_error_log_max();
rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);
/* Make room for the sequence number */
rtas_error_log_max = rtas_get_error_log_max();
rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);