Path: blob/master/arch/riscv/errata/sifive/errata_cip_453.S
26490 views
/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) 2021 SiFive3*/45#include <linux/linkage.h>6#include <asm/asm.h>7#include <asm/asm-offsets.h>8#include <asm/alternative.h>910.macro ADD_SIGN_EXT pt_reg badaddr tmp_reg11REG_L \badaddr, PT_BADADDR(\pt_reg)12li \tmp_reg,113slli \tmp_reg,\tmp_reg,0x2614and \tmp_reg,\tmp_reg,\badaddr15beqz \tmp_reg, 1f16li \tmp_reg,-117slli \tmp_reg,\tmp_reg,0x2718or \badaddr,\tmp_reg,\badaddr19REG_S \badaddr, PT_BADADDR(\pt_reg)201:21.endm2223SYM_FUNC_START(sifive_cip_453_page_fault_trp)24ADD_SIGN_EXT a0, t0, t125#ifdef CONFIG_MMU26la t0, do_page_fault27#else28la t0, do_trap_unknown29#endif30jr t031SYM_FUNC_END(sifive_cip_453_page_fault_trp)3233SYM_FUNC_START(sifive_cip_453_insn_fault_trp)34ADD_SIGN_EXT a0, t0, t135la t0, do_trap_insn_fault36jr t037SYM_FUNC_END(sifive_cip_453_insn_fault_trp)383940