summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZongmin Zhou <zhouzongmin@kylinos.cn>2026-10-05 19:02:37 -0600
committerPaul Walmsley <pjw@kernel.org>2026-10-05 19:02:37 -0600
commitedba6017c19f97ecc718fad6b50e0908392247ac (patch)
tree8c8f3acde989162e769e97a294d1e954d72d658a /arch
parenta90ee4305c4a5df72c11b31dacfdc76e00fcf78a (diff)
riscv: hwprobe: use _BITULL() rather than BIT() in MIPS vendor uapi header
BIT() is a kernel-internal macro that is not available to userspace, but the MIPS vendor extension uapi header uses it without defining or including it. Any userspace program that includes this header and uses RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL fails to build. Use _BITULL(0) from linux/const.h instead, which keeps the value at 1, so there is no ABI change. Fixes: bb4b0f8a1bcb ("riscv: hwprobe: Add MIPS vendor extension probing") Cc: stable@vger.kernel.org Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Reviewed-by: Jesse Taube <jtaubepe@redhat.com> Link: https://patch.msgid.link/20260918073650.42586-1-min_halo@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/uapi/asm/vendor/mips.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/include/uapi/asm/vendor/mips.h b/arch/riscv/include/uapi/asm/vendor/mips.h
index e65ab268b265..a31c23afe74f 100644
--- a/arch/riscv/include/uapi/asm/vendor/mips.h
+++ b/arch/riscv/include/uapi/asm/vendor/mips.h
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL BIT(0)
+#include <linux/const.h>
+
+#define RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL _BITULL(0)