From: Rasmus Villemoes <ravi@prevas.dk>
To: Tom Rini <trini@konsulko.com>
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: Tue, 27 May 2025 12:01:08 +0200 [thread overview]
Message-ID: <87ecwa2x0b.fsf@prevas.dk> (raw)
In-Reply-To: <20250526220155.GE100073@bill-the-cat> (Tom Rini's message of "Mon, 26 May 2025 16:01:55 -0600")
On Mon, May 26 2025, Tom Rini <trini@konsulko.com> wrote:
> On Mon, May 26, 2025 at 11:10:33PM +0200, Rasmus Villemoes wrote:
>> On Sun, May 25 2025, Tom Rini <trini@konsulko.com> wrote:
>>
>> > On Sun, May 25, 2025 at 10:07:56PM +0200, Rasmus Villemoes wrote:
>> >>
>> >> :( 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.
>>
>> So since it's declared per architecture I just tried with arm for now,
>> and this
>>
>> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
>> index 45401d5e3c8..f7a47204b7c 100644
>> --- a/arch/arm/include/asm/global_data.h
>> +++ b/arch/arm/include/asm/global_data.h
>> @@ -133,9 +133,9 @@ static inline gd_t *get_gd(void)
>> #else
>>
>> #ifdef CONFIG_ARM64
>> -#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
>> +#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("x18")
>> #else
>> -#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r9")
>> +#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r9")
>> #endif
>> #endif
>>
>>
>> builds, boots to linux, and passes our test suite on our
>> beagleboneblack, imx7 SabreSD, RPi 3, RPi 4, RPi-cm4, wandboard,
>> imx8mp-evk; i.e. a good mix of 32 and 64 bit arm.
>
> That's a good set of datapoints, thanks. Do you want to post a real
> series at some point or should I do it and Suggested-by you? Thanks.
I'll do a series and let the azure CI chew on it before posting it for
real.
Rasmus
next prev parent reply other threads:[~2025-05-27 10:01 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
2025-05-26 21:10 ` Rasmus Villemoes
2025-05-26 22:01 ` Tom Rini
2025-05-27 10:01 ` Rasmus Villemoes [this message]
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=87ecwa2x0b.fsf@prevas.dk \
--to=ravi@prevas.dk \
--cc=daniel.schwierzeck@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=trini@konsulko.com \
--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 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.