[PATCH 3/4] arch/powerpc: Call internal __phys_mem_access_prot() in fbdev code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: mpe@xxxxxxxxxxxxxx, npiggin@xxxxxxxxx, christophe.leroy@xxxxxxxxxx, arnd@xxxxxxxx, deller@xxxxxx
- Subject: [PATCH 3/4] arch/powerpc: Call internal __phys_mem_access_prot() in fbdev code
- From: Thomas Zimmermann <tzimmermann@xxxxxxx>
- Date: Fri, 1 Sep 2023 16:16:35 +0200
- Cc: linuxppc-dev@xxxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, Thomas Zimmermann <tzimmermann@xxxxxxx>
- In-reply-to: <20230901142659.31787-1-tzimmermann@suse.de>
- References: <20230901142659.31787-1-tzimmermann@suse.de>
Call __phys_mem_access_prot() from the fbdev mmap helper fb_pgprotect().
Allows us to avoid the file argument, which can then be removed from
fB_pgprotect() entirely. No other architecture uses the parameter.
Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
arch/powerpc/include/asm/fb.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/fb.h b/arch/powerpc/include/asm/fb.h
index 5f1a2e5f7654..0f1fe1310924 100644
--- a/arch/powerpc/include/asm/fb.h
+++ b/arch/powerpc/include/asm/fb.h
@@ -9,9 +9,9 @@
static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
unsigned long off)
{
- vma->vm_page_prot = phys_mem_access_prot(file, off >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot);
+ vma->vm_page_prot = __phys_mem_access_prot(PHYS_PFN(off),
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot);
}
#define fb_pgprotect fb_pgprotect
--
2.41.0
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]