Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *  Trap handling definitions.
0004  *
0005  *  Copyright (C) 2002, 2003  Maciej W. Rozycki
0006  */
0007 #ifndef _ASM_TRAPS_H
0008 #define _ASM_TRAPS_H
0009 
0010 /*
0011  * Possible status responses for a board_be_handler backend.
0012  */
0013 #define MIPS_BE_DISCARD 0       /* return with no action */
0014 #define MIPS_BE_FIXUP   1       /* return to the fixup code */
0015 #define MIPS_BE_FATAL   2       /* treat as an unrecoverable error */
0016 
0017 extern void (*board_be_init)(void);
0018 void mips_set_be_handler(int (*handler)(struct pt_regs *reg, int is_fixup));
0019 
0020 extern void (*board_nmi_handler_setup)(void);
0021 extern void (*board_ejtag_handler_setup)(void);
0022 extern void (*board_bind_eic_interrupt)(int irq, int regset);
0023 extern void (*board_ebase_setup)(void);
0024 extern void (*board_cache_error_setup)(void);
0025 
0026 extern int register_nmi_notifier(struct notifier_block *nb);
0027 extern void reserve_exception_space(phys_addr_t addr, unsigned long size);
0028 extern char except_vec_nmi[];
0029 
0030 #define VECTORSPACING 0x100 /* for EI/VI mode */
0031 
0032 #define nmi_notifier(fn, pri)                       \
0033 ({                                  \
0034     static struct notifier_block fn##_nb = {            \
0035         .notifier_call = fn,                    \
0036         .priority = pri                     \
0037     };                              \
0038                                     \
0039     register_nmi_notifier(&fn##_nb);                \
0040 })
0041 
0042 #endif /* _ASM_TRAPS_H */