~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/microblaze/include/asm/exceptions.h

Version: ~ [ linux-5.6-rc3 ] ~ [ linux-5.5.7 ] ~ [ linux-5.4.23 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.107 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.172 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.215 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.215 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.82 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Preliminary support for HW exception handing for Microblaze
  3  *
  4  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
  5  * Copyright (C) 2008-2009 PetaLogix
  6  * Copyright (C) 2005 John Williams <jwilliams@itee.uq.edu.au>
  7  *
  8  * This file is subject to the terms and conditions of the GNU General
  9  * Public License. See the file COPYING in the main directory of this
 10  * archive for more details.
 11  */
 12 
 13 #ifndef _ASM_MICROBLAZE_EXCEPTIONS_H
 14 #define _ASM_MICROBLAZE_EXCEPTIONS_H
 15 
 16 #ifdef __KERNEL__
 17 
 18 #ifndef CONFIG_MMU
 19 #define EX_HANDLER_STACK_SIZ    (4*19)
 20 #endif
 21 
 22 #ifndef __ASSEMBLY__
 23 
 24 /* Macros to enable and disable HW exceptions in the MSR */
 25 /* Define MSR enable bit for HW exceptions */
 26 #define HWEX_MSR_BIT (1 << 8)
 27 
 28 #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 29 #define __enable_hw_exceptions()                                        \
 30         __asm__ __volatile__ (" msrset  r0, %0;                         \
 31                                 nop;"                                   \
 32                                 :                                       \
 33                                 : "i" (HWEX_MSR_BIT)                    \
 34                                 : "memory")
 35 
 36 #define __disable_hw_exceptions()                                       \
 37         __asm__ __volatile__ (" msrclr r0, %0;                          \
 38                                 nop;"                                   \
 39                                 :                                       \
 40                                 : "i" (HWEX_MSR_BIT)                    \
 41                                 : "memory")
 42 #else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
 43 #define __enable_hw_exceptions()                                        \
 44         __asm__ __volatile__ ("                                         \
 45                                 mfs     r12, rmsr;                      \
 46                                 nop;                                    \
 47                                 ori     r12, r12, %0;                   \
 48                                 mts     rmsr, r12;                      \
 49                                 nop;"                                   \
 50                                 :                                       \
 51                                 : "i" (HWEX_MSR_BIT)                    \
 52                                 : "memory", "r12")
 53 
 54 #define __disable_hw_exceptions()                                       \
 55         __asm__ __volatile__ ("                                         \
 56                                 mfs     r12, rmsr;                      \
 57                                 nop;                                    \
 58                                 andi    r12, r12, ~%0;                  \
 59                                 mts     rmsr, r12;                      \
 60                                 nop;"                                   \
 61                                 :                                       \
 62                                 : "i" (HWEX_MSR_BIT)                    \
 63                                 : "memory", "r12")
 64 #endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
 65 
 66 asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
 67                                                         int fsr, int addr);
 68 
 69 asmlinkage void sw_exception(struct pt_regs *regs);
 70 void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
 71 
 72 void die(const char *str, struct pt_regs *fp, long err);
 73 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
 74 
 75 #endif /*__ASSEMBLY__ */
 76 #endif /* __KERNEL__ */
 77 #endif /* _ASM_MICROBLAZE_EXCEPTIONS_H */
 78 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp