diff options
author | Greentime Hu <greentime@andestech.com> | 2017-10-24 15:25:00 +0800 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-02-22 10:44:31 +0800 |
commit | 664eec400bf8f3ab4d41279d6fb674a66ff3ba94 (patch) | |
tree | ed442dae871d6d2d07a2cbe4177c88cf624dc58a /arch/nds32/mm/extable.c | |
parent | 59fd53cd5ca0a6930accf53db34cbeef8fcbc195 (diff) | |
download | linux-664eec400bf8f3ab4d41279d6fb674a66ff3ba94.tar.gz linux-664eec400bf8f3ab4d41279d6fb674a66ff3ba94.tar.bz2 linux-664eec400bf8f3ab4d41279d6fb674a66ff3ba94.zip |
nds32: MMU fault handling and page table management
This patch includes page fault handler, mmap and fixup implementations.
Signed-off-by: Vincent Chen <vincentc@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/nds32/mm/extable.c')
-rw-r--r-- | arch/nds32/mm/extable.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/nds32/mm/extable.c b/arch/nds32/mm/extable.c new file mode 100644 index 000000000000..db7f0a7c8966 --- /dev/null +++ b/arch/nds32/mm/extable.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (C) 2005-2017 Andes Technology Corporation + +#include <linux/extable.h> +#include <linux/uaccess.h> + +int fixup_exception(struct pt_regs *regs) +{ + const struct exception_table_entry *fixup; + + fixup = search_exception_tables(instruction_pointer(regs)); + if (fixup) + regs->ipc = fixup->fixup; + + return fixup != NULL; +} |