unicore32 core architecture: mm related: fault handling
PATCH v2 7/11 unicore32 core architecture: mm related: fault handling
This patch implements fault handling of memory management.
Signed-off-by Guan Xuetao <[email protected]>
--- arch/unicore32/include/asm/mmu.h | 17 + arch/unicore32/include/asm/mmu_context.h | 87 +++++ arch/unicore32/include/asm/pgalloc.h | 110 ++++++ arch/unicore32/include/asm/pgtable-hwdef.h | 55 +++ arch/unicore32/include/asm/pgtable.h | 317 +++++++++++++++++ arch/unicore32/mm/alignment.c | 523 +++++++++++++++++++++++++++ arch/unicore32/mm/extable.c | 24 ++ arch/unicore32/mm/fault.c | 479 +++++++++++++++++++++++++ arch/unicore32/mm/mmu.c | 533 ++++++++++++++++++++++++++++ arch/unicore32/mm/pgd.c | 102 ++++++ 10 files changed, 2247 insertions(+), 0 deletions(-) create mode 100644 arch/unicore32/include/asm/mmu.h create mode 100644 arch/unicore32/include/asm/mmu_context.h create mode 100644 arch/unicore32/include/asm/pgalloc.h create mode 100644 arch/unicore32/include/asm/pgtable-hwdef.h create mode 100644 arch/unicore32/include/asm/pgtable.h create mode 100644 arch/unicore32/mm/alignment.c create mode 100644 arch/unicore32/mm/extable.c create mode 100644 arch/unicore32/mm/fault.c create mode 100644 arch/unicore32/mm/mmu.c create mode 100644 arch/unicore32/mm/pgd.c
arch/unicore32/include/asm/mmu.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* linux/arch/unicore32/include/asm/mmu.h +* +* 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. +*/ +#ifndef __UNICORE_MMU_H__ +#define __UNICORE_MMU_H__ + +typedef unsigned long mm_context_t ; + +#endif
arch/unicore32/include/asm/mmu_context.h new file +87 -0
87 lines not on this page · raw message
arch/unicore32/include/asm/pgalloc.h new file +110 -0
110 lines not on this page · raw message
arch/unicore32/include/asm/pgtable-hwdef.h new file +55 -0
55 lines not on this page · raw message
arch/unicore32/include/asm/pgtable.h new file +317 -0
317 lines not on this page · raw message
arch/unicore32/mm/alignment.c new file +523 -0
523 lines not on this page · raw message
arch/unicore32/mm/extable.c new file +24 -0
@@ -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 ; +}
arch/unicore32/mm/fault.c new file +479 -0
479 lines not on this page · raw message
arch/unicore32/mm/mmu.c new file +533 -0
533 lines not on this page · raw message
arch/unicore32/mm/pgd.c new file +102 -0
102 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Quoted 3 lines · Guan Xuetao
This patch implements fault handling of memory management.
Signed-off-by Guan Xuetao <[email protected]>
Reviewed-by Arnd Bergmann <[email protected]>