aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
commite05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch)
tree31382cf1c7d62c03126448affb2fc86e8c4aaa8b /arch/openrisc
parent3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff)
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits) Linux 3.7-rc1 x86, boot: Explicitly include autoconf.h for hostprogs perf: Fix UAPI fallout ARM: config: make sure that platforms are ordered by option string ARM: config: sort select statements alphanumerically UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h perf: Handle new rbtree implementation procfs: don't need a PATH_MAX allocation to hold a string representation of an int vfs: embed struct filename inside of names_cache allocation if possible audit: make audit_inode take struct filename vfs: make path_openat take a struct filename pointer vfs: turn do_path_lookup into wrapper around struct filename variant audit: allow audit code to satisfy getname requests from its names_list vfs: define struct filename and have getname() return it btrfs: Fix compilation with user namespace support enabled userns: Fix posix_acl_file_xattr_userns gid conversion userns: Properly print bluetooth socket uids ...
Diffstat (limited to 'arch/openrisc')
-rw-r--r--arch/openrisc/Kconfig1
-rw-r--r--arch/openrisc/include/asm/Kbuild3
-rw-r--r--arch/openrisc/include/asm/elf.h54
-rw-r--r--arch/openrisc/include/asm/processor.h2
-rw-r--r--arch/openrisc/include/asm/ptrace.h17
-rw-r--r--arch/openrisc/include/asm/thread_info.h3
-rw-r--r--arch/openrisc/include/uapi/asm/Kbuild10
-rw-r--r--arch/openrisc/include/uapi/asm/byteorder.h (renamed from arch/openrisc/include/asm/byteorder.h)0
-rw-r--r--arch/openrisc/include/uapi/asm/elf.h69
-rw-r--r--arch/openrisc/include/uapi/asm/kvm_para.h (renamed from arch/openrisc/include/asm/kvm_para.h)0
-rw-r--r--arch/openrisc/include/uapi/asm/param.h (renamed from arch/openrisc/include/asm/param.h)0
-rw-r--r--arch/openrisc/include/uapi/asm/ptrace.h35
-rw-r--r--arch/openrisc/include/uapi/asm/sigcontext.h (renamed from arch/openrisc/include/asm/sigcontext.h)0
-rw-r--r--arch/openrisc/include/uapi/asm/unistd.h (renamed from arch/openrisc/include/asm/unistd.h)5
-rw-r--r--arch/openrisc/kernel/irq.c20
-rw-r--r--arch/openrisc/kernel/process.c4
-rw-r--r--arch/openrisc/kernel/ptrace.c2
-rw-r--r--arch/openrisc/lib/delay.c6
-rw-r--r--arch/openrisc/mm/fault.c1
19 files changed, 141 insertions, 91 deletions
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 49765b53f637..05f2ba41ff1a 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -21,6 +21,7 @@ config OPENRISC
21 select GENERIC_CLOCKEVENTS 21 select GENERIC_CLOCKEVENTS
22 select GENERIC_STRNCPY_FROM_USER 22 select GENERIC_STRNCPY_FROM_USER
23 select GENERIC_STRNLEN_USER 23 select GENERIC_STRNLEN_USER
24 select MODULES_USE_ELF_RELA
24 25
25config MMU 26config MMU
26 def_bool y 27 def_bool y
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index 0922959663a0..78de6805268d 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -1,6 +1,4 @@
1include include/asm-generic/Kbuild.asm
2 1
3header-y += elf.h
4header-y += ucontext.h 2header-y += ucontext.h
5 3
6generic-y += atomic.h 4generic-y += atomic.h
@@ -11,6 +9,7 @@ generic-y += bug.h
11generic-y += bugs.h 9generic-y += bugs.h
12generic-y += cacheflush.h 10generic-y += cacheflush.h
13generic-y += checksum.h 11generic-y += checksum.h
12generic-y += clkdev.h
14generic-y += cmpxchg.h 13generic-y += cmpxchg.h
15generic-y += cmpxchg-local.h 14generic-y += cmpxchg-local.h
16generic-y += cputime.h 15generic-y += cputime.h
diff --git a/arch/openrisc/include/asm/elf.h b/arch/openrisc/include/asm/elf.h
index a8fe2c513070..f4aa8a542a22 100644
--- a/arch/openrisc/include/asm/elf.h
+++ b/arch/openrisc/include/asm/elf.h
@@ -15,60 +15,12 @@
15 * the Free Software Foundation; either version 2 of the License, or 15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version. 16 * (at your option) any later version.
17 */ 17 */
18
19#ifndef __ASM_OPENRISC_ELF_H 18#ifndef __ASM_OPENRISC_ELF_H
20#define __ASM_OPENRISC_ELF_H 19#define __ASM_OPENRISC_ELF_H
21 20
22/*
23 * This files is partially exported to userspace. This allows us to keep
24 * the ELF bits in one place which should assist in keeping the kernel and
25 * userspace in sync.
26 */
27
28/*
29 * ELF register definitions..
30 */
31
32/* for struct user_regs_struct definition */
33#include <asm/ptrace.h>
34
35/* The OR1K relocation types... not all relevant for module loader */
36#define R_OR32_NONE 0
37#define R_OR32_32 1
38#define R_OR32_16 2
39#define R_OR32_8 3
40#define R_OR32_CONST 4
41#define R_OR32_CONSTH 5
42#define R_OR32_JUMPTARG 6
43#define R_OR32_VTINHERIT 7
44#define R_OR32_VTENTRY 8
45
46typedef unsigned long elf_greg_t;
47
48/*
49 * Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is
50 * thus exposed to user-space.
51 */
52#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
53typedef elf_greg_t elf_gregset_t[ELF_NGREG];
54
55/* A placeholder; OR32 does not have fp support yes, so no fp regs for now. */
56typedef unsigned long elf_fpregset_t;
57
58/* This should be moved to include/linux/elf.h */
59#define EM_OR32 0x8472
60#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
61
62/*
63 * These are used to set parameters in the core dumps.
64 */
65#define ELF_ARCH EM_OR32
66#define ELF_CLASS ELFCLASS32
67#define ELF_DATA ELFDATA2MSB
68
69#ifdef __KERNEL__
70 21
71#include <linux/types.h> 22#include <linux/types.h>
23#include <uapi/asm/elf.h>
72 24
73/* 25/*
74 * This is used to ensure we don't load something for the wrong architecture. 26 * This is used to ensure we don't load something for the wrong architecture.
@@ -110,7 +62,7 @@ extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt);
110 62
111#define ELF_PLATFORM (NULL) 63#define ELF_PLATFORM (NULL)
112 64
113#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 65#define SET_PERSONALITY(ex) \
66 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
114 67
115#endif /* __KERNEL__ */
116#endif 68#endif
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/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h
index 8555c0c3d4d7..6ca17264c399 100644
--- a/arch/openrisc/include/asm/ptrace.h
+++ b/arch/openrisc/include/asm/ptrace.h
@@ -15,25 +15,12 @@
15 * the Free Software Foundation; either version 2 of the License, or 15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version. 16 * (at your option) any later version.
17 */ 17 */
18
19#ifndef __ASM_OPENRISC_PTRACE_H 18#ifndef __ASM_OPENRISC_PTRACE_H
20#define __ASM_OPENRISC_PTRACE_H 19#define __ASM_OPENRISC_PTRACE_H
21 20
22#ifndef __ASSEMBLY__
23/*
24 * This is the layout of the regset returned by the GETREGSET ptrace call
25 */
26struct user_regs_struct {
27 /* GPR R0-R31... */
28 unsigned long gpr[32];
29 unsigned long pc;
30 unsigned long sr;
31};
32#endif
33
34#ifdef __KERNEL__
35 21
36#include <asm/spr_defs.h> 22#include <asm/spr_defs.h>
23#include <uapi/asm/ptrace.h>
37 24
38/* 25/*
39 * Make kernel PTrace/register structures opaque to userspace... userspace can 26 * Make kernel PTrace/register structures opaque to userspace... userspace can
@@ -134,6 +121,4 @@ static inline long regs_return_value(struct pt_regs *regs)
134#define PT_ORIG_GPR11 132 121#define PT_ORIG_GPR11 132
135#define PT_SYSCALLNO 136 122#define PT_SYSCALLNO 136
136 123
137#endif /* __KERNEL__ */
138
139#endif /* __ASM_OPENRISC_PTRACE_H */ 124#endif /* __ASM_OPENRISC_PTRACE_H */
diff --git a/arch/openrisc/include/asm/thread_info.h b/arch/openrisc/include/asm/thread_info.h
index 07a8bc080ef2..07f3212422ad 100644
--- a/arch/openrisc/include/asm/thread_info.h
+++ b/arch/openrisc/include/asm/thread_info.h
@@ -121,7 +121,6 @@ register struct thread_info *current_thread_info_reg asm("r10");
121#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 121#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
122#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 122#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
123#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 123#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
124#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
125#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 124#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
126 125
127 126
@@ -129,6 +128,8 @@ register struct thread_info *current_thread_info_reg asm("r10");
129/* For OpenRISC, this is anything in the LSW other than syscall trace */ 128/* For OpenRISC, this is anything in the LSW other than syscall trace */
130#define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP)) 129#define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP))
131 130
131#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
132
132#endif /* __KERNEL__ */ 133#endif /* __KERNEL__ */
133 134
134#endif /* _ASM_THREAD_INFO_H */ 135#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
new file mode 100644
index 000000000000..80761eb82b5f
--- /dev/null
+++ b/arch/openrisc/include/uapi/asm/Kbuild
@@ -0,0 +1,10 @@
1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm
3
4header-y += byteorder.h
5header-y += elf.h
6header-y += kvm_para.h
7header-y += param.h
8header-y += ptrace.h
9header-y += sigcontext.h
10header-y += unistd.h
diff --git a/arch/openrisc/include/asm/byteorder.h b/arch/openrisc/include/uapi/asm/byteorder.h
index 60d14f7e14e2..60d14f7e14e2 100644
--- a/arch/openrisc/include/asm/byteorder.h
+++ b/arch/openrisc/include/uapi/asm/byteorder.h
diff --git a/arch/openrisc/include/uapi/asm/elf.h b/arch/openrisc/include/uapi/asm/elf.h
new file mode 100644
index 000000000000..f02ea5830420
--- /dev/null
+++ b/arch/openrisc/include/uapi/asm/elf.h
@@ -0,0 +1,69 @@
1/*
2 * OpenRISC Linux
3 *
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * OpenRISC implementation:
9 * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
11 * et al.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */
18
19#ifndef _UAPI__ASM_OPENRISC_ELF_H
20#define _UAPI__ASM_OPENRISC_ELF_H
21
22/*
23 * This files is partially exported to userspace. This allows us to keep
24 * the ELF bits in one place which should assist in keeping the kernel and
25 * userspace in sync.
26 */
27
28/*
29 * ELF register definitions..
30 */
31
32/* for struct user_regs_struct definition */
33#include <asm/ptrace.h>
34
35/* The OR1K relocation types... not all relevant for module loader */
36#define R_OR32_NONE 0
37#define R_OR32_32 1
38#define R_OR32_16 2
39#define R_OR32_8 3
40#define R_OR32_CONST 4
41#define R_OR32_CONSTH 5
42#define R_OR32_JUMPTARG 6
43#define R_OR32_VTINHERIT 7
44#define R_OR32_VTENTRY 8
45
46typedef unsigned long elf_greg_t;
47
48/*
49 * Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is
50 * thus exposed to user-space.
51 */
52#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
53typedef elf_greg_t elf_gregset_t[ELF_NGREG];
54
55/* A placeholder; OR32 does not have fp support yes, so no fp regs for now. */
56typedef unsigned long elf_fpregset_t;
57
58/* This should be moved to include/linux/elf.h */
59#define EM_OR32 0x8472
60#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
61
62/*
63 * These are used to set parameters in the core dumps.
64 */
65#define ELF_ARCH EM_OR32
66#define ELF_CLASS ELFCLASS32
67#define ELF_DATA ELFDATA2MSB
68
69#endif /* _UAPI__ASM_OPENRISC_ELF_H */
diff --git a/arch/openrisc/include/asm/kvm_para.h b/arch/openrisc/include/uapi/asm/kvm_para.h
index 14fab8f0b957..14fab8f0b957 100644
--- a/arch/openrisc/include/asm/kvm_para.h
+++ b/arch/openrisc/include/uapi/asm/kvm_para.h
diff --git a/arch/openrisc/include/asm/param.h b/arch/openrisc/include/uapi/asm/param.h
index c39a336610e2..c39a336610e2 100644
--- a/arch/openrisc/include/asm/param.h
+++ b/arch/openrisc/include/uapi/asm/param.h
diff --git a/arch/openrisc/include/uapi/asm/ptrace.h b/arch/openrisc/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..9760bd17fbcc
--- /dev/null
+++ b/arch/openrisc/include/uapi/asm/ptrace.h
@@ -0,0 +1,35 @@
1/*
2 * OpenRISC Linux
3 *
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * OpenRISC implementation:
9 * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
11 * et al.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */
18
19#ifndef _UAPI__ASM_OPENRISC_PTRACE_H
20#define _UAPI__ASM_OPENRISC_PTRACE_H
21
22#ifndef __ASSEMBLY__
23/*
24 * This is the layout of the regset returned by the GETREGSET ptrace call
25 */
26struct user_regs_struct {
27 /* GPR R0-R31... */
28 unsigned long gpr[32];
29 unsigned long pc;
30 unsigned long sr;
31};
32#endif
33
34
35#endif /* _UAPI__ASM_OPENRISC_PTRACE_H */
diff --git a/arch/openrisc/include/asm/sigcontext.h b/arch/openrisc/include/uapi/asm/sigcontext.h
index b79c2b19afbe..b79c2b19afbe 100644
--- a/arch/openrisc/include/asm/sigcontext.h
+++ b/arch/openrisc/include/uapi/asm/sigcontext.h
diff --git a/arch/openrisc/include/asm/unistd.h b/arch/openrisc/include/uapi/asm/unistd.h
index 89af3ab5c2e9..437bdbb61b14 100644
--- a/arch/openrisc/include/asm/unistd.h
+++ b/arch/openrisc/include/uapi/asm/unistd.h
@@ -16,9 +16,6 @@
16 * (at your option) any later version. 16 * (at your option) any later version.
17 */ 17 */
18 18
19#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL)
20#define __ASM_OPENRISC_UNISTD_H
21
22#define __ARCH_HAVE_MMU 19#define __ARCH_HAVE_MMU
23 20
24#define sys_mmap2 sys_mmap_pgoff 21#define sys_mmap2 sys_mmap_pgoff
@@ -27,5 +24,3 @@
27 24
28#define __NR_or1k_atomic __NR_arch_specific_syscall 25#define __NR_or1k_atomic __NR_arch_specific_syscall
29__SYSCALL(__NR_or1k_atomic, sys_or1k_atomic) 26__SYSCALL(__NR_or1k_atomic, sys_or1k_atomic)
30
31#endif /* __ASM_OPENRISC_UNISTD_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
47static void or1k_pic_mask(struct irq_data *data) 47static 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
52static void or1k_pic_unmask(struct irq_data *data) 52static 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
57static void or1k_pic_ack(struct irq_data *data) 57static 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/process.c b/arch/openrisc/kernel/process.c
index 55210f37d1a3..c35f3ab1a8d3 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -271,7 +271,7 @@ asmlinkage long _sys_execve(const char __user *name,
271 struct pt_regs *regs) 271 struct pt_regs *regs)
272{ 272{
273 int error; 273 int error;
274 char *filename; 274 struct filename *filename;
275 275
276 filename = getname(name); 276 filename = getname(name);
277 error = PTR_ERR(filename); 277 error = PTR_ERR(filename);
@@ -279,7 +279,7 @@ asmlinkage long _sys_execve(const char __user *name,
279 if (IS_ERR(filename)) 279 if (IS_ERR(filename))
280 goto out; 280 goto out;
281 281
282 error = do_execve(filename, argv, envp, regs); 282 error = do_execve(filename->name, argv, envp, regs);
283 putname(filename); 283 putname(filename);
284 284
285out: 285out:
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
31void __delay(unsigned long cycles) 31void __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}
38EXPORT_SYMBOL(__delay); 38EXPORT_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/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 40f850e9766c..e2bfafce66c5 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -183,6 +183,7 @@ good_area:
183 tsk->min_flt++; 183 tsk->min_flt++;
184 if (fault & VM_FAULT_RETRY) { 184 if (fault & VM_FAULT_RETRY) {
185 flags &= ~FAULT_FLAG_ALLOW_RETRY; 185 flags &= ~FAULT_FLAG_ALLOW_RETRY;
186 flags |= FAULT_FLAG_TRIED;
186 187
187 /* No need to up_read(&mm->mmap_sem) as we would 188 /* No need to up_read(&mm->mmap_sem) as we would
188 * have already released it in __lock_page_or_retry 189 * have already released it in __lock_page_or_retry