1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef _ASM_MICROBLAZE_EXCEPTIONS_H
- #define _ASM_MICROBLAZE_EXCEPTIONS_H
- #ifdef __KERNEL__
- #ifndef CONFIG_MMU
- #define EX_HANDLER_STACK_SIZ (4*19)
- #endif
- #ifndef __ASSEMBLY__
- #define HWEX_MSR_BIT (1 << 8)
- #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
- #define __enable_hw_exceptions() \
- __asm__ __volatile__ (" msrset r0, %0; \
- nop;" \
- : \
- : "i" (HWEX_MSR_BIT) \
- : "memory")
- #define __disable_hw_exceptions() \
- __asm__ __volatile__ (" msrclr r0, %0; \
- nop;" \
- : \
- : "i" (HWEX_MSR_BIT) \
- : "memory")
- #else
- #define __enable_hw_exceptions() \
- __asm__ __volatile__ (" \
- mfs r12, rmsr; \
- nop; \
- ori r12, r12, %0; \
- mts rmsr, r12; \
- nop;" \
- : \
- : "i" (HWEX_MSR_BIT) \
- : "memory", "r12")
- #define __disable_hw_exceptions() \
- __asm__ __volatile__ (" \
- mfs r12, rmsr; \
- nop; \
- andi r12, r12, ~%0; \
- mts rmsr, r12; \
- nop;" \
- : \
- : "i" (HWEX_MSR_BIT) \
- : "memory", "r12")
- #endif
- asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
- int fsr, int addr);
- asmlinkage void sw_exception(struct pt_regs *regs);
- void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
- void die(const char *str, struct pt_regs *fp, long err);
- void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
- #endif
- #endif
- #endif
|