Skip to content

Commit 2e30960

Browse files
Jie Mengborkmann
authored andcommitted
bpf, x64: Remove unnecessary check on existence of SSE2
SSE2 and hence lfence are architectural in x86-64 and no need to check whether they're supported in CPU. SSE2's CPUID flag is still set to maintain backward compatibility with older code or code shared with x86, but bpf_jit_comp.c is compiled under x86-64 exclusively so the check is redundant. Signed-off-by: Jie Meng <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: KP Singh <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 1d2d941 commit 2e30960

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/net/bpf_jit_comp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,8 +1226,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image
12261226

12271227
/* speculation barrier */
12281228
case BPF_ST | BPF_NOSPEC:
1229-
if (boot_cpu_has(X86_FEATURE_XMM2))
1230-
EMIT_LFENCE();
1229+
EMIT_LFENCE();
12311230
break;
12321231

12331232
/* ST: *(u8*)(dst_reg + off) = imm */

0 commit comments

Comments
 (0)