From: Paul Walmsley <pjw@kernel.org>
To: Yunhui Cui <cuiyunhui@bytedance.com>
Cc: aou@eecs.berkeley.edu, alex@ghiti.fr, andybnac@gmail.com,
apatel@ventanamicro.com, ast@kernel.org,
ben.dooks@codethink.co.uk, bjorn@kernel.org,
bpf@vger.kernel.org, charlie@rivosinc.com, cl@gentwo.org,
conor.dooley@microchip.com, cyrilbur@tenstorrent.com,
daniel@iogearbox.net, debug@rivosinc.com, dennis@kernel.org,
eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com,
jolsa@kernel.org, kpsingh@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-riscv@lists.infradead.org, linux@rasmusvillemoes.dk,
martin.lau@linux.dev, palmer@dabbelt.com, pjw@kernel.org,
puranjay@kernel.org, pulehui@huawei.com, ruanjinjie@huawei.com,
rkrcmar@ventanamicro.com, samuel.holland@sifive.com,
sdf@fomichev.me, song@kernel.org, tglx@linutronix.de,
tj@kernel.org, thuth@redhat.com, yonghong.song@linux.dev,
yury.norov@gmail.com, zong.li@sifive.com
Subject: Re: [PATCH v3 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h
Date: Wed, 7 Jan 2026 15:34:48 -0700 (MST) [thread overview]
Message-ID: <bb259f36-6a5a-1bb8-75de-9bb62ade44a8@kernel.org> (raw)
In-Reply-To: <20251216014721.42262-2-cuiyunhui@bytedance.com>
On Tue, 16 Dec 2025, Yunhui Cui wrote:
> The arch/riscv/include/asm/bitops.h does not functionally require
> including /linux/irqflags.h. Additionally, adding
> arch/riscv/include/asm/percpu.h causes a circular inclusion:
> kernel/bounds.c
> ->include/linux/log2.h
> ->include/linux/bitops.h
> ->arch/riscv/include/asm/bitops.h
> ->include/linux/irqflags.h
> ->include/linux/find.h
> ->return val ? __ffs(val) : size;
> ->arch/riscv/include/asm/bitops.h
>
> The compilation log is as follows:
> CC kernel/bounds.s
> In file included from ./include/linux/bitmap.h:11,
> from ./include/linux/cpumask.h:12,
> from ./arch/riscv/include/asm/processor.h:55,
> from ./arch/riscv/include/asm/thread_info.h:42,
> from ./include/linux/thread_info.h:60,
> from ./include/asm-generic/preempt.h:5,
> from ./arch/riscv/include/generated/asm/preempt.h:1,
> from ./include/linux/preempt.h:79,
> from ./arch/riscv/include/asm/percpu.h:8,
> from ./include/linux/irqflags.h:19,
> from ./arch/riscv/include/asm/bitops.h:14,
> from ./include/linux/bitops.h:68,
> from ./include/linux/log2.h:12,
> from kernel/bounds.c:13:
> ./include/linux/find.h: In function 'find_next_bit':
> ./include/linux/find.h:66:30: error: implicit declaration of function '__ffs' [-Wimplicit-function-declaration]
> 66 | return val ? __ffs(val) : size;
> | ^~~~~
>
> Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com>
Thanks, queued this patch for v6.19-rc.
- Paul
WARNING: multiple messages have this Message-ID (diff)
From: Paul Walmsley <pjw@kernel.org>
To: Yunhui Cui <cuiyunhui@bytedance.com>
Cc: aou@eecs.berkeley.edu, alex@ghiti.fr, andybnac@gmail.com,
apatel@ventanamicro.com, ast@kernel.org,
ben.dooks@codethink.co.uk, bjorn@kernel.org,
bpf@vger.kernel.org, charlie@rivosinc.com, cl@gentwo.org,
conor.dooley@microchip.com, cyrilbur@tenstorrent.com,
daniel@iogearbox.net, debug@rivosinc.com, dennis@kernel.org,
eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com,
jolsa@kernel.org, kpsingh@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-riscv@lists.infradead.org, linux@rasmusvillemoes.dk,
martin.lau@linux.dev, palmer@dabbelt.com, pjw@kernel.org,
puranjay@kernel.org, pulehui@huawei.com, ruanjinjie@huawei.com,
rkrcmar@ventanamicro.com, samuel.holland@sifive.com,
sdf@fomichev.me, song@kernel.org, tglx@linutronix.de,
tj@kernel.org, thuth@redhat.com, yonghong.song@linux.dev,
yury.norov@gmail.com, zong.li@sifive.com
Subject: Re: [PATCH v3 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h
Date: Wed, 7 Jan 2026 15:34:48 -0700 (MST) [thread overview]
Message-ID: <bb259f36-6a5a-1bb8-75de-9bb62ade44a8@kernel.org> (raw)
In-Reply-To: <20251216014721.42262-2-cuiyunhui@bytedance.com>
On Tue, 16 Dec 2025, Yunhui Cui wrote:
> The arch/riscv/include/asm/bitops.h does not functionally require
> including /linux/irqflags.h. Additionally, adding
> arch/riscv/include/asm/percpu.h causes a circular inclusion:
> kernel/bounds.c
> ->include/linux/log2.h
> ->include/linux/bitops.h
> ->arch/riscv/include/asm/bitops.h
> ->include/linux/irqflags.h
> ->include/linux/find.h
> ->return val ? __ffs(val) : size;
> ->arch/riscv/include/asm/bitops.h
>
> The compilation log is as follows:
> CC kernel/bounds.s
> In file included from ./include/linux/bitmap.h:11,
> from ./include/linux/cpumask.h:12,
> from ./arch/riscv/include/asm/processor.h:55,
> from ./arch/riscv/include/asm/thread_info.h:42,
> from ./include/linux/thread_info.h:60,
> from ./include/asm-generic/preempt.h:5,
> from ./arch/riscv/include/generated/asm/preempt.h:1,
> from ./include/linux/preempt.h:79,
> from ./arch/riscv/include/asm/percpu.h:8,
> from ./include/linux/irqflags.h:19,
> from ./arch/riscv/include/asm/bitops.h:14,
> from ./include/linux/bitops.h:68,
> from ./include/linux/log2.h:12,
> from kernel/bounds.c:13:
> ./include/linux/find.h: In function 'find_next_bit':
> ./include/linux/find.h:66:30: error: implicit declaration of function '__ffs' [-Wimplicit-function-declaration]
> 66 | return val ? __ffs(val) : size;
> | ^~~~~
>
> Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com>
Thanks, queued this patch for v6.19-rc.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-01-07 22:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 1:47 [PATCH v3 0/3] RISC-V: add percpu.h to include/asm Yunhui Cui
2025-12-16 1:47 ` Yunhui Cui
2025-12-16 1:47 ` [PATCH v3 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h Yunhui Cui
2025-12-16 1:47 ` Yunhui Cui
2025-12-16 17:39 ` Yury Norov
2025-12-16 17:39 ` Yury Norov
2026-01-07 22:34 ` Paul Walmsley [this message]
2026-01-07 22:34 ` Paul Walmsley
2025-12-16 1:47 ` [PATCH v3 2/3] riscv: introduce percpu.h into include/asm Yunhui Cui
2025-12-16 1:47 ` Yunhui Cui
2025-12-20 14:45 ` kernel test robot
2025-12-20 14:45 ` kernel test robot
2025-12-20 16:31 ` kernel test robot
2025-12-20 16:31 ` kernel test robot
2025-12-16 1:47 ` [PATCH v3 3/3] riscv: store percpu offset into thread_info Yunhui Cui
2025-12-16 1:47 ` Yunhui Cui
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=bb259f36-6a5a-1bb8-75de-9bb62ade44a8@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=andybnac@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=ast@kernel.org \
--cc=ben.dooks@codethink.co.uk \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=charlie@rivosinc.com \
--cc=cl@gentwo.org \
--cc=conor.dooley@microchip.com \
--cc=cuiyunhui@bytedance.com \
--cc=cyrilbur@tenstorrent.com \
--cc=daniel@iogearbox.net \
--cc=debug@rivosinc.com \
--cc=dennis@kernel.org \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rasmusvillemoes.dk \
--cc=martin.lau@linux.dev \
--cc=palmer@dabbelt.com \
--cc=pulehui@huawei.com \
--cc=puranjay@kernel.org \
--cc=rkrcmar@ventanamicro.com \
--cc=ruanjinjie@huawei.com \
--cc=samuel.holland@sifive.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=tj@kernel.org \
--cc=yonghong.song@linux.dev \
--cc=yury.norov@gmail.com \
--cc=zong.li@sifive.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.