mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
device-tree: Move Arm's static-memory feature to common
This feature is arch agnostic, thus move it to common. While at it, move xen/pfn.h inclusion in static-memory.h below #ifdef CONFIG_STATIC_MEMORY when it is only needed. Signed-off-by: Michal Orzel <michal.orzel@amd.com> Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
9b29c4ad0b
commit
3e027c2732
9 files changed
+12
-15
No files matched your search
@@ -51,7 +51,6 @@ obj-y += setup.o
|
||||
obj-y += shutdown.o
|
||||
obj-y += smp.o
|
||||
obj-y += smpboot.o
|
||||
obj-$(CONFIG_STATIC_MEMORY) += static-memory.init.o
|
||||
obj-$(CONFIG_STATIC_SHM) += static-shmem.init.o
|
||||
obj-y += sysctl.o
|
||||
obj-y += time.o
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#include <xen/mm.h>
|
||||
#include <xen/param.h>
|
||||
#include <xen/pfn.h>
|
||||
#include <xen/static-memory.h>
|
||||
#include <asm/fixmap.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/static-memory.h>
|
||||
#include <asm/static-shmem.h>
|
||||
|
||||
static unsigned long opt_xenheap_megabytes __initdata;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include <xen/llc-coloring.h>
|
||||
#include <xen/mm.h>
|
||||
#include <xen/pfn.h>
|
||||
#include <xen/static-memory.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/static-memory.h>
|
||||
#include <asm/static-shmem.h>
|
||||
|
||||
/* Override macros from asm/page.h to make them work with mfn_t */
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <xen/sched.h>
|
||||
#include <xen/serial.h>
|
||||
#include <xen/sizes.h>
|
||||
#include <xen/static-memory.h>
|
||||
#include <xen/vmap.h>
|
||||
|
||||
#include <public/bootfdt.h>
|
||||
@@ -22,7 +23,6 @@
|
||||
#include <asm/domain_build.h>
|
||||
#include <asm/grant_table.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/static-memory.h>
|
||||
#include <asm/static-shmem.h>
|
||||
|
||||
#ifdef CONFIG_VGICV2
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <xen/libfdt/libfdt.h>
|
||||
#include <xen/rangeset.h>
|
||||
#include <xen/sched.h>
|
||||
#include <xen/static-memory.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/static-memory.h>
|
||||
#include <asm/static-shmem.h>
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -7,3 +7,4 @@ obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
|
||||
obj-y += intc.o
|
||||
obj-$(CONFIG_DOMAIN_BUILD_HELPERS) += kernel.o
|
||||
obj-$(CONFIG_STATIC_EVTCHN) += static-evtchn.init.o
|
||||
obj-$(CONFIG_STATIC_MEMORY) += static-memory.init.o
|
||||
@@ -28,9 +28,7 @@
|
||||
#include <asm/dom0less-build.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
#if __has_include(<asm/static-memory.h>)
|
||||
# include <asm/static-memory.h>
|
||||
#endif
|
||||
#include <xen/static-memory.h>
|
||||
|
||||
#if __has_include(<asm/static-shmem.h>)
|
||||
# include <asm/static-shmem.h>
|
||||
@@ -799,12 +797,10 @@ static int __init construct_domU(struct domain *d,
|
||||
{
|
||||
if ( !dt_find_property(node, "xen,static-mem", NULL) )
|
||||
allocate_memory(d, &kinfo);
|
||||
#ifdef CONFIG_STATIC_MEMORY
|
||||
else if ( !is_domain_direct_mapped(d) )
|
||||
allocate_static_memory(d, &kinfo, node);
|
||||
else
|
||||
assign_static_memory_11(d, &kinfo, node);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STATIC_SHM
|
||||
rc = process_shm(d, &kinfo, node);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <xen/sched.h>
|
||||
#include <xen/static-memory.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/static-memory.h>
|
||||
|
||||
static bool __init append_static_memory_to_bank(struct domain *d,
|
||||
struct membank *bank,
|
||||
@@ -1,13 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef __ASM_STATIC_MEMORY_H_
|
||||
#define __ASM_STATIC_MEMORY_H_
|
||||
#ifndef XEN_STATIC_MEMORY_H
|
||||
#define XEN_STATIC_MEMORY_H
|
||||
|
||||
#include <xen/fdt-kernel.h>
|
||||
#include <xen/pfn.h>
|
||||
|
||||
#ifdef CONFIG_STATIC_MEMORY
|
||||
|
||||
#include <xen/pfn.h>
|
||||
|
||||
static inline void init_staticmem_bank(const struct membank *bank)
|
||||
{
|
||||
mfn_t bank_start = _mfn(PFN_UP(bank->start));
|
||||
@@ -46,7 +47,7 @@ static inline void init_staticmem_pages(void) {};
|
||||
|
||||
#endif /* CONFIG_STATIC_MEMORY */
|
||||
|
||||
#endif /* __ASM_STATIC_MEMORY_H_ */
|
||||
#endif /* XEN_STATIC_MEMORY_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||