]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/linux/set_memory.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2017, Michael Ellerman, IBM Corporation.
5 #ifndef _LINUX_SET_MEMORY_H_
6 #define _LINUX_SET_MEMORY_H_
8 #ifdef CONFIG_ARCH_HAS_SET_MEMORY
9 #include <asm/set_memory.h>
11 static inline int set_memory_ro(unsigned long addr
, int numpages
) { return 0; }
12 static inline int set_memory_rw(unsigned long addr
, int numpages
) { return 0; }
13 static inline int set_memory_x(unsigned long addr
, int numpages
) { return 0; }
14 static inline int set_memory_nx(unsigned long addr
, int numpages
) { return 0; }
17 #ifndef CONFIG_ARCH_HAS_SET_DIRECT_MAP
18 static inline int set_direct_map_invalid_noflush(struct page
*page
)
22 static inline int set_direct_map_default_noflush(struct page
*page
)
27 static inline bool kernel_page_present(struct page
*page
)
33 #ifndef set_mce_nospec
34 static inline int set_mce_nospec(unsigned long pfn
, bool unmap
)
40 #ifndef clear_mce_nospec
41 static inline int clear_mce_nospec(unsigned long pfn
)
47 #ifndef CONFIG_ARCH_HAS_MEM_ENCRYPT
48 static inline int set_memory_encrypted(unsigned long addr
, int numpages
)
53 static inline int set_memory_decrypted(unsigned long addr
, int numpages
)
57 #endif /* CONFIG_ARCH_HAS_MEM_ENCRYPT */
59 #endif /* _LINUX_SET_MEMORY_H_ */