All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Mike Frysinger <vapier@gentoo.org>,
	qemu-devel@nongnu.org, Riku Voipio <riku.voipio@iki.fi>
Cc: samuel.thibault@ens-lyon.org
Subject: Re: [Qemu-devel] [PATCH v2] linux-user: make getcpu optional
Date: Sat, 17 Feb 2018 11:35:30 +0100	[thread overview]
Message-ID: <1d0dedd8-4f7e-4b8b-1c69-c581852c95b2@vivier.eu> (raw)
In-Reply-To: <20180217020230.1759-1-vapier@gentoo.org>

Le 17/02/2018 à 03:02, Mike Frysinger a écrit :
> Not all arches implement this, and the kernel doesn't require them to.
> Add ifdef logic to disable it when not available.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  linux-user/syscall.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 799c8e2800ea..a9904fac791f 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -290,8 +290,10 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len,
>  #define __NR_sys_sched_setaffinity __NR_sched_setaffinity
>  _syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len,
>            unsigned long *, user_mask_ptr);
> +#ifdef TARGET_NR_getcpu
>  #define __NR_sys_getcpu __NR_getcpu
>  _syscall3(int, sys_getcpu, unsigned *, cpu, unsigned *, node, void *, tcache);
> +#endif

I didn't find any arch that doesn't have it in linux-user/*/syscall_nr.h
Which arches are you speaking about?

As it can be also undefined for the host arch, you should use:

    #if defined(TARGET_NR_getcpu) && defined(__NR_getcpu)

Thanks,
Laurent

      reply	other threads:[~2018-02-17 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17  2:01 [Qemu-devel] [PATCH] linux-user: make getcpu optional Mike Frysinger
2018-02-17  2:02 ` [Qemu-devel] [PATCH v2] " Mike Frysinger
2018-02-17 10:35   ` Laurent Vivier [this message]

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=1d0dedd8-4f7e-4b8b-1c69-c581852c95b2@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=vapier@gentoo.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.