And remove nested declaration.
Signed-off-by: Andrea Bastoni <[email protected]>
---
hypervisor/include/jailhouse/paging.h | 3 +++
hypervisor/include/jailhouse/percpu.h | 3 +--
hypervisor/paging.c | 2 --
hypervisor/setup.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hypervisor/include/jailhouse/paging.h
b/hypervisor/include/jailhouse/paging.h
index 5513c4ec..8a6ff374 100644
--- a/hypervisor/include/jailhouse/paging.h
+++ b/hypervisor/include/jailhouse/paging.h
@@ -53,6 +53,9 @@
* @{
*/
+/** Global page pool */
+extern u8 __page_pool[];
+
/** Page pool state. */
struct page_pool {
/** Base address of the pool. */
diff --git a/hypervisor/include/jailhouse/percpu.h
b/hypervisor/include/jailhouse/percpu.h
index 344ed65f..4f0867da 100644
--- a/hypervisor/include/jailhouse/percpu.h
+++ b/hypervisor/include/jailhouse/percpu.h
@@ -19,6 +19,7 @@
* The per-CPU subsystem provides a CPU-local state structure and accessors.
*/
+#include <jailhouse/paging.h>
#include <jailhouse/cell.h>
#include <asm/percpu.h>
@@ -132,8 +133,6 @@ static inline struct cell *this_cell(void)
*/
static inline struct per_cpu *per_cpu(unsigned int cpu)
{
- extern u8 __page_pool[];
-
return (struct per_cpu *)(__page_pool + cpu * sizeof(struct per_cpu));
}
diff --git a/hypervisor/paging.c b/hypervisor/paging.c
index 876f1521..75d5da59 100644
--- a/hypervisor/paging.c
+++ b/hypervisor/paging.c
@@ -21,8 +21,6 @@
#define PAGE_SCRUB_ON_FREE 0x1
-extern u8 __page_pool[];
-
/**
* Offset between virtual and physical hypervisor addresses.
*
diff --git a/hypervisor/setup.c b/hypervisor/setup.c
index 9f651aec..6f4e22c5 100644
--- a/hypervisor/setup.c
+++ b/hypervisor/setup.c
@@ -22,7 +22,7 @@
#include <generated/version.h>
#include <asm/spinlock.h>
-extern u8 __text_start[], __page_pool[];
+extern u8 __text_start[];
static const __attribute__((aligned(PAGE_SIZE))) u8 empty_page[PAGE_SIZE];
--
2.28.0
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/20201022175826.199614-3-andrea.bastoni%40tum.de.