mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zongmin Zhou <min_halo@163.com>
To: jtaubepe@redhat.com
Cc: alex@ghiti.fr, aou@eecs.berkeley.edu--cc=palmer@dabbelt.com,
	pjw@kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Zongmin Zhou <zhouzongmin@kylinos.cn>,
	stable@vger.kernel.org
Subject: [PATCH v2] riscv: hwprobe: use _BITULL() rather than BIT() in MIPS vendor uapi header
Date: Fri, 18 Sep 2026 15:36:50 +0800	[thread overview]
Message-ID: <20260918073650.42586-1-min_halo@163.com> (raw)
In-Reply-To: <CADRr4beOuFxa4A+CCLC8MFAALKBUptLaVANvDb6ZS42m_UMrbQ@mail.gmail.com>

From: Zongmin Zhou <zhouzongmin@kylinos.cn>

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>
---
Changes in v2:
- Add Cc: stable@vger.kernel.org as suggested by Jesse Taube.
- Collect Reviewed-by from Jesse Taube (no code changes).

 arch/riscv/include/uapi/asm/vendor/mips.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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)
-- 
2.34.1


No virus found
		Checked by Hillstone Network AntiVirus


  reply	other threads:[~2026-09-18  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17  6:23 [PATCH] " Zongmin Zhou
2026-09-17 13:00 ` Jesse Taube
2026-09-18  7:36   ` Zongmin Zhou [this message]
2026-09-19  0:47 ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260918073650.42586-1-min_halo@163.com \
    --to=min_halo@163.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu--cc=palmer \
    --cc=jtaubepe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®