Commit 35622da7 authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Greg Kroah-Hartman

MIPS: BPF: Avoid unreachable code on little endian

commit faa9724a upstream.

On little endian, avoid generating the big endian version of the code
by using #else in addition to #ifdef #endif. Also fix one alignment
issue wrt delay slot.
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Reviewed-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11097/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 649f2beb
......@@ -151,9 +151,10 @@ NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
wsbh t0, $r_s0
jr $r_ra
rotr $r_A, t0, 16
#endif
#else
jr $r_ra
move $r_A, $r_s0
move $r_A, $r_s0
#endif
END(bpf_slow_path_word)
......@@ -162,9 +163,10 @@ NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
jr $r_ra
wsbh $r_A, $r_s0
#endif
#else
jr $r_ra
move $r_A, $r_s0
#endif
END(bpf_slow_path_half)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment