From: Tom Rini <trini@konsulko.com>
To: Rasmus Villemoes <ravi@prevas.dk>
Cc: u-boot@lists.denx.de,
Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
Joe Hershberger <joe.hershberger@ni.com>
Subject: Re: [PATCH 0/4] list.h/treewide: get rid of no-op prefetch()
Date: Sun, 25 May 2025 17:02:01 -0600 [thread overview]
Message-ID: <20250525230201.GS100073@bill-the-cat> (raw)
In-Reply-To: <87r00c3143.fsf@prevas.dk>
[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]
On Sun, May 25, 2025 at 10:07:56PM +0200, Rasmus Villemoes wrote:
> On Thu, May 22 2025, Tom Rini <trini@konsulko.com> wrote:
>
> > On Wed, May 07, 2025 at 02:12:42PM +0200, Rasmus Villemoes wrote:
> >
> >> While looking through list.h, I saw that the regular list_* helpers
> >> (and one of the hlist_* ones) still contain the prefetch() that was
> >> removed in linux 14 years ago. It doesn't do anything, but makes the
> >> macros harder to read, so get rid of it, and the fallback, no-op
> >> definition that they relied on. That requires removing a few uses
> >> outside list.h as well.
> >>
> >> checkpatch warns about some whitespace issues in list.h, but as I've
> >> copied whole kerneldoc+#define blocks directly from the linux kernel,
> >> I think it's better to just accept that so that we don't introduce
> >> needless diffs. The "macro argument reuse" arguments should also be
> >> ignored, as e.g. the "member" arguments are obviously always just bare
> >> identifiers, and the "pos" arguments must be assigned to multiple
> >> times.
> >>
> >> Rasmus Villemoes (4):
> >> linux/list.h: drop use of prefetch()
> >> treewide: drop no-op prefetch() calls
> >> mips: drop unused prefetch code and logic
> >> linux/list.h: drop fallback definition of prefetch()
> >>
> >> arch/mips/include/asm/processor.h | 16 -----
> >> drivers/net/mvpp2.c | 1 -
> >> drivers/net/octeontx/nicvf_main.c | 2 -
> >> drivers/usb/gadget/at91_udc.c | 1 -
> >> drivers/usb/musb-new/musb_core.c | 2 -
> >> include/linux/list.h | 104 +++++++++++++++++-------------
> >> 6 files changed, 59 insertions(+), 67 deletions(-)
> >
> > Unfortunately this leads to build problems on lots of platforms:
> > https://source.denx.de/u-boot/u-boot/-/jobs/1141951
>
> :( so we've been relying on that prefetch() laundering away the
> volatile.
>
> Which really begs the question: Why, exactly, is it that gd even has
> that volatile qualifier in the first place?
The answer is likely early 2000s GCC.
> I'm 98% certain that we could drop that and get better code generation
> and avoid a ton of places where we cast away that volatile which
> shouldn't really be there anyway.
It would be a good thing to experiment with now and maybe try for real
in a near-future merge window.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-05-25 23:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 12:12 [PATCH 0/4] list.h/treewide: get rid of no-op prefetch() Rasmus Villemoes
2025-05-07 12:12 ` [PATCH 1/4] linux/list.h: drop use of prefetch() Rasmus Villemoes
2025-05-07 12:12 ` [PATCH 2/4] treewide: drop no-op prefetch() calls Rasmus Villemoes
2025-05-07 12:12 ` [PATCH 3/4] mips: drop unused prefetch code and logic Rasmus Villemoes
2025-05-07 12:12 ` [PATCH 4/4] linux/list.h: drop fallback definition of prefetch() Rasmus Villemoes
2025-05-07 15:51 ` [PATCH 0/4] list.h/treewide: get rid of no-op prefetch() Tom Rini
2025-05-22 16:56 ` Tom Rini
2025-05-25 20:07 ` Rasmus Villemoes
2025-05-25 23:02 ` Tom Rini [this message]
2025-05-26 21:10 ` Rasmus Villemoes
2025-05-26 22:01 ` Tom Rini
2025-05-27 10:01 ` Rasmus Villemoes
2025-06-18 6:23 ` Rasmus Villemoes
2025-06-18 14:06 ` Tom Rini
2025-06-18 17:53 ` Tom Rini
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=20250525230201.GS100073@bill-the-cat \
--to=trini@konsulko.com \
--cc=daniel.schwierzeck@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=ravi@prevas.dk \
--cc=u-boot@lists.denx.de \
/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