From: Ignacio Encinas Rubio <ignacio@iencinas.com>
To: Alexandre Ghiti <alex@ghiti.fr>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>
Cc: "Eric Biggers" <ebiggers@kernel.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org,
"Zhihang Shao" <zhihang.shao.iscas@gmail.com>,
"Björn Töpel" <bjorn@kernel.org>
Subject: Re: [PATCH RFC] riscv: introduce asm/swab.h
Date: Mon, 17 Mar 2025 21:29:20 +0100 [thread overview]
Message-ID: <8729ccb4-cdd2-48f7-a8d4-f55a24964bc4@iencinas.com> (raw)
In-Reply-To: <d964bf15-7172-448b-9aa1-72d5bf3e1695@ghiti.fr>
On 17/3/25 17:36, Alexandre Ghiti wrote:
>> We need a default implementation to fall back on, but there isn't any in
>> `asm-generic/swab.h`. Should I introduce a first patch moving
>> ___constant_swab<XX> into include/uapi/asm-generic/swab.h?
>
> Yes, that or something else to avoid the code duplication.
Thanks for double checking. I figured as much but I ended up getting a
bit confused with the include directories.
>> +#if defined(CONFIG_RISCV_ISA_ZBB) && !defined(NO_ALTERNATIVE)
>
> NO_ALTERNATIVE does not exist to my knowledge, and you don't need to check for ALTERNATIVE as alternative-macros.h will do the right thing in that case.
It's a define hardcoded into drivers/firmware/efi/libstub/Makefile. It
was introduced in [1]. It helps avoid these types of warnings [2]:
riscv64-unknown-linux-gnu-ld: warning: orphan section
`.init.alternative' from `./drivers/firmware/efi/libstub/riscv.stub.o'
being placed in section `.init.alternative'
Let me know if you think I should drop it.
[1] https://lore.kernel.org/all/20231031064553.2319688-3-xiao.w.wang@intel.com/
[2] https://lore.kernel.org/all/DM8PR11MB5751DA69DEEAAC9B06623E0BB80FA@DM8PR11MB5751.namprd11.prod.outlook.com/
> It would be nice to have some perf numbers too, maybe Bjorn will chime in :)
>
> Thanks for your patch, looking forward the v2,
Thank you!
prev parent reply other threads:[~2025-03-17 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 22:03 Ignacio Encinas
2025-03-17 16:36 ` Alexandre Ghiti
2025-03-17 20:29 ` Ignacio Encinas Rubio [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=8729ccb4-cdd2-48f7-a8d4-f55a24964bc4@iencinas.com \
--to=ignacio@iencinas.com \
--cc=alex@ghiti.fr \
--cc=bjorn@kernel.org \
--cc=ebiggers@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=skhan@linuxfoundation.org \
--cc=zhihang.shao.iscas@gmail.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®