xref: /kernel/linux/linux-6.6/arch/mips/mm/extable.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/arch/mips/mm/
162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
362306a36Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
462306a36Sopenharmony_ci * for more details.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci#include <linux/extable.h>
962306a36Sopenharmony_ci#include <linux/spinlock.h>
1062306a36Sopenharmony_ci#include <asm/branch.h>
1162306a36Sopenharmony_ci#include <linux/uaccess.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciint fixup_exception(struct pt_regs *regs)
1462306a36Sopenharmony_ci{
1562306a36Sopenharmony_ci	const struct exception_table_entry *fixup;
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci	fixup = search_exception_tables(exception_epc(regs));
1862306a36Sopenharmony_ci	if (fixup) {
1962306a36Sopenharmony_ci		regs->cp0_epc = fixup->nextinsn;
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci		return 1;
2262306a36Sopenharmony_ci	}
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci	return 0;
2562306a36Sopenharmony_ci}
26

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