diff options
| -rw-r--r-- | arch/openrisc/include/asm/processor.h | 2 | ||||
| -rw-r--r-- | arch/openrisc/kernel/irq.c | 20 | ||||
| -rw-r--r-- | arch/openrisc/kernel/ptrace.c | 2 | ||||
| -rw-r--r-- | arch/openrisc/lib/delay.c | 6 | ||||
| -rw-r--r-- | include/linux/audit.h | 1 |
5 files changed, 17 insertions, 14 deletions
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index 30462f1fe959..43decdbdb2ed 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h | |||
| @@ -103,7 +103,7 @@ extern unsigned long thread_saved_pc(struct task_struct *t); | |||
| 103 | 103 | ||
| 104 | #define init_stack (init_thread_union.stack) | 104 | #define init_stack (init_thread_union.stack) |
| 105 | 105 | ||
| 106 | #define cpu_relax() do { } while (0) | 106 | #define cpu_relax() barrier() |
| 107 | 107 | ||
| 108 | #endif /* __ASSEMBLY__ */ | 108 | #endif /* __ASSEMBLY__ */ |
| 109 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ | 109 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ |
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index e935b9d8eee1..8ec77bc9f1e7 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c | |||
| @@ -46,19 +46,19 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
| 46 | 46 | ||
| 47 | static void or1k_pic_mask(struct irq_data *data) | 47 | static void or1k_pic_mask(struct irq_data *data) |
| 48 | { | 48 | { |
| 49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->irq)); | 49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | static void or1k_pic_unmask(struct irq_data *data) | 52 | static void or1k_pic_unmask(struct irq_data *data) |
| 53 | { | 53 | { |
| 54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->irq)); | 54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->hwirq)); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static void or1k_pic_ack(struct irq_data *data) | 57 | static void or1k_pic_ack(struct irq_data *data) |
| 58 | { | 58 | { |
| 59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear | 59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear |
| 60 | * the latch. | 60 | * the latch. |
| 61 | * LEVER-triggered interrupts do not need to be ack'ed; however, | 61 | * LEVEL-triggered interrupts do not need to be ack'ed; however, |
| 62 | * ack'ing the interrupt has no ill-effect and is quicker than | 62 | * ack'ing the interrupt has no ill-effect and is quicker than |
| 63 | * trying to figure out what type it is... | 63 | * trying to figure out what type it is... |
| 64 | */ | 64 | */ |
| @@ -75,10 +75,10 @@ static void or1k_pic_ack(struct irq_data *data) | |||
| 75 | * as opposed to a 1 as mandated by the spec | 75 | * as opposed to a 1 as mandated by the spec |
| 76 | */ | 76 | */ |
| 77 | 77 | ||
| 78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); |
| 79 | #else | 79 | #else |
| 80 | WARN(1, "Interrupt handling possibily broken\n"); | 80 | WARN(1, "Interrupt handling possibly broken\n"); |
| 81 | mtspr(SPR_PICSR, (1UL << irq)); | 81 | mtspr(SPR_PICSR, (1UL << data->hwirq)); |
| 82 | #endif | 82 | #endif |
| 83 | } | 83 | } |
| 84 | 84 | ||
| @@ -87,10 +87,12 @@ static void or1k_pic_mask_ack(struct irq_data *data) | |||
| 87 | /* Comments for pic_ack apply here, too */ | 87 | /* Comments for pic_ack apply here, too */ |
| 88 | 88 | ||
| 89 | #ifdef CONFIG_OR1K_1200 | 89 | #ifdef CONFIG_OR1K_1200 |
| 90 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 90 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
| 91 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); | ||
| 91 | #else | 92 | #else |
| 92 | WARN(1, "Interrupt handling possibily broken\n"); | 93 | WARN(1, "Interrupt handling possibly broken\n"); |
| 93 | mtspr(SPR_PICSR, (1UL << irq)); | 94 | mtspr(SPR_PICMR, (1UL << data->hwirq)); |
| 95 | mtspr(SPR_PICSR, (1UL << data->hwirq)); | ||
| 94 | #endif | 96 | #endif |
| 95 | } | 97 | } |
| 96 | 98 | ||
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index e71781d24b0e..71a2a0c34c65 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c | |||
| @@ -187,7 +187,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
| 187 | */ | 187 | */ |
| 188 | ret = -1L; | 188 | ret = -1L; |
| 189 | 189 | ||
| 190 | audit_syscall_entry(audit_arch(), regs->gpr[11], | 190 | audit_syscall_entry(AUDIT_ARCH_OPENRISC, regs->gpr[11], |
| 191 | regs->gpr[3], regs->gpr[4], | 191 | regs->gpr[3], regs->gpr[4], |
| 192 | regs->gpr[5], regs->gpr[6]); | 192 | regs->gpr[5], regs->gpr[6]); |
| 193 | 193 | ||
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c index 01d9740ae6f3..c330767c9217 100644 --- a/arch/openrisc/lib/delay.c +++ b/arch/openrisc/lib/delay.c | |||
| @@ -30,9 +30,9 @@ int __devinit read_current_timer(unsigned long *timer_value) | |||
| 30 | 30 | ||
| 31 | void __delay(unsigned long cycles) | 31 | void __delay(unsigned long cycles) |
| 32 | { | 32 | { |
| 33 | cycles_t target = get_cycles() + cycles; | 33 | cycles_t start = get_cycles(); |
| 34 | 34 | ||
| 35 | while (get_cycles() < target) | 35 | while ((get_cycles() - start) < cycles) |
| 36 | cpu_relax(); | 36 | cpu_relax(); |
| 37 | } | 37 | } |
| 38 | EXPORT_SYMBOL(__delay); | 38 | EXPORT_SYMBOL(__delay); |
| @@ -41,7 +41,7 @@ inline void __const_udelay(unsigned long xloops) | |||
| 41 | { | 41 | { |
| 42 | unsigned long long loops; | 42 | unsigned long long loops; |
| 43 | 43 | ||
| 44 | loops = xloops * loops_per_jiffy * HZ; | 44 | loops = (unsigned long long)xloops * loops_per_jiffy * HZ; |
| 45 | 45 | ||
| 46 | __delay(loops >> 32); | 46 | __delay(loops >> 32); |
| 47 | } | 47 | } |
diff --git a/include/linux/audit.h b/include/linux/audit.h index e5884f950b4b..b889fa64b0e0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -337,6 +337,7 @@ enum { | |||
| 337 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | 337 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) |
| 338 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | 338 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) |
| 339 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 339 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 340 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) | ||
| 340 | #define AUDIT_ARCH_PARISC (EM_PARISC) | 341 | #define AUDIT_ARCH_PARISC (EM_PARISC) |
| 341 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | 342 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) |
| 342 | #define AUDIT_ARCH_PPC (EM_PPC) | 343 | #define AUDIT_ARCH_PPC (EM_PPC) |
