From: Karl Mehltretter <kmehltretter@gmail.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Andreas Larsson <andreas@gaisler.com>,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc/iommu: Use raw_cpu_read() for iommu_hash_common in iommu_tbl_range_alloc()
Date: Sun, 8 Nov 2026 02:35:49 +0100 [thread overview]
Message-ID: <au_RHuVI6noT1W0X@gmail.com> (raw)
In-Reply-To: <155ec5c6c5f6d4287a420191cb3927eba1d97526.camel@physik.fu-berlin.de>
On Sat, Nov 07, 2026 at 10:13:51PM +0100, John Paul Adrian Glaubitz wrote:
> On Sat, 2026-11-07 at 20:51 +0100, Karl Mehltretter wrote:
> > Fixes: ff7d37a50202 ("Break up monolithic iommu table/lock into finer graularity pools and lock")
> > Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> > ---
> > Assisted by an LLM.
> >
> > Tested on v7.4-rc1 (d48723711bae) under QEMU sparc64 (sun4u, -smp 2)
> > with PREEMPT and DEBUG_PREEMPT. Without this patch, two consecutive
> > boots emit three "BUG: using __this_cpu_read() in preemptible
> > [00000000] code: swapper/0/1" diagnostics in iommu_tbl_range_alloc().
> > With this patch, two consecutive boots complete without the
> > __this_cpu_read() preemption diagnostic.
>
> According to your Fixes tag, this bug was introduced in 2015. However,
> I have to admit I have never seen this message, neither on sun4u nor
> on sun4v machines.
>
> Is there a reliable way to reproduce this bug?
>
Hi Adrian,
Yes. It needs PREEMPT=y and DEBUG_PREEMPT=y. Debian's sparc64 kernel
uses PREEMPT_VOLUNTARY, so a kernel built from that config cannot
print it.
sparc64_defconfig with PREEMPT, DEBUG_PREEMPT and lockdep, booted with
qemu-system-sparc64 -M sun4u -m 512 -nographic -no-reboot \
-kernel arch/sparc/boot/image \
-append "console=ttyS0 loglevel=7 panic=-1"
prints three reports on every boot, from the pata_cmd64x and sunhme
probes.
Danish Khateeb saw the same reports:
https://lore.kernel.org/r/20260923144909.414968-1-danishkhateeb03@gmail.com/
It is only a warning. The per-CPU value only picks the first pool to
try, and each pool has its own lock.
Thanks,
Karl
prev parent reply other threads:[~2026-11-08 1:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 19:51 [PATCH] sparc/iommu: Use raw_cpu_read() for iommu_hash_common in iommu_tbl_range_alloc() Karl Mehltretter
2026-11-07 21:13 ` John Paul Adrian Glaubitz
2026-11-08 1:35 ` Karl Mehltretter [this message]
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=au_RHuVI6noT1W0X@gmail.com \
--to=kmehltretter@gmail.com \
--cc=andreas@gaisler.com \
--cc=davem@davemloft.net \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
/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.