mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-19 23:45:42 +00:00
These are cleanups for architecture specific header files:
- the comments in include/linux/syscalls.h have gone out of sync
and are really pointless, so these get removed
- The asm/bitsperlong.h header no longer needs to be architecture
specific on modern compilers, so use a generic version for newer
architectures that use new enough userspace compilers
- A cleanup for virt_to_pfn/virt_to_bus to have proper type
checking, forcing the use of pointers
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmSl138ACgkQYKtH/8kJ
UieqWxAA2WjNVfyuieYckglOVE0PZPs2fzCwyzTY5iUTH3gE5cBFWJDWcg2EnouG
v3X3htEQcowYWaCF9+rypQXaGiSx4WXi2Bjxnz3D/BcreqWPI4eSQ0fpGG5SURTY
2zYF72GTt4JGR++l+7/R9MZwPbwYDT9BsD5tkel8PxnyVLM6/c5xFvbjzRSKFE8x
SMN1jGZ62ITLNf/8coAOEPNxBYtDT6yQyu7P2sx5cd65LAQq9yLKjFklnBBovgWT
OoCIZAdGkhcNwOh1LjyHcdNdpfNJGceKyqKPqty07IhCQuF2jxiyFYFzuBbeyQfE
S0itN8o/MIfUmxaQl3e8dPAVb1RlNVr1zfQ6y4tUtWNdkNL2WwSnSQSRHrBfHxCQ
QCF++PMeFcLhGwMYtqdNJ7XGLQ0PsjD74pRf0vo+vjmqDk2BJsJBP57VU+8MJn5r
SoxqnJ0WxLvm1TfrNKusV7zMNWquc2duJDW40zsOssP4itjYELSI6qa56qmzlqmX
zKmRx6mxAlx9RRK8FHXFYHbz3p93vv8z9vTOZV3AjIjjED960CLknUAwCC8FoJyz
9b5wyMXsLQHQjGt8luAvPc6OiU0EiU9a4SPK+feWcv27serFvnjJlRTS/yG2Z3zd
BYsUgsXHypsdoud+aE7MeCy7fE8n3mhoyMQQRBkOMFJ7RsG6wAE=
=S/he
-----END PGP SIGNATURE-----
Merge tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic updates from Arnd Bergmann:
"These are cleanups for architecture specific header files:
- the comments in include/linux/syscalls.h have gone out of sync and
are really pointless, so these get removed
- The asm/bitsperlong.h header no longer needs to be architecture
specific on modern compilers, so use a generic version for newer
architectures that use new enough userspace compilers
- A cleanup for virt_to_pfn/virt_to_bus to have proper type checking,
forcing the use of pointers"
* tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
syscalls: Remove file path comments from headers
tools arch: Remove uapi bitsperlong.h of hexagon and microblaze
asm-generic: Unify uapi bitsperlong.h for arm64, riscv and loongarch
m68k/mm: Make pfn accessors static inlines
arm64: memory: Make virt_to_pfn() a static inline
ARM: mm: Make virt_to_pfn() a static inline
asm-generic/page.h: Make pfn accessors static inlines
xen/netback: Pass (void *) to virt_to_page()
netfs: Pass a pointer to virt_to_page()
cifs: Pass a pointer to virt_to_page() in cifsglob
cifs: Pass a pointer to virt_to_page()
riscv: mm: init: Pass a pointer to virt_to_page()
ARC: init: Pass a pointer to virt_to_pfn() in init
m68k: Pass a pointer to virt_to_pfn() virt_to_page()
fs/proc/kcore.c: Pass a pointer to virt_addr_valid()
196 lines
4.8 KiB
C
196 lines
4.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* arch/arm/include/asm/page.h
|
|
*
|
|
* Copyright (C) 1995-2003 Russell King
|
|
*/
|
|
#ifndef _ASMARM_PAGE_H
|
|
#define _ASMARM_PAGE_H
|
|
|
|
/* PAGE_SHIFT determines the page size */
|
|
#define PAGE_SHIFT 12
|
|
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
|
#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifndef CONFIG_MMU
|
|
|
|
#include <asm/page-nommu.h>
|
|
|
|
#else
|
|
|
|
#include <asm/glue.h>
|
|
|
|
/*
|
|
* User Space Model
|
|
* ================
|
|
*
|
|
* This section selects the correct set of functions for dealing with
|
|
* page-based copying and clearing for user space for the particular
|
|
* processor(s) we're building for.
|
|
*
|
|
* We have the following to choose from:
|
|
* v4wt - ARMv4 with writethrough cache, without minicache
|
|
* v4wb - ARMv4 with writeback cache, without minicache
|
|
* v4_mc - ARMv4 with minicache
|
|
* xscale - Xscale
|
|
* xsc3 - XScalev3
|
|
*/
|
|
#undef _USER
|
|
#undef MULTI_USER
|
|
|
|
#ifdef CONFIG_CPU_COPY_V4WT
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER v4wt
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_COPY_V4WB
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER v4wb
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_COPY_FEROCEON
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER feroceon
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_COPY_FA
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER fa
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_SA1100
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER v4_mc
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_XSCALE
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER xscale_mc
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_XSC3
|
|
# ifdef _USER
|
|
# define MULTI_USER 1
|
|
# else
|
|
# define _USER xsc3_mc
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_COPY_V6
|
|
# define MULTI_USER 1
|
|
#endif
|
|
|
|
#if !defined(_USER) && !defined(MULTI_USER)
|
|
#error Unknown user operations model
|
|
#endif
|
|
|
|
struct page;
|
|
struct vm_area_struct;
|
|
|
|
struct cpu_user_fns {
|
|
void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr);
|
|
void (*cpu_copy_user_highpage)(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
};
|
|
|
|
void fa_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void fa_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void feroceon_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void v4_mc_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void v4wb_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void v4wb_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void v4wt_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void v4wt_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
void xscale_mc_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
void xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
|
|
#ifdef MULTI_USER
|
|
extern struct cpu_user_fns cpu_user;
|
|
|
|
#define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage
|
|
#define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage
|
|
|
|
#else
|
|
|
|
#define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage)
|
|
#define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage)
|
|
|
|
extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr);
|
|
extern void __cpu_copy_user_highpage(struct page *to, struct page *from,
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
#endif
|
|
|
|
#define clear_user_highpage(page,vaddr) \
|
|
__cpu_clear_user_highpage(page, vaddr)
|
|
|
|
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
|
|
#define copy_user_highpage(to,from,vaddr,vma) \
|
|
__cpu_copy_user_highpage(to, from, vaddr, vma)
|
|
|
|
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
|
|
extern void copy_page(void *to, const void *from);
|
|
|
|
#ifdef CONFIG_KUSER_HELPERS
|
|
#define __HAVE_ARCH_GATE_AREA 1
|
|
#endif
|
|
|
|
#ifdef CONFIG_ARM_LPAE
|
|
#include <asm/pgtable-3level-types.h>
|
|
#else
|
|
#include <asm/pgtable-2level-types.h>
|
|
#ifdef CONFIG_VMAP_STACK
|
|
#define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* CONFIG_MMU */
|
|
|
|
typedef struct page *pgtable_t;
|
|
|
|
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
|
extern int pfn_valid(unsigned long);
|
|
#define pfn_valid pfn_valid
|
|
#endif
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
#include <asm/memory.h>
|
|
|
|
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
|
|
|
#include <asm-generic/getorder.h>
|
|
#include <asm-generic/memory_model.h>
|
|
|
|
#endif
|