* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6: alpha: fix compile errors in dma-mapping-common.h alpha: remove trailing spaces in messages alpha: use __ratelimit
Unified · Split
| @@ -12,7 +12,6 @@ · 11 unmodified lines | ||
| 12 | 12 | #define __ALPHA_MARVEL__H__ |
| 13 | 13 | |
| 14 | 14 | #include <linux/types.h> |
| 15 | −#include <linux/pci.h> | |
| 16 | 15 | #include <linux/spinlock.h> |
| 17 | 16 | |
| 18 | 17 | #include <asm/compiler.h> |
| @@ -6,7 +6,6 @@ · 5 unmodified lines | ||
| 6 | 6 | #define MCPCIA_ONE_HAE_WINDOW 1 |
| 7 | 7 | |
| 8 | 8 | #include <linux/types.h> |
| 9 | −#include <linux/pci.h> | |
| 10 | 9 | #include <asm/compiler.h> |
| 11 | 10 | |
| 12 | 11 | /* |
| @@ -2,7 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #define __ALPHA_TITAN__H__ |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | −#include <linux/pci.h> | |
| 6 | 5 | #include <asm/compiler.h> |
| 7 | 6 | |
| 8 | 7 | /* |
| @@ -2,7 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #define __ALPHA_TSUNAMI__H__ |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | −#include <linux/pci.h> | |
| 6 | 5 | #include <asm/compiler.h> |
| 7 | 6 | |
| 8 | 7 | /* |
| @@ -224,7 +224,7 @@ static void · 223 unmodified lines | ||
| 224 | 224 | dp264_device_interrupt(unsigned long vector) |
| 225 | 225 | { |
| 226 | 226 | #if 1 |
| 227 | − printk("dp264_device_interrupt: NOT IMPLEMENTED YET!! \n"); | |
| 227 | + printk("dp264_device_interrupt: NOT IMPLEMENTED YET!!\n"); | |
| 228 | 228 | #else |
| 229 | 229 | unsigned long pld; |
| 230 | 230 | unsigned int i; |
| @@ -171,7 +171,7 @@ titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) · 170 unmodified lines | ||
| 171 | 171 | static void |
| 172 | 172 | titan_device_interrupt(unsigned long vector) |
| 173 | 173 | { |
| 174 | − printk("titan_device_interrupt: NOT IMPLEMENTED YET!! \n"); | |
| 174 | + printk("titan_device_interrupt: NOT IMPLEMENTED YET!!\n"); | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | static void |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | #include <linux/module.h> |
| 18 | 18 | #include <linux/init.h> |
| 19 | 19 | #include <linux/kallsyms.h> |
| 20 | +#include <linux/ratelimit.h> | |
| 20 | 21 | |
| 21 | 22 | #include <asm/gentrap.h> |
| 22 | 23 | #include <asm/uaccess.h> |
| @@ -771,8 +772,7 @@ asmlinkage void · 748 unmodified lines | ||
| 771 | 772 | do_entUnaUser(void __user * va, unsigned long opcode, |
| 772 | 773 | unsigned long reg, struct pt_regs *regs) |
| 773 | 774 | { |
| 774 | − static int cnt = 0; | |
| 775 | − static unsigned long last_time; | |
| 775 | + static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); | |
| 776 | 776 | |
| 777 | 777 | unsigned long tmp1, tmp2, tmp3, tmp4; |
| 778 | 778 | unsigned long fake_reg, *reg_addr = &fake_reg; |
| @@ -783,15 +783,11 @@ do_entUnaUser(void __user * va, unsigned long opcode, · 4 unmodified lines | ||
| 783 | 783 | with the unaliged access. */ |
| 784 | 784 | |
| 785 | 785 | if (!test_thread_flag (TIF_UAC_NOPRINT)) { |
| 786 | − if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) { | |
| 787 | − cnt = 0; | |
| 788 | − } | |
| 789 | − if (++cnt < 5) { | |
| 786 | + if (__ratelimit(&ratelimit)) { | |
| 790 | 787 | printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n", |
| 791 | 788 | current->comm, task_pid_nr(current), |
| 792 | 789 | regs->pc - 4, va, opcode, reg); |
| 793 | 790 | } |
| 794 | − last_time = jiffies; | |
| 795 | 791 | } |
| 796 | 792 | if (test_thread_flag (TIF_UAC_SIGBUS)) |
| 797 | 793 | goto give_sigbus; |