]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
riscv: errata: Fix bitwise vs logical AND in MIPS errata patching
authorMichael Neuling <mikey@neuling.org>
Thu, 9 Apr 2026 09:11:39 +0000 (09:11 +0000)
committerPaul Walmsley <pjw@kernel.org>
Fri, 1 May 2026 02:00:14 +0000 (20:00 -0600)
commit4d2b03699460b8fd5df34408a03a84a1a7ff8aa1
tree706d19a573155d87f01d3428f5d6ecf518919a5a
parenta2e5b58811c7bb7d63f366f586cc7317f20e62e7
riscv: errata: Fix bitwise vs logical AND in MIPS errata patching

The condition checking whether a specific errata needs patching uses
logical AND (&&) instead of bitwise AND (&). Since logical AND only
checks that both operands are non-zero, this causes all errata patches
to be applied whenever any single errata is detected, rather than only
applying the matching one.

The SiFive errata implementation correctly uses bitwise AND for the same
check.

Fixes: 0b0ca959d206 ("riscv: errata: Fix the PAUSE Opcode for MIPS P8700")
Signed-off-by: Michael Neuling <mikey@neuling.org>
Assisted-by: Cursor:claude-4.6-opus-high-thinking
Link: https://patch.msgid.link/20260409091143.1348853-2-mikey@neuling.org
[pjw@kernel.org: fixed checkpatch warning]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/errata/mips/errata.c