public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Alexandre Ghiti <alex@ghiti.fr>
To: Ignacio Encinas <ignacio@iencinas.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Arnd Bergmann <arnd@arndb.de>
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>,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH v4 0/2] Implement endianess swap macros for RISC-V
Date: Wed, 16 Jul 2025 15:09:30 +0200	[thread overview]
Message-ID: <7e22a448-3cee-4475-b69b-3dd45b57f168@ghiti.fr> (raw)
In-Reply-To: <aae8559c-88d2-4882-92cd-7e906eb8b7d6@ghiti.fr>

Hi Ignacio,

Can you come up with a new version that only touches the riscv tree so 
that we can merge this in 6.17? Not ideal but I guess we can live with 
code duplication for now.

Thanks,

Alex

On 7/9/25 17:12, Alexandre Ghiti wrote:
> Hi Arnd,
>
> Gentle ping as we would like to merge this in the riscv tree but we 
> need your ack (or nack).
>
> Thanks,
>
> Alex
>
> On 5/16/25 16:37, Alexandre Ghiti wrote:
>> Hi Arnd,
>>
>> Do you think we can merge that for 6.16? It is nice improvement for us.
>>
>> Thanks,
>>
>> Alex
>>
>> On 26/04/2025 16:56, Ignacio Encinas wrote:
>>> Motivated by [1]. A couple of things to note:
>>>
>>> RISC-V needs a default implementation to fall back on. There is one
>>> available in include/uapi/linux/swab.h but that header can't be 
>>> included
>>> from arch/riscv/include/asm/swab.h. Therefore, the first patch in this
>>> series moves the default implementation into asm-generic.
>>>
>>> Tested with crc_kunit as pointed out here [2]. I can't provide
>>> performance numbers as I don't have RISC-V hardware yet.
>>>
>>> [1] 
>>> https://lore.kernel.org/all/20250302220426.GC2079@quark.localdomain/
>>> [2] 
>>> https://lore.kernel.org/all/20250216225530.306980-1-ebiggers@kernel.org/ 
>>>
>>>
>>> Signed-off-by: Ignacio Encinas <ignacio@iencinas.com>
>>> ---
>>> Changes in v4:
>>>
>>> - Add missing include in the 1st patch, reported by
>>> https://lore.kernel.org/all/202504042300.it9RcOSt-lkp@intel.com/
>>> - Rewrite the ARCH_SWAB macro as suggested by Arnd
>>> - Define __arch_swab64 for CONFIG_32BIT (Ben)
>>> - Link to v3: 
>>> https://lore.kernel.org/r/20250403-riscv-swab-v3-0-3bf705d80e33@iencinas.com
>>>
>>> Arnd, I know you don't like Patch 1 but I tried your suggestions and
>>> couldn't make them work. Please let me know if I missed anything [3] 
>>> [4]
>>>
>>> [3] 
>>> https://lore.kernel.org/linux-riscv/f5464e26-faa0-48f1-8585-9ce52c8c9f5f@iencinas.com/
>>> [4] 
>>> https://lore.kernel.org/linux-riscv/b3b59747-0484-4042-bdc4-c067688e3bfe@iencinas.com/
>>>
>>> Changes in v3:
>>>
>>> PATCH 2:
>>>    Use if(riscv_has_extension_likely) instead of asm goto (Eric). It
>>>    looks like both versions generate the same assembly. Perhaps we 
>>> should
>>>    do the same change in other places such as 
>>> arch/riscv/include/asm/bitops.h
>>> - Link to v2: 
>>> https://lore.kernel.org/r/20250319-riscv-swab-v2-0-d53b6d6ab915@iencinas.com
>>>
>>> Changes in v2:
>>> - Introduce first patch factoring out the default implementation into
>>>    asm-generic
>>> - Remove blank line to make checkpatch happy
>>> - Link to v1: 
>>> https://lore.kernel.org/r/20250310-riscv-swab-v1-1-34652ef1ee96@iencinas.com
>>>
>>> ---
>>> Ignacio Encinas (2):
>>>        include/uapi/linux/swab.h: move default implementation for 
>>> swab macros into asm-generic
>>>        riscv: introduce asm/swab.h
>>>
>>>   arch/riscv/include/asm/swab.h   | 62 
>>> +++++++++++++++++++++++++++++++++++++++++
>>>   include/uapi/asm-generic/swab.h | 33 ++++++++++++++++++++++
>>>   include/uapi/linux/swab.h       | 33 +---------------------
>>>   3 files changed, 96 insertions(+), 32 deletions(-)
>>> ---
>>> base-commit: a7f2e10ecd8f18b83951b0bab47ddaf48f93bf47
>>> change-id: 20250307-riscv-swab-b81b94a9ac1b
>>>
>>> Best regards,
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2025-07-16 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-26 14:56 [PATCH v4 0/2] Implement endianess swap macros for RISC-V Ignacio Encinas
2025-04-26 14:56 ` [PATCH v4 1/2] include/uapi/linux/swab.h: move default implementation for swab macros into asm-generic Ignacio Encinas
2025-05-11 11:23   ` David Laight
2025-04-26 14:56 ` [PATCH v4 2/2] riscv: introduce asm/swab.h Ignacio Encinas
2025-05-08 17:32 ` [PATCH v4 0/2] Implement endianess swap macros for RISC-V Palmer Dabbelt
2025-05-16 14:37 ` Alexandre Ghiti
2025-07-09 15:12   ` Alexandre Ghiti
2025-07-16 13:09     ` Alexandre Ghiti [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=7e22a448-3cee-4475-b69b-3dd45b57f168@ghiti.fr \
    --to=alex@ghiti.fr \
    --cc=arnd@arndb.de \
    --cc=bjorn@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=ignacio@iencinas.com \
    --cc=linux-arch@vger.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