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

TOMOYO Linux Cross Reference
Linux/arch/sparc/net/bpf_jit_32.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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 _BPF_JIT_H
  3 #define _BPF_JIT_H
  4 
  5 /* Conventions:
  6  *  %g1 : temporary
  7  *  %g2 : Secondary temporary used by SKB data helper stubs.
  8  *  %g3 : packet offset passed into SKB data helper stubs.
  9  *  %o0 : pointer to skb (first argument given to JIT function)
 10  *  %o1 : BPF A accumulator
 11  *  %o2 : BPF X accumulator
 12  *  %o3 : Holds saved %o7 so we can call helper functions without needing
 13  *        to allocate a register window.
 14  *  %o4 : skb->len - skb->data_len
 15  *  %o5 : skb->data
 16  */
 17 
 18 #ifndef __ASSEMBLER__
 19 #define G0              0x00
 20 #define G1              0x01
 21 #define G3              0x03
 22 #define G6              0x06
 23 #define O0              0x08
 24 #define O1              0x09
 25 #define O2              0x0a
 26 #define O3              0x0b
 27 #define O4              0x0c
 28 #define O5              0x0d
 29 #define SP              0x0e
 30 #define O7              0x0f
 31 #define FP              0x1e
 32 
 33 #define r_SKB           O0
 34 #define r_A             O1
 35 #define r_X             O2
 36 #define r_saved_O7      O3
 37 #define r_HEADLEN       O4
 38 #define r_SKB_DATA      O5
 39 #define r_TMP           G1
 40 #define r_TMP2          G2
 41 #define r_OFF           G3
 42 
 43 /* assembly code in arch/sparc/net/bpf_jit_asm_32.S */
 44 extern u32 bpf_jit_load_word[];
 45 extern u32 bpf_jit_load_half[];
 46 extern u32 bpf_jit_load_byte[];
 47 extern u32 bpf_jit_load_byte_msh[];
 48 extern u32 bpf_jit_load_word_positive_offset[];
 49 extern u32 bpf_jit_load_half_positive_offset[];
 50 extern u32 bpf_jit_load_byte_positive_offset[];
 51 extern u32 bpf_jit_load_byte_msh_positive_offset[];
 52 extern u32 bpf_jit_load_word_negative_offset[];
 53 extern u32 bpf_jit_load_half_negative_offset[];
 54 extern u32 bpf_jit_load_byte_negative_offset[];
 55 extern u32 bpf_jit_load_byte_msh_negative_offset[];
 56 
 57 #else
 58 #define r_SKB           %o0
 59 #define r_A             %o1
 60 #define r_X             %o2
 61 #define r_saved_O7      %o3
 62 #define r_HEADLEN       %o4
 63 #define r_SKB_DATA      %o5
 64 #define r_TMP           %g1
 65 #define r_TMP2          %g2
 66 #define r_OFF           %g3
 67 #endif
 68 
 69 #endif /* _BPF_JIT_H */
 70 

~ [ 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