diff options
| -rw-r--r-- | arch/ia64/Kconfig | 3 | ||||
| -rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 8 | ||||
| -rw-r--r-- | arch/ia64/include/asm/mmzone.h | 4 | ||||
| -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 | ||||
| -rw-r--r-- | arch/ia64/mm/fault.c | 13 | ||||
| -rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 4 |
10 files changed, 26 insertions, 58 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 4d4f4188cdf1..9676100b83ee 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
| @@ -59,9 +59,6 @@ config NEED_DMA_MAP_STATE | |||
| 59 | config SWIOTLB | 59 | config SWIOTLB |
| 60 | bool | 60 | bool |
| 61 | 61 | ||
| 62 | config IOMMU_HELPER | ||
| 63 | bool | ||
| 64 | |||
| 65 | config GENERIC_LOCKBREAK | 62 | config GENERIC_LOCKBREAK |
| 66 | def_bool n | 63 | def_bool n |
| 67 | 64 | ||
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index e14c492a8a93..4ce8d1358fee 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
| @@ -2046,13 +2046,13 @@ acpi_sba_ioc_add(struct acpi_device *device) | |||
| 2046 | struct ioc *ioc; | 2046 | struct ioc *ioc; |
| 2047 | acpi_status status; | 2047 | acpi_status status; |
| 2048 | u64 hpa, length; | 2048 | u64 hpa, length; |
| 2049 | struct acpi_device_info *dev_info; | 2049 | struct acpi_device_info *adi; |
| 2050 | 2050 | ||
| 2051 | status = hp_acpi_csr_space(device->handle, &hpa, &length); | 2051 | status = hp_acpi_csr_space(device->handle, &hpa, &length); |
| 2052 | if (ACPI_FAILURE(status)) | 2052 | if (ACPI_FAILURE(status)) |
| 2053 | return 1; | 2053 | return 1; |
| 2054 | 2054 | ||
| 2055 | status = acpi_get_object_info(device->handle, &dev_info); | 2055 | status = acpi_get_object_info(device->handle, &adi); |
| 2056 | if (ACPI_FAILURE(status)) | 2056 | if (ACPI_FAILURE(status)) |
| 2057 | return 1; | 2057 | return 1; |
| 2058 | 2058 | ||
| @@ -2060,13 +2060,13 @@ acpi_sba_ioc_add(struct acpi_device *device) | |||
| 2060 | * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI | 2060 | * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI |
| 2061 | * root bridges, and its CSR space includes the IOC function. | 2061 | * root bridges, and its CSR space includes the IOC function. |
| 2062 | */ | 2062 | */ |
| 2063 | if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) { | 2063 | if (strncmp("HWP0001", adi->hardware_id.string, 7) == 0) { |
| 2064 | hpa += ZX1_IOC_OFFSET; | 2064 | hpa += ZX1_IOC_OFFSET; |
| 2065 | /* zx1 based systems default to kernel page size iommu pages */ | 2065 | /* zx1 based systems default to kernel page size iommu pages */ |
| 2066 | if (!iovp_shift) | 2066 | if (!iovp_shift) |
| 2067 | iovp_shift = min(PAGE_SHIFT, 16); | 2067 | iovp_shift = min(PAGE_SHIFT, 16); |
| 2068 | } | 2068 | } |
| 2069 | kfree(dev_info); | 2069 | kfree(adi); |
| 2070 | 2070 | ||
| 2071 | /* | 2071 | /* |
| 2072 | * default anything not caught above or specified on cmdline to 4k | 2072 | * default anything not caught above or specified on cmdline to 4k |
diff --git a/arch/ia64/include/asm/mmzone.h b/arch/ia64/include/asm/mmzone.h index f2ca32069b3f..e0de61709cf1 100644 --- a/arch/ia64/include/asm/mmzone.h +++ b/arch/ia64/include/asm/mmzone.h | |||
| @@ -19,16 +19,12 @@ | |||
| 19 | 19 | ||
| 20 | static inline int pfn_to_nid(unsigned long pfn) | 20 | static inline int pfn_to_nid(unsigned long pfn) |
| 21 | { | 21 | { |
| 22 | #ifdef CONFIG_NUMA | ||
| 23 | extern int paddr_to_nid(unsigned long); | 22 | extern int paddr_to_nid(unsigned long); |
| 24 | int nid = paddr_to_nid(pfn << PAGE_SHIFT); | 23 | int nid = paddr_to_nid(pfn << PAGE_SHIFT); |
| 25 | if (nid < 0) | 24 | if (nid < 0) |
| 26 | return 0; | 25 | return 0; |
| 27 | else | 26 | else |
| 28 | return nid; | 27 | return nid; |
| 29 | #else | ||
| 30 | return 0; | ||
| 31 | #endif | ||
| 32 | } | 28 | } |
| 33 | 29 | ||
| 34 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ | 30 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ |
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) |
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 19261a99e623..0799fea4c588 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c | |||
| @@ -148,7 +148,6 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re | |||
| 148 | if ((vma->vm_flags & mask) != mask) | 148 | if ((vma->vm_flags & mask) != mask) |
| 149 | goto bad_area; | 149 | goto bad_area; |
| 150 | 150 | ||
| 151 | survive: | ||
| 152 | /* | 151 | /* |
| 153 | * If for any reason at all we couldn't handle the fault, make | 152 | * If for any reason at all we couldn't handle the fault, make |
| 154 | * sure we exit gracefully rather than endlessly redo the | 153 | * sure we exit gracefully rather than endlessly redo the |
| @@ -276,13 +275,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re | |||
| 276 | 275 | ||
| 277 | out_of_memory: | 276 | out_of_memory: |
| 278 | up_read(&mm->mmap_sem); | 277 | up_read(&mm->mmap_sem); |
| 279 | if (is_global_init(current)) { | 278 | if (!user_mode(regs)) |
| 280 | yield(); | 279 | goto no_context; |
| 281 | down_read(&mm->mmap_sem); | 280 | pagefault_out_of_memory(); |
| 282 | goto survive; | ||
| 283 | } | ||
| 284 | printk(KERN_CRIT "VM: killing process %s\n", current->comm); | ||
| 285 | if (user_mode(regs)) | ||
| 286 | do_group_exit(SIGKILL); | ||
| 287 | goto no_context; | ||
| 288 | } | 281 | } |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 55ac3c4e11d2..f6c1c5fd075d 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
| @@ -629,9 +629,9 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info) | |||
| 629 | else { | 629 | else { |
| 630 | /* migrate the task before calling SAL */ | 630 | /* migrate the task before calling SAL */ |
| 631 | save_allowed = current->cpus_allowed; | 631 | save_allowed = current->cpus_allowed; |
| 632 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 632 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
| 633 | sn_hwperf_call_sal(op_info); | 633 | sn_hwperf_call_sal(op_info); |
| 634 | set_cpus_allowed(current, save_allowed); | 634 | set_cpus_allowed_ptr(current, &save_allowed); |
| 635 | } | 635 | } |
| 636 | } | 636 | } |
| 637 | r = op_info->ret; | 637 | r = op_info->ret; |
