[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v4 1/2] include/plat: Move plat/common/include/memory.h to include/uk/plat/common/



Hi Costin

On 2019/10/22 23:30, Costin Lupu wrote:
Hi Jia He,

I'm not sure high critical this is for you. Is it a blocking issue?

This solution does not fix the problem. newlib's `memory.h` header
should not be visible for platform internal code at all. We should
remove this patch from the series and if it is a blocking issue for you
then we (NEC/UPB) should provide the right solution.

Ok, I will drop the 1/2 patch

---
Cheers,
Justin (Jia He)


Cheers,
Costin

On 10/22/19 9:17 AM, Jia He wrote:
When I enable newlibc, there is a compilation warning:
plat/common/memory.c: In function 'ukplat_memallocator_set':
plat/common/memory.c:49:2: warning: implicit declaration of function
'_ukplat_mem_mappings_init'; did you mean 'ukplat_memregion_get'?
[-Wimplicit-function-declaration]
   _ukplat_mem_mappings_init();
   ^~~~~~~~~~~~~~~~~~~~~~~~~
   ukplat_memregion_get

The root cause is there is a memory.h under newlibc including directory:
./build/libnewlibc/origin/newlib-2.5.0.20170922/newlib/libc/include/memory.h

This fixes it by moving plat/common/include/memory.h to another
directory.

Signed-off-by: Jia He <justin.he@xxxxxxx>
---
v3: Fixes it by moving to another directory

  {plat/common/include => include/uk/plat/common}/memory.h | 6 +++---
  plat/common/memory.c                                     | 2 +-
  2 files changed, 4 insertions(+), 4 deletions(-)
  rename {plat/common/include => include/uk/plat/common}/memory.h (95%)

diff --git a/plat/common/include/memory.h b/include/uk/plat/common/memory.h
similarity index 95%
rename from plat/common/include/memory.h
rename to include/uk/plat/common/memory.h
index f627348..dc1a64e 100644
--- a/plat/common/include/memory.h
+++ b/include/uk/plat/common/memory.h
@@ -32,8 +32,8 @@
   * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
   */
-#ifndef __PLAT_CMN_MEMORY_H__
-#define __PLAT_CMN_MEMORY_H__
+#ifndef __UK_PLAT_CMN_MEMORY_H__
+#define __UK_PLAT_CMN_MEMORY_H__
/**
   * Initializes the platform memory mappings which require an allocator. This
@@ -44,4 +44,4 @@
   */
  int _ukplat_mem_mappings_init(void);
-#endif /* __PLAT_CMN_MEMORY_H__ */
+#endif /* __UK_PLAT_CMN_MEMORY_H__ */
diff --git a/plat/common/memory.c b/plat/common/memory.c
index 30983a7..4da916c 100644
--- a/plat/common/memory.c
+++ b/plat/common/memory.c
@@ -32,8 +32,8 @@
   * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
   */
+#include <uk/plat/common/memory.h>
  #include <uk/plat/memory.h>
-#include <memory.h>
static struct uk_alloc *plat_allocator;
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.