@@ -8,4 +8,5 @@ generic-y += paging.h
generic-y += percpu.h
generic-y += random.h
generic-y += softirq.h
+generic-y += static-memory.h
generic-y += vm_event.h
deleted file mode 100644
@@ -1,58 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#ifndef __ASM_STATIC_MEMORY_H_
-#define __ASM_STATIC_MEMORY_H_
-
-#include <xen/pfn.h>
-#include <asm/kernel.h>
-
-#ifdef CONFIG_STATIC_MEMORY
-
-static inline void init_staticmem_bank(const struct membank *bank)
-{
- mfn_t bank_start = _mfn(PFN_UP(bank->start));
- unsigned long bank_pages = PFN_DOWN(bank->size);
- mfn_t bank_end = mfn_add(bank_start, bank_pages);
-
- if ( mfn_x(bank_end) <= mfn_x(bank_start) )
- return;
-
- unprepare_staticmem_pages(mfn_to_page(bank_start), bank_pages, false);
-}
-
-void allocate_static_memory(struct domain *d, struct kernel_info *kinfo,
- const struct dt_device_node *node);
-void assign_static_memory_11(struct domain *d, struct kernel_info *kinfo,
- const struct dt_device_node *node);
-void init_staticmem_pages(void);
-
-#else /* !CONFIG_STATIC_MEMORY */
-
-static inline void allocate_static_memory(struct domain *d,
- struct kernel_info *kinfo,
- const struct dt_device_node *node)
-{
- ASSERT_UNREACHABLE();
-}
-
-static inline void assign_static_memory_11(struct domain *d,
- struct kernel_info *kinfo,
- const struct dt_device_node *node)
-{
- ASSERT_UNREACHABLE();
-}
-
-static inline void init_staticmem_pages(void) {};
-
-#endif /* CONFIG_STATIC_MEMORY */
-
-#endif /* __ASM_STATIC_MEMORY_H_ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
new file mode 100644
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ASM_GENERIC_STATIC_MEMORY_H__
+#define __ASM_GENERIC_STATIC_MEMORY_H__
+
+#include <xen/pfn.h>
+#include <asm/kernel.h>
+
+#ifdef CONFIG_STATIC_MEMORY
+
+static inline void init_staticmem_bank(const struct membank *bank)
+{
+ mfn_t bank_start = _mfn(PFN_UP(bank->start));
+ unsigned long bank_pages = PFN_DOWN(bank->size);
+ mfn_t bank_end = mfn_add(bank_start, bank_pages);
+
+ if ( mfn_x(bank_end) <= mfn_x(bank_start) )
+ return;
+
+ unprepare_staticmem_pages(mfn_to_page(bank_start), bank_pages, false);
+}
+
+void allocate_static_memory(struct domain *d, struct kernel_info *kinfo,
+ const struct dt_device_node *node);
+void assign_static_memory_11(struct domain *d, struct kernel_info *kinfo,
+ const struct dt_device_node *node);
+void init_staticmem_pages(void);
+
+#else /* !CONFIG_STATIC_MEMORY */
+
+static inline void allocate_static_memory(struct domain *d,
+ struct kernel_info *kinfo,
+ const struct dt_device_node *node)
+{
+ ASSERT_UNREACHABLE();
+}
+
+static inline void assign_static_memory_11(struct domain *d,
+ struct kernel_info *kinfo,
+ const struct dt_device_node *node)
+{
+ ASSERT_UNREACHABLE();
+}
+
+static inline void init_staticmem_pages(void) {};
+
+#endif /* CONFIG_STATIC_MEMORY */
+
+#endif /* __ASM_GENERIC_STATIC_MEMORY_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
Except moving Arm's static-memory.h to asm-generic #ifdef header guard is updated: s/__ASM_STATIC_MEMORY_H_/__ASM_GENERIC_STATIC_MEMORY_H__. Update arm/include/asm/Makefile to use asm-generic version of static-memory.h for Arm. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/static-memory.h | 58 ------------------------ xen/include/asm-generic/static-memory.h | 58 ++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 58 deletions(-) delete mode 100644 xen/arch/arm/include/asm/static-memory.h create mode 100644 xen/include/asm-generic/static-memory.h