From: "Arnd Bergmann" <arnd@arndb.de>
To: "Geert Uytterhoeven" <geert@linux-m68k.org>,
"Robin Murphy" <robin.murphy@arm.com>
Cc: "Thomas Zimmermann" <tzimmermann@suse.de>,
"Helge Deller" <deller@gmx.de>,
"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>,
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 v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions
Date: Fri, 28 Apr 2023 14:17:24 +0100 [thread overview]
Message-ID: <f612c682-5767-4a58-82f6-f4a4d1b592a1@app.fastmail.com> (raw)
In-Reply-To: <CAMuHMdUGjtiAR37L4_e0_p8ee2=gxoUj7+e7rqMLTBK+vpV4yw@mail.gmail.com>
On Fri, Apr 28, 2023, at 13:27, Geert Uytterhoeven wrote:
> On Fri, Apr 28, 2023 at 2:18 PM Robin Murphy <robin.murphy@arm.com> wrote:
>> On 2023-04-28 10:27, Thomas Zimmermann wrote:
>> > -
>> > -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || \
>> > - defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || \
>> > - defined(__arm__) || defined(__aarch64__) || defined(__mips__)
>> > -
>> > -#define fb_readb __raw_readb
>> > -#define fb_readw __raw_readw
>> > -#define fb_readl __raw_readl
>> > -#define fb_readq __raw_readq
>> > -#define fb_writeb __raw_writeb
>> > -#define fb_writew __raw_writew
>> > -#define fb_writel __raw_writel
>> > -#define fb_writeq __raw_writeq
>>
>> Note that on at least some architectures, the __raw variants are
>> native-endian, whereas the regular accessors are explicitly
>> little-endian, so there is a slight risk of inadvertently changing
>> behaviour on big-endian systems (MIPS most likely, but a few old ARM
>> platforms run BE as well).
>
> Also on m68k, when ISA or PCI are enabled.
>
> In addition, the non-raw variants may do some extras to guarantee
> ordering, which you do not need on a frame buffer.
>
> So I'd go for the __raw_*() variants everywhere.
The only implementations in fbdev are
1) sparc sbus
2) __raw_writel
3) direct pointer dereference
But none use the byte-swapping writel() implementations, and
the only ones that use the direct pointer dereference or sbus
are the ones on which these are defined the same as __raw_writel
Arnd
_______________________________________________
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-04-28 13:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 9:27 [PATCH v2 0/5] fbdev: Use regular I/O function for framebuffers Thomas Zimmermann
2023-04-28 9:27 ` [PATCH v2 1/5] fbdev/matrox: Remove trailing whitespaces Thomas Zimmermann
2023-04-28 13:00 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 2/5] ipu-v3: Include <linux/io.h> Thomas Zimmermann
2023-04-28 13:01 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 3/5] fbdev: Include <linux/io.h> in various drivers Thomas Zimmermann
2023-04-28 13:01 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 4/5] fbdev: Include <linux/io.h> in drivers Thomas Zimmermann
2023-04-28 13:07 ` Sam Ravnborg
2023-04-28 13:13 ` Thomas Zimmermann
2023-04-28 9:27 ` [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions Thomas Zimmermann
2023-04-28 12:18 ` Robin Murphy
2023-04-28 12:27 ` Geert Uytterhoeven
2023-04-28 12:59 ` Thomas Zimmermann
2023-04-28 13:10 ` Thomas Zimmermann
2023-04-28 13:17 ` Arnd Bergmann [this message]
2023-04-29 12:26 ` Thomas Zimmermann
2023-04-29 14:11 ` Arnd Bergmann
2023-04-28 13:12 ` Sam Ravnborg
2023-04-28 14:18 ` Thomas Zimmermann
2023-04-28 16:54 ` Sam Ravnborg
2023-04-29 12:28 ` Thomas Zimmermann
2023-04-28 13:13 ` [PATCH v2 0/5] fbdev: Use regular I/O function for framebuffers Sam Ravnborg
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=f612c682-5767-4a58-82f6-f4a4d1b592a1@app.fastmail.com \
--to=arnd@arndb.de \
--cc=James.Bottomley@hansenpartnership.com \
--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=robin.murphy@arm.com \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=tzimmermann@suse.de \
--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).