Skip to content

Commit c426810

Browse files
chleroympe
authored andcommitted
powerpc/bpf: Change values of SEEN_ flags
Because PPC32 will use more non volatile registers, move SEEN_ flags to positions 0-2 which corresponds to special registers. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/608faa1dc3ecfead649e15392abd07b00313d2ba.1616430991.git.christophe.leroy@csgroup.eu
1 parent 4ea76e9 commit c426810

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/powerpc/net/bpf_jit.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,18 @@ static inline bool is_nearbranch(int offset)
108108
#define COND_LT (CR0_LT | COND_CMP_TRUE)
109109
#define COND_LE (CR0_GT | COND_CMP_FALSE)
110110

111-
#define SEEN_FUNC 0x1000 /* might call external helpers */
112-
#define SEEN_STACK 0x2000 /* uses BPF stack */
113-
#define SEEN_TAILCALL 0x4000 /* uses tail calls */
111+
#define SEEN_FUNC 0x20000000 /* might call external helpers */
112+
#define SEEN_STACK 0x40000000 /* uses BPF stack */
113+
#define SEEN_TAILCALL 0x80000000 /* uses tail calls */
114114

115115
struct codegen_context {
116116
/*
117117
* This is used to track register usage as well
118118
* as calls to external helpers.
119119
* - register usage is tracked with corresponding
120-
* bits (r3-r10 and r27-r31)
120+
* bits (r3-r31)
121121
* - rest of the bits can be used to track other
122-
* things -- for now, we use bits 16 to 23
122+
* things -- for now, we use bits 0 to 2
123123
* encoded in SEEN_* macros above
124124
*/
125125
unsigned int seen;

0 commit comments

Comments
 (0)