summaryrefslogtreecommitdiffstats
path: root/arch/frv/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-12-25 20:12:18 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2017-03-29 00:23:32 +0200
commit9a7513cfa26f5fcce15de6130ce3c27d77c0ce55 (patch)
tree1f7769fc94432e965b7e6d19bb0f28ed40254ae5 /arch/frv/include
parentgeneric ...copy_..._user primitives (diff)
downloadlinux-9a7513cfa26f5fcce15de6130ce3c27d77c0ce55.tar.xz
linux-9a7513cfa26f5fcce15de6130ce3c27d77c0ce55.zip
frv: switch to use of fixup_exception()
Massage frv search_exception_table() to a) taking pt_regs pointer as explicit argument b) updating ->pc on success Simplifies callers a bit and allows to convert to generic extable.h, while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/frv/include')
-rw-r--r--arch/frv/include/asm/Kbuild1
-rw-r--r--arch/frv/include/asm/uaccess.h23
2 files changed, 2 insertions, 22 deletions
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild
index c33b46715f65..cce3bc3603ea 100644
--- a/arch/frv/include/asm/Kbuild
+++ b/arch/frv/include/asm/Kbuild
@@ -1,6 +1,7 @@
generic-y += clkdev.h
generic-y += exec.h
+generic-y += extable.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
diff --git a/arch/frv/include/asm/uaccess.h b/arch/frv/include/asm/uaccess.h
index 55b3a69c6c53..5bcc57de3c95 100644
--- a/arch/frv/include/asm/uaccess.h
+++ b/arch/frv/include/asm/uaccess.h
@@ -18,6 +18,7 @@
#include <linux/mm.h>
#include <asm/segment.h>
#include <asm/sections.h>
+#include <asm/extable.h>
#define __ptr(x) ((unsigned long __force *)(x))
@@ -59,26 +60,6 @@ static inline int ___range_ok(unsigned long addr, unsigned long size)
#define access_ok(type,addr,size) (__range_ok((void __user *)(addr), (size)) == 0)
#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
-/*
- * The exception table consists of pairs of addresses: the first is the
- * address of an instruction that is allowed to fault, and the second is
- * the address at which the program should continue. No registers are
- * modified, so it is entirely up to the continuation code to figure out
- * what to do.
- *
- * All the routines below use bits of fixup code that are out of line
- * with the main instruction path. This means when everything is well,
- * we don't even have to jump over them. Further, they do not intrude
- * on our cache or tlb entries.
- */
-struct exception_table_entry
-{
- unsigned long insn, fixup;
-};
-
-/* Returns 0 if exception not found and fixup otherwise. */
-extern unsigned long search_exception_table(unsigned long);
-
/*
* These are the main single-value transfer routines. They automatically
@@ -314,6 +295,4 @@ extern long strnlen_user(const char __user *src, long count);
#define strlen_user(str) strnlen_user(str, 32767)
-extern unsigned long search_exception_table(unsigned long addr);
-
#endif /* _ASM_UACCESS_H */