xref: /kernel/linux/linux-5.10/arch/mips/mm/extable.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/mips/mm/
18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
38c2ecf20Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
48c2ecf20Sopenharmony_ci * for more details.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci#include <linux/extable.h>
98c2ecf20Sopenharmony_ci#include <linux/spinlock.h>
108c2ecf20Sopenharmony_ci#include <asm/branch.h>
118c2ecf20Sopenharmony_ci#include <linux/uaccess.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciint fixup_exception(struct pt_regs *regs)
148c2ecf20Sopenharmony_ci{
158c2ecf20Sopenharmony_ci	const struct exception_table_entry *fixup;
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci	fixup = search_exception_tables(exception_epc(regs));
188c2ecf20Sopenharmony_ci	if (fixup) {
198c2ecf20Sopenharmony_ci		regs->cp0_epc = fixup->nextinsn;
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci		return 1;
228c2ecf20Sopenharmony_ci	}
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	return 0;
258c2ecf20Sopenharmony_ci}
26

Indexes created Thu Nov 07 10:32:03 CST 2024