From: Thomas Zimmermann <tzimmermann@suse.de>
To: Arnd Bergmann <arnd@arndb.de>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Helge Deller <deller@gmx.de>,
Javier Martinez Canillas <javierm@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org,
linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
sparclinux@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers
Date: Thu, 6 Apr 2023 16:06:35 +0200 [thread overview]
Message-ID: <71e5450f-aad2-1f7c-a961-c0b0fce62eea@suse.de> (raw)
In-Reply-To: <92fe3838-41f0-4e27-8467-161553ff724f@app.fastmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2334 bytes --]
Hi
Am 05.04.23 um 17:53 schrieb Arnd Bergmann:
> On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote:
>> Generic implementations of fb_pgprotect() and fb_is_primary_device()
>> have been in the source code for a long time. Prepare the header file
>> to make use of them.
>>
>> Improve the code by using an inline function for fb_pgprotect() and
>> by removing include statements.
>>
>> Symbols are protected by preprocessor guards. Architectures that
>> provide a symbol need to define a preprocessor token of the same
>> name and value. Otherwise the header file will provide a generic
>> implementation. This pattern has been taken from <asm/io.h>.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> Moving this into generic code is good, but I'm not sure
> about the default for fb_pgprotect():
>
>> +
>> +#ifndef fb_pgprotect
>> +#define fb_pgprotect fb_pgprotect
>> +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
>> + unsigned long off)
>> +{ }
>> +#endif
>
> I think most architectures will want the version we have on
> arc, arm, arm64, loongarch, and sh already:
>
> static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
> unsigned long off)
> {
> vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
> }
>
> so I'd suggest making that version the default, and treating the
> empty ones (m68knommu, sparc32) as architecture specific
> workarounds.
>
> I see that sparc64 and parisc use pgprot_uncached here, but as
> they don't define a custom pgprot_writecombine, this ends up being
> the same, and they can use the above definition as well.
>
> mips defines pgprot_writecombine but uses pgprot_noncached
> in fb_pgprotect(), which is probably a mistake and should have
> been updated as part of commit 4b050ba7a66c ("MIPS: pgtable.h:
> Implement the pgprot_writecombine function for MIPS").
I would not want to change any of the other platform's functions unless
the rsp platform maintainers ask me to.
Best regards
Thomas
>
> Arnd
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-04-06 14:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 15:05 [PATCH 00/18] arch: Consolidate <asm/fb.h> Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 01/18] fbdev: Prepare generic architecture helpers Thomas Zimmermann
2023-04-05 15:53 ` Arnd Bergmann
2023-04-05 16:07 ` Daniel Vetter
2023-04-05 18:33 ` Thomas Zimmermann
2023-04-06 14:06 ` Thomas Zimmermann [this message]
2023-04-05 15:05 ` [PATCH 02/18] arch/arc: Implement <asm/fb.h> with generic helpers Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 03/18] arch/arm: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 04/18] arch/arm64: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 05/18] arch/ia64: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 06/18] arch/loongarch: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 07/18] arch/m68k: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 08/18] arch/mips: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 09/18] video: Remove trailing whitespaces Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 10/18] video: Move HP PARISC STI core code to shared location Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 11/18] arch/parisc: Remove trailing whitespaces Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 12/18] arch/parisc: Implement fb_is_primary_device() under arch/parisc Thomas Zimmermann
2023-04-06 19:08 ` Rolf Eike Beer
2023-04-05 15:05 ` [PATCH 13/18] arch/parisc: Implement <asm/fb.h> with generic helpers Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 14/18] arch/powerpc: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 15/18] arch/sh: " Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 16/18] arch/sparc: Implement fb_is_primary_device() in source file Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 17/18] arch/sparc: Implement <asm/fb.h> with generic helpers Thomas Zimmermann
2023-04-05 15:05 ` [PATCH 18/18] arch/x86: " Thomas Zimmermann
2023-04-06 19:06 ` [PATCH 00/18] arch: Consolidate <asm/fb.h> Rolf Eike Beer
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=71e5450f-aad2-1f7c-a961-c0b0fce62eea@suse.de \
--to=tzimmermann@suse.de \
--cc=arnd@arndb.de \
--cc=daniel.vetter@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=javierm@redhat.com \
--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-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=sparclinux@vger.kernel.org \
--cc=x86@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).