From: Jan Kiszka <[email protected]>

No need to declare those prototypes and the enum twice.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm-common/include/asm/dcaches.h | 28 ++++++++++++++++++++++++
 hypervisor/arch/arm/include/asm/paging.h         |  9 +-------
 hypervisor/arch/arm64/include/asm/paging.h       | 10 +--------
 3 files changed, 30 insertions(+), 17 deletions(-)
 create mode 100644 hypervisor/arch/arm-common/include/asm/dcaches.h

diff --git a/hypervisor/arch/arm-common/include/asm/dcaches.h 
b/hypervisor/arch/arm-common/include/asm/dcaches.h
new file mode 100644
index 00000000..73c2722e
--- /dev/null
+++ b/hypervisor/arch/arm-common/include/asm/dcaches.h
@@ -0,0 +1,28 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) ARM Limited, 2014
+ * Copyright (c) Siemens AG, 2017
+ *
+ * Authors:
+ *  Jean-Philippe Brucker <[email protected]>
+ *  Jan Kiszka <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ */
+
+#ifndef __ASSEMBLY__
+
+struct cell;
+
+enum dcache_flush {
+       DCACHE_CLEAN,
+       DCACHE_INVALIDATE,
+       DCACHE_CLEAN_AND_INVALIDATE,
+};
+
+void arm_dcaches_flush(void *addr, long size, enum dcache_flush flush);
+void arm_cell_dcaches_flush(struct cell *cell, enum dcache_flush flush);
+
+#endif /* !__ASSEMBLY__ */
diff --git a/hypervisor/arch/arm/include/asm/paging.h 
b/hypervisor/arch/arm/include/asm/paging.h
index e6116a21..a7e58e18 100644
--- a/hypervisor/arch/arm/include/asm/paging.h
+++ b/hypervisor/arch/arm/include/asm/paging.h
@@ -15,6 +15,7 @@
 
 #include <jailhouse/types.h>
 #include <jailhouse/utils.h>
+#include <asm/dcaches.h>
 #include <asm/processor.h>
 #include <asm/sysregs.h>
 
@@ -175,12 +176,6 @@ struct paging_structures;
 
 typedef u64 *pt_entry_t;
 
-enum dcache_flush {
-       DCACHE_CLEAN,
-       DCACHE_INVALIDATE,
-       DCACHE_CLEAN_AND_INVALIDATE,
-};
-
 extern unsigned int cpu_parange;
 extern unsigned int cache_line_size;
 
@@ -189,8 +184,6 @@ void arm_paging_cell_destroy(struct cell *cell);
 
 void arm_paging_vcpu_init(struct paging_structures *pg_structs);
 
-void arm_dcaches_flush(void *addr, long size, enum dcache_flush flush);
-void arm_cell_dcaches_flush(struct cell *cell, enum dcache_flush flush);
 void arm_dcaches_clean_by_sw(void);
 
 static inline void arm_paging_vcpu_flush_tlbs(void)
diff --git a/hypervisor/arch/arm64/include/asm/paging.h 
b/hypervisor/arch/arm64/include/asm/paging.h
index 1d2ff061..0fe1429d 100644
--- a/hypervisor/arch/arm64/include/asm/paging.h
+++ b/hypervisor/arch/arm64/include/asm/paging.h
@@ -15,6 +15,7 @@
 
 #include <jailhouse/types.h>
 #include <jailhouse/utils.h>
+#include <asm/dcaches.h>
 #include <asm/processor.h>
 #include <asm/sysregs.h>
 
@@ -175,12 +176,6 @@ struct paging_structures;
 
 typedef u64 *pt_entry_t;
 
-enum dcache_flush {
-       DCACHE_CLEAN,
-       DCACHE_INVALIDATE,
-       DCACHE_CLEAN_AND_INVALIDATE,
-};
-
 extern unsigned int cpu_parange;
 
 /* return the bits supported for the physical address range for this
@@ -241,9 +236,6 @@ static inline unsigned int get_cpu_parange(void)
                                | (TCR_PS_CELL << TCR_PS_SHIFT)         \
                                | VTCR_RES1)
 
-void arm_dcaches_flush(void *addr, long size, enum dcache_flush flush);
-void arm_cell_dcaches_flush(struct cell *cell, enum dcache_flush flush);
-
 int arm_paging_cell_init(struct cell *cell);
 void arm_paging_cell_destroy(struct cell *cell);
 
-- 
2.12.3

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to