[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux syst
|
From: |
Richard Henderson |
|
Subject: |
Re: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems |
|
Date: |
Tue, 22 Mar 2022 07:05:05 -0700 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 3/21/22 10:20, Khem Raj wrote:
linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures
which include asm-generic/mman.h and mips/powerpc are not including this
file in linux/mman.h, therefore these should be defined for such
architectures on Linux as well.
This is not precisely correct.
MAP_SHARED_VALIDATE is defined in <linux/mman.h> for all architectures.
MAP_SYNC is defined in <asm-generic/mman-common.h>, which is included by powerpc
<asm/mman.h>. But you are correct that this is missing for mips.
@@ -10,14 +10,18 @@
* later. See the COPYING file in the top-level directory.
*/
+#include "qemu/osdep.h"
#ifdef CONFIG_LINUX
#include <linux/mman.h>
-#else /* !CONFIG_LINUX */
+#endif /* CONFIG_LINUX */
+
+#ifndef MAP_SYNC
#define MAP_SYNC 0x0
+#endif /* MAP_SYNC */
+#ifndef MAP_SHARED_VALIDATE
#define MAP_SHARED_VALIDATE 0x0
-#endif /* CONFIG_LINUX */
+#endif /* MAP_SHARED_VALIDATE */
-#include "qemu/osdep.h"
The patch is correct, just need to fix the description.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~