hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/set_memory.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright 2017, Michael Ellerman, IBM Corporation.
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License version
6
- * 2 as published by the Free Software Foundation;
74 */
85 #ifndef _LINUX_SET_MEMORY_H_
96 #define _LINUX_SET_MEMORY_H_
....@@ -17,6 +14,17 @@
1714 static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
1815 #endif
1916
17
+#ifndef CONFIG_ARCH_HAS_SET_DIRECT_MAP
18
+static inline int set_direct_map_invalid_noflush(struct page *page)
19
+{
20
+ return 0;
21
+}
22
+static inline int set_direct_map_default_noflush(struct page *page)
23
+{
24
+ return 0;
25
+}
26
+#endif
27
+
2028 #ifndef set_mce_nospec
2129 static inline int set_mce_nospec(unsigned long pfn, bool unmap)
2230 {