mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 19:45:06 +08:00
09cfefb7fa
Add memory management support for LoongArch, including: cache and tlb management, page fault handling and ioremap/mmap support. Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
23 lines
437 B
C
23 lines
437 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
|
*/
|
|
#include <linux/extable.h>
|
|
#include <linux/spinlock.h>
|
|
#include <asm/branch.h>
|
|
#include <linux/uaccess.h>
|
|
|
|
int fixup_exception(struct pt_regs *regs)
|
|
{
|
|
const struct exception_table_entry *fixup;
|
|
|
|
fixup = search_exception_tables(exception_era(regs));
|
|
if (fixup) {
|
|
regs->csr_era = fixup->fixup;
|
|
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|