From: Thomas Zimmermann <tzimmermann@suse.de>
To: Arnd Bergmann <arnd@arndb.de>, Helge Deller <deller@gmx.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Javier Martinez Canillas <javierm@redhat.com>,
Daniel Vetter <daniel@ffwll.ch>, Vineet Gupta <vgupta@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
"David S . Miller" <davem@davemloft.net>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Sam Ravnborg <sam@ravnborg.org>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-parisc@vger.kernel.org
Subject: Re: [PATCH v3 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h>
Date: Wed, 3 May 2023 16:55:05 +0200 [thread overview]
Message-ID: <dd921bae-0145-09e2-24b1-f08d89a78eba@suse.de> (raw)
In-Reply-To: <67d6a188-041f-4604-99a3-548c41af0693@app.fastmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2336 bytes --]
Hi
Am 02.05.23 um 22:06 schrieb Arnd Bergmann:
> On Tue, May 2, 2023, at 15:02, Thomas Zimmermann wrote:
>> Implement framebuffer I/O helpers, such as fb_read*() and fb_write*(),
>> in the architecture's <asm/fb.h> header file or the generic one.
>>
>> The common case has been the use of regular I/O functions, such as
>> __raw_readb() or memset_io(). A few architectures used plain system-
>> memory reads and writes. Sparc used helpers for its SBus.
>>
>> The architectures that used special cases provide the same code in
>> their __raw_*() I/O helpers. So the patch replaces this code with the
>> __raw_*() functions and moves it to <asm-generic/fb.h> for all
>> architectures.
>>
>> v3:
>> * implement all architectures with generic helpers
>> * support reordering and native byte order (Geert, Arnd)
>
> This looks good for the read/write helpers, but I'm a little
> worried about the memset and memcpy functions, since they do
> change behavior on some architectures:
>
> - on sparc64, fb_mem{set,cpy} uses ASI_PHYS_BYPASS_EC_E (like __raw_readb)
> while mem{set_,cpy_from,cpy_to} uses ASI_PHYS_BYPASS_EC_E_L (like readb)
> I don't know the effect of that, but it seems intentional
>
> - on loongarch and csky, the _io variants avoid unaligned access,
> while the normal memcpy/memset is probably broken, so your
> patch is a bugfix
>
> - on ia64, the _io variants use bytewise access and avoid any longer
> loads and stores, so your patch probably makes things slower.
>
> It's probably safe to deal with all the above by either adding
> architecture specific overrides to the current version, or
> by doing the semantic changes before the move to asm/fb.h, but
> one way or the other I'd prefer this to be separate from the
> consolidation patch that should not have any changes in behavior.
I think I'll add architecture overrides that contain the current code,
even if they contain some force-casting wrt __iomem. If anyone wants to
fix the issues, they can then address them easily.
Best regards
Thomas
>
> Arnd
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2023-05-03 14:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 13:02 [PATCH v3 0/6] fbdev: Move framebuffer I/O helpers to <asm/fb.h> Thomas Zimmermann
2023-05-02 13:02 ` [PATCH v3 1/6] fbdev/matrox: Remove trailing whitespaces Thomas Zimmermann
2023-05-02 13:02 ` [PATCH v3 2/6] ipu-v3: Include <linux/io.h> Thomas Zimmermann
2023-05-02 13:02 ` [PATCH v3 3/6] fbdev: Include <linux/io.h> in various drivers Thomas Zimmermann
2023-05-02 13:02 ` [PATCH v3 4/6] fbdev: Include <linux/io.h> via <asm/fb.h> Thomas Zimmermann
2023-05-02 19:54 ` Sam Ravnborg
2023-05-03 7:09 ` Thomas Zimmermann
2023-05-03 7:19 ` Javier Martinez Canillas
2023-05-03 8:09 ` Geert Uytterhoeven
2023-05-03 8:12 ` Thomas Zimmermann
2023-05-03 8:52 ` Arnd Bergmann
2023-05-02 13:02 ` [PATCH v3 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h> Thomas Zimmermann
2023-05-02 20:03 ` Sam Ravnborg
2023-05-03 6:58 ` Thomas Zimmermann
2023-05-03 19:03 ` Sam Ravnborg
2023-05-02 20:06 ` Arnd Bergmann
2023-05-03 14:55 ` Thomas Zimmermann [this message]
2023-05-03 15:06 ` Arnd Bergmann
2023-05-02 13:02 ` [PATCH v3 6/6] fbdev: Rename fb_mem*() helpers Thomas Zimmermann
2023-05-02 20:08 ` Sam Ravnborg
2023-05-03 8:15 ` Thomas Zimmermann
2023-05-03 19:06 ` Sam Ravnborg
2023-05-03 8:21 ` [PATCH v3 0/6] fbdev: Move framebuffer I/O helpers to <asm/fb.h> 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=dd921bae-0145-09e2-24b1-f08d89a78eba@suse.de \
--to=tzimmermann@suse.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=javierm@redhat.com \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=loongarch@lists.linux.dev \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=vgupta@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).