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

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/asm-extable.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __ASM_EXTABLE_H
  3 #define __ASM_EXTABLE_H
  4 
  5 #include <linux/stringify.h>
  6 #include <linux/bits.h>
  7 #include <asm/asm-const.h>
  8 
  9 #define EX_TYPE_NONE            0
 10 #define EX_TYPE_FIXUP           1
 11 #define EX_TYPE_BPF             2
 12 #define EX_TYPE_UA_STORE        3
 13 #define EX_TYPE_UA_LOAD_MEM     4
 14 #define EX_TYPE_UA_LOAD_REG     5
 15 #define EX_TYPE_UA_LOAD_REGPAIR 6
 16 #define EX_TYPE_ZEROPAD         7
 17 
 18 #define EX_DATA_REG_ERR_SHIFT   0
 19 #define EX_DATA_REG_ERR         GENMASK(3, 0)
 20 
 21 #define EX_DATA_REG_ADDR_SHIFT  4
 22 #define EX_DATA_REG_ADDR        GENMASK(7, 4)
 23 
 24 #define EX_DATA_LEN_SHIFT       8
 25 #define EX_DATA_LEN             GENMASK(11, 8)
 26 
 27 #define __EX_TABLE(_section, _fault, _target, _type, _regerr, _regaddr, _len)   \
 28         stringify_in_c(.section _section,"a";)                                  \
 29         stringify_in_c(.balign  4;)                                             \
 30         stringify_in_c(.long    (_fault) - .;)                                  \
 31         stringify_in_c(.long    (_target) - .;)                                 \
 32         stringify_in_c(.short   (_type);)                                       \
 33         stringify_in_c(.macro   extable_reg regerr, regaddr;)                   \
 34         stringify_in_c(.set     .Lfound, 0;)                                    \
 35         stringify_in_c(.set     .Lcurr, 0;)                                     \
 36         stringify_in_c(.irp     rs,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;)      \
 37         stringify_in_c(         .ifc    "\regerr", "%%r\rs";)                   \
 38         stringify_in_c(                 .set    .Lfound, 1;)                    \
 39         stringify_in_c(                 .set    .Lregerr, .Lcurr;)              \
 40         stringify_in_c(         .endif;)                                        \
 41         stringify_in_c(         .set    .Lcurr, .Lcurr+1;)                      \
 42         stringify_in_c(.endr;)                                                  \
 43         stringify_in_c(.ifne    (.Lfound != 1);)                                \
 44         stringify_in_c(         .error  "extable_reg: bad register argument1";) \
 45         stringify_in_c(.endif;)                                                 \
 46         stringify_in_c(.set     .Lfound, 0;)                                    \
 47         stringify_in_c(.set     .Lcurr, 0;)                                     \
 48         stringify_in_c(.irp     rs,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;)      \
 49         stringify_in_c(         .ifc    "\regaddr", "%%r\rs";)                  \
 50         stringify_in_c(                 .set    .Lfound, 1;)                    \
 51         stringify_in_c(                 .set    .Lregaddr, .Lcurr;)             \
 52         stringify_in_c(         .endif;)                                        \
 53         stringify_in_c(         .set    .Lcurr, .Lcurr+1;)                      \
 54         stringify_in_c(.endr;)                                                  \
 55         stringify_in_c(.ifne    (.Lfound != 1);)                                \
 56         stringify_in_c(         .error  "extable_reg: bad register argument2";) \
 57         stringify_in_c(.endif;)                                                 \
 58         stringify_in_c(.short   .Lregerr << EX_DATA_REG_ERR_SHIFT |             \
 59                                 .Lregaddr << EX_DATA_REG_ADDR_SHIFT |           \
 60                                 _len << EX_DATA_LEN_SHIFT;)                     \
 61         stringify_in_c(.endm;)                                                  \
 62         stringify_in_c(extable_reg _regerr,_regaddr;)                           \
 63         stringify_in_c(.purgem  extable_reg;)                                   \
 64         stringify_in_c(.previous)
 65 
 66 #define EX_TABLE(_fault, _target)                                       \
 67         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
 68 
 69 #define EX_TABLE_AMODE31(_fault, _target)                               \
 70         __EX_TABLE(.amode31.ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
 71 
 72 #define EX_TABLE_UA_STORE(_fault, _target, _regerr)                     \
 73         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_STORE, _regerr, _regerr, 0)
 74 
 75 #define EX_TABLE_UA_LOAD_MEM(_fault, _target, _regerr, _regmem, _len)   \
 76         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_MEM, _regerr, _regmem, _len)
 77 
 78 #define EX_TABLE_UA_LOAD_REG(_fault, _target, _regerr, _regzero)        \
 79         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REG, _regerr, _regzero, 0)
 80 
 81 #define EX_TABLE_UA_LOAD_REGPAIR(_fault, _target, _regerr, _regzero)    \
 82         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REGPAIR, _regerr, _regzero, 0)
 83 
 84 #define EX_TABLE_ZEROPAD(_fault, _target, _regdata, _regaddr)           \
 85         __EX_TABLE(__ex_table, _fault, _target, EX_TYPE_ZEROPAD, _regdata, _regaddr, 0)
 86 
 87 #endif /* __ASM_EXTABLE_H */
 88 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php