diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:41:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:41:52 -0400 |
commit | cf77e988ddfc7f047ac1ddc72cadb5eee7e09293 (patch) | |
tree | d4870b7290ea50fe01ed4d56febad449f1206172 /arch/ia64/kernel | |
parent | 1d3c6ff44ad4b5f113602e153026a338f0f9b3ff (diff) | |
parent | 2a2ae2426bba944ce6dbcad35e1580df57aafcf1 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Drop duplicated "config IOMMU_HELPER"
[IA64] invoke oom-killer from page fault
[IA64] use __ratelimit
[IA64] Use set_cpus_allowed_ptr
[IA64] Use set_cpus_allowed_ptr
[IA64] arch/ia64/hp/common/sba_iommu.c: Rename dev_info to adi
[IA64] removing redundant ifdef
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/cpufreq/acpi-cpufreq.c | 10 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 9 | ||||
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 5 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 24 |
5 files changed, 17 insertions, 35 deletions
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index b0b4e6e710f2..22f61526a8e1 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
@@ -113,7 +113,7 @@ processor_get_freq ( | |||
113 | dprintk("processor_get_freq\n"); | 113 | dprintk("processor_get_freq\n"); |
114 | 114 | ||
115 | saved_mask = current->cpus_allowed; | 115 | saved_mask = current->cpus_allowed; |
116 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 116 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
117 | if (smp_processor_id() != cpu) | 117 | if (smp_processor_id() != cpu) |
118 | goto migrate_end; | 118 | goto migrate_end; |
119 | 119 | ||
@@ -121,7 +121,7 @@ processor_get_freq ( | |||
121 | ret = processor_get_pstate(&value); | 121 | ret = processor_get_pstate(&value); |
122 | 122 | ||
123 | if (ret) { | 123 | if (ret) { |
124 | set_cpus_allowed(current, saved_mask); | 124 | set_cpus_allowed_ptr(current, &saved_mask); |
125 | printk(KERN_WARNING "get performance failed with error %d\n", | 125 | printk(KERN_WARNING "get performance failed with error %d\n", |
126 | ret); | 126 | ret); |
127 | ret = 0; | 127 | ret = 0; |
@@ -131,7 +131,7 @@ processor_get_freq ( | |||
131 | ret = (clock_freq*1000); | 131 | ret = (clock_freq*1000); |
132 | 132 | ||
133 | migrate_end: | 133 | migrate_end: |
134 | set_cpus_allowed(current, saved_mask); | 134 | set_cpus_allowed_ptr(current, &saved_mask); |
135 | return ret; | 135 | return ret; |
136 | } | 136 | } |
137 | 137 | ||
@@ -151,7 +151,7 @@ processor_set_freq ( | |||
151 | dprintk("processor_set_freq\n"); | 151 | dprintk("processor_set_freq\n"); |
152 | 152 | ||
153 | saved_mask = current->cpus_allowed; | 153 | saved_mask = current->cpus_allowed; |
154 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 154 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
155 | if (smp_processor_id() != cpu) { | 155 | if (smp_processor_id() != cpu) { |
156 | retval = -EAGAIN; | 156 | retval = -EAGAIN; |
157 | goto migrate_end; | 157 | goto migrate_end; |
@@ -208,7 +208,7 @@ processor_set_freq ( | |||
208 | retval = 0; | 208 | retval = 0; |
209 | 209 | ||
210 | migrate_end: | 210 | migrate_end: |
211 | set_cpus_allowed(current, saved_mask); | 211 | set_cpus_allowed_ptr(current, &saved_mask); |
212 | return (retval); | 212 | return (retval); |
213 | } | 213 | } |
214 | 214 | ||
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 640479304ac0..f14c35f9b03a 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/threads.h> | 29 | #include <linux/threads.h> |
30 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
31 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
32 | #include <linux/ratelimit.h> | ||
32 | 33 | ||
33 | #include <asm/delay.h> | 34 | #include <asm/delay.h> |
34 | #include <asm/intrinsics.h> | 35 | #include <asm/intrinsics.h> |
@@ -467,13 +468,9 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) | |||
467 | sp = ia64_getreg(_IA64_REG_SP); | 468 | sp = ia64_getreg(_IA64_REG_SP); |
468 | 469 | ||
469 | if ((sp - bsp) < 1024) { | 470 | if ((sp - bsp) < 1024) { |
470 | static unsigned char count; | 471 | static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); |
471 | static long last_time; | ||
472 | 472 | ||
473 | if (time_after(jiffies, last_time + 5 * HZ)) | 473 | if (__ratelimit(&ratelimit)) { |
474 | count = 0; | ||
475 | if (++count < 5) { | ||
476 | last_time = jiffies; | ||
477 | printk("ia64_handle_irq: DANGER: less than " | 474 | printk("ia64_handle_irq: DANGER: less than " |
478 | "1KB of free stack space!!\n" | 475 | "1KB of free stack space!!\n" |
479 | "(bsp=0x%lx, sp=%lx)\n", bsp, sp); | 476 | "(bsp=0x%lx, sp=%lx)\n", bsp, sp); |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index e6676fca4828..aa8b5fa1a8de 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -404,10 +404,9 @@ static void | |||
404 | call_on_cpu(int cpu, void (*fn)(void *), void *arg) | 404 | call_on_cpu(int cpu, void (*fn)(void *), void *arg) |
405 | { | 405 | { |
406 | cpumask_t save_cpus_allowed = current->cpus_allowed; | 406 | cpumask_t save_cpus_allowed = current->cpus_allowed; |
407 | cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu); | 407 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
408 | set_cpus_allowed(current, new_cpus_allowed); | ||
409 | (*fn)(arg); | 408 | (*fn)(arg); |
410 | set_cpus_allowed(current, save_cpus_allowed); | 409 | set_cpus_allowed_ptr(current, &save_cpus_allowed); |
411 | } | 410 | } |
412 | 411 | ||
413 | static void | 412 | static void |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 28f299de2903..0baa1bbb65fe 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -361,12 +361,12 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
361 | return 0; | 361 | return 0; |
362 | 362 | ||
363 | oldmask = current->cpus_allowed; | 363 | oldmask = current->cpus_allowed; |
364 | retval = set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 364 | retval = set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
365 | if (unlikely(retval)) | 365 | if (unlikely(retval)) |
366 | return retval; | 366 | return retval; |
367 | 367 | ||
368 | retval = cpu_cache_sysfs_init(cpu); | 368 | retval = cpu_cache_sysfs_init(cpu); |
369 | set_cpus_allowed(current, oldmask); | 369 | set_cpus_allowed_ptr(current, &oldmask); |
370 | if (unlikely(retval < 0)) | 370 | if (unlikely(retval < 0)) |
371 | return retval; | 371 | return retval; |
372 | 372 | ||
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 776dd40397e2..622772b7fb6c 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
20 | #include <linux/ratelimit.h> | ||
20 | 21 | ||
21 | #include <asm/intrinsics.h> | 22 | #include <asm/intrinsics.h> |
22 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
@@ -1283,24 +1284,9 @@ emulate_store_float (unsigned long ifa, load_store_t ld, struct pt_regs *regs) | |||
1283 | /* | 1284 | /* |
1284 | * Make sure we log the unaligned access, so that user/sysadmin can notice it and | 1285 | * Make sure we log the unaligned access, so that user/sysadmin can notice it and |
1285 | * eventually fix the program. However, we don't want to do that for every access so we | 1286 | * eventually fix the program. However, we don't want to do that for every access so we |
1286 | * pace it with jiffies. This isn't really MP-safe, but it doesn't really have to be | 1287 | * pace it with jiffies. |
1287 | * either... | ||
1288 | */ | 1288 | */ |
1289 | static int | 1289 | static DEFINE_RATELIMIT_STATE(logging_rate_limit, 5 * HZ, 5); |
1290 | within_logging_rate_limit (void) | ||
1291 | { | ||
1292 | static unsigned long count, last_time; | ||
1293 | |||
1294 | if (time_after(jiffies, last_time + 5 * HZ)) | ||
1295 | count = 0; | ||
1296 | if (count < 5) { | ||
1297 | last_time = jiffies; | ||
1298 | count++; | ||
1299 | return 1; | ||
1300 | } | ||
1301 | return 0; | ||
1302 | |||
1303 | } | ||
1304 | 1290 | ||
1305 | void | 1291 | void |
1306 | ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | 1292 | ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) |
@@ -1337,7 +1323,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1337 | 1323 | ||
1338 | if (!no_unaligned_warning && | 1324 | if (!no_unaligned_warning && |
1339 | !(current->thread.flags & IA64_THREAD_UAC_NOPRINT) && | 1325 | !(current->thread.flags & IA64_THREAD_UAC_NOPRINT) && |
1340 | within_logging_rate_limit()) | 1326 | __ratelimit(&logging_rate_limit)) |
1341 | { | 1327 | { |
1342 | char buf[200]; /* comm[] is at most 16 bytes... */ | 1328 | char buf[200]; /* comm[] is at most 16 bytes... */ |
1343 | size_t len; | 1329 | size_t len; |
@@ -1370,7 +1356,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1370 | } | 1356 | } |
1371 | } | 1357 | } |
1372 | } else { | 1358 | } else { |
1373 | if (within_logging_rate_limit()) { | 1359 | if (__ratelimit(&logging_rate_limit)) { |
1374 | printk(KERN_WARNING "kernel unaligned access to 0x%016lx, ip=0x%016lx\n", | 1360 | printk(KERN_WARNING "kernel unaligned access to 0x%016lx, ip=0x%016lx\n", |
1375 | ifa, regs->cr_iip + ipsr->ri); | 1361 | ifa, regs->cr_iip + ipsr->ri); |
1376 | if (unaligned_dump_stack) | 1362 | if (unaligned_dump_stack) |