qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Zhang Yi <yi.z.zhang@linux.intel.com>,
	qemu-mips@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems
Date: Tue, 22 Mar 2022 11:53:14 -0400	[thread overview]
Message-ID: <20220322115249-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220322154658.1687620-1-raj.khem@gmail.com>

On Tue, Mar 22, 2022 at 08:46:58AM -0700, Khem Raj wrote:
> linux only wires MAP_SYNC for architectures which include
> asm-generic/mman-common.h and mips is one such architecture which is not
> including this file via linux/mman.h, therefore as a fall back
> these constants should be defined for such architectures on Linux
> as well.
> 
> This fixes build on mips/musl/linux
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Zhang Yi <yi.z.zhang@linux.intel.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

who's merging this? mips tree?

> ---
> v2: Improve commit message
> 
>  util/mmap-alloc.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
> index 893d864354..86d3cda248 100644
> --- a/util/mmap-alloc.c
> +++ b/util/mmap-alloc.c
> @@ -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"
>  #include "qemu/mmap-alloc.h"
>  #include "qemu/host-utils.h"
>  #include "qemu/cutils.h"
> -- 
> 2.35.1



  reply	other threads:[~2022-03-22 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 15:46 [PATCH v2] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems Khem Raj
2022-03-22 15:53 ` Michael S. Tsirkin [this message]
2022-03-22 16:24 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220322115249-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-mips@nongnu.org \
    --cc=raj.khem@gmail.com \
    --cc=yi.z.zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).