From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Julian Vetter <julian@outer-limits.org>,
Arnd Bergmann <arnd@arndb.de>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sh: Remove IO memcpy and memset from sh code
Date: Thu, 30 Jan 2025 10:31:02 +0100 [thread overview]
Message-ID: <57243d0602f768e6d87842008f0d2c76a1e7dc8d.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <CAMuHMdXOx2MFDnRm2dxVTE9tFfAud595huEVagnTd8RKp3yQsg@mail.gmail.com>
Hi Geert,
On Thu, 2025-01-30 at 10:13 +0100, Geert Uytterhoeven wrote:
> Hi Adrian,
>
> On Thu, 30 Jan 2025 at 09:44, John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
> > On Tue, 2025-01-28 at 11:13 +0100, Julian Vetter wrote:
> > > Remove IO memcpy and memset from sh specific code and fall back to the
> > > new implementations from lib/iomem_copy.c. They use word accesses if the
> > > buffers are aligned and only fall back to byte accesses for potentially
> > > unaligned parts of a buffer.
> > >
> > > Signed-off-by: Julian Vetter <julian@outer-limits.org>
> > > ---
> > > Changes for V2:
> > > - Removed also SH4 specific memcpy_fromio code
>
> > I'm not sure that I understand the motivation to remove hand-optimized sh4 assembler
> > code for memset and drop it in favor of potentially slower generic C code. What is
> > the reasoning behind this?
>
> See Arnd's feedback on v1
> https://lore.kernel.org/all/ffe019a1-11b4-4ad7-bbe2-8ef3e01ffeb0@app.fastmail.com
I read Arnd's feedback but I don't really know whether GCC produces better code than
this hand-written assembly. Is there any compelling argument?
I'm just worried we would slow down something as fundamental as memset().
> > Also, it seems that this patch would make your other patch
> >
> > "sh: Remove memset_io from sh specific code"
> >
> > obsolete.
>
> Yeah, that should have been mentioned under the ---.
Thought so.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
next prev parent reply other threads:[~2025-01-30 9:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 10:13 Julian Vetter
2025-01-28 10:21 ` Arnd Bergmann
2025-01-30 8:44 ` John Paul Adrian Glaubitz
2025-01-30 9:13 ` Geert Uytterhoeven
2025-01-30 9:31 ` John Paul Adrian Glaubitz [this message]
2025-01-30 9:35 ` Geert Uytterhoeven
2025-01-30 9:52 ` John Paul Adrian Glaubitz
2025-01-30 10:18 ` Geert Uytterhoeven
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=57243d0602f768e6d87842008f0d2c76a1e7dc8d.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=julian@outer-limits.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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®