2019-05-27 08:55:01 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2005-04-16 15:20:36 -07:00
|
|
|
/*
|
|
|
|
* Trap handling definitions.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002, 2003 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
#ifndef _ASM_TRAPS_H
|
|
|
|
#define _ASM_TRAPS_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Possible status responses for a board_be_handler backend.
|
|
|
|
*/
|
2013-01-22 12:59:30 +01:00
|
|
|
#define MIPS_BE_DISCARD 0 /* return with no action */
|
2005-04-16 15:20:36 -07:00
|
|
|
#define MIPS_BE_FIXUP 1 /* return to the fixup code */
|
|
|
|
#define MIPS_BE_FATAL 2 /* treat as an unrecoverable error */
|
|
|
|
|
|
|
|
extern void (*board_be_init)(void);
|
2021-11-05 10:30:47 -07:00
|
|
|
void mips_set_be_handler(int (*handler)(struct pt_regs *reg, int is_fixup));
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-07-14 15:57:16 +00:00
|
|
|
extern void (*board_nmi_handler_setup)(void);
|
|
|
|
extern void (*board_ejtag_handler_setup)(void);
|
2008-04-26 01:55:30 +09:00
|
|
|
extern void (*board_bind_eic_interrupt)(int irq, int regset);
|
2011-11-16 01:25:45 +00:00
|
|
|
extern void (*board_ebase_setup)(void);
|
2012-05-15 00:04:46 -07:00
|
|
|
extern void (*board_cache_error_setup)(void);
|
2005-07-14 15:57:16 +00:00
|
|
|
|
2011-11-16 01:25:44 +00:00
|
|
|
extern int register_nmi_notifier(struct notifier_block *nb);
|
2021-03-08 10:24:47 +01:00
|
|
|
extern void reserve_exception_space(phys_addr_t addr, unsigned long size);
|
2021-01-07 11:06:45 +08:00
|
|
|
extern char except_vec_nmi[];
|
2011-11-16 01:25:44 +00:00
|
|
|
|
2021-03-08 10:24:47 +01:00
|
|
|
#define VECTORSPACING 0x100 /* for EI/VI mode */
|
|
|
|
|
2011-11-16 01:25:44 +00:00
|
|
|
#define nmi_notifier(fn, pri) \
|
|
|
|
({ \
|
|
|
|
static struct notifier_block fn##_nb = { \
|
|
|
|
.notifier_call = fn, \
|
|
|
|
.priority = pri \
|
|
|
|
}; \
|
|
|
|
\
|
|
|
|
register_nmi_notifier(&fn##_nb); \
|
|
|
|
})
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#endif /* _ASM_TRAPS_H */
|