diff options
author | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-01-15 13:17:56 +0300 |
---|---|---|
committer | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-03-17 04:19:09 +0300 |
commit | 56372b0b2f533c9a25bd40a0577405f6ddb7cff2 (patch) | |
tree | c428578bf7392232e946756cfe12e9144122c212 /arch/unicore32/mm/extable.c | |
parent | b50f1704e9c441c58cf6dc05e72953ca30e1d4d2 (diff) | |
download | linux-56372b0b2f533c9a25bd40a0577405f6ddb7cff2.tar.xz |
unicore32 core architecture: mm related: fault handling
This patch implements fault handling of memory management.
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/unicore32/mm/extable.c')
-rw-r--r-- | arch/unicore32/mm/extable.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/unicore32/mm/extable.c b/arch/unicore32/mm/extable.c new file mode 100644 index 000000000000..6564180eb285 --- /dev/null +++ b/arch/unicore32/mm/extable.c @@ -0,0 +1,24 @@ +/* + * linux/arch/unicore32/mm/extable.c + * + * Code specific to PKUnity SoC and UniCore ISA + * + * Copyright (C) 2001-2010 GUAN Xue-tao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include <linux/module.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->UCreg_pc = fixup->fixup; + + return fixup != NULL; +} |