Re: [PATCH v2] sh: Remove IO memcpy and memset from sh code
John Paul Adrian Glaubitz <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <c715bcf9716ebefa8272146ce48f674c56a04c52.camel@physik.fu-berlin.de> |
Hi Geert, On Thu, 2025-01-30 at 10:35 +0100, Geert Uytterhoeven wrote: > Hi Adrian, > > On Thu, 30 Jan 2025 at 10:31, John Paul Adrian Glaubitz > <[email protected]> wrote: > > On Thu, 2025-01-30 at 10:13 +0100, Geert Uytterhoeven wrote: > > > On Thu, 30 Jan 2025 at 09:44, John Paul Adrian Glaubitz > > > <[email protected]> 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 <[email protected]> > > > > > --- > > > > > 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/[email protected] > > > > 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(). > > it's not memset(), but memset_io(), i.e. clearing (slow) mapped I/O memory. Could you review the patch as well, so I have some peace of mind? ;-) Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913