[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update agai
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1 |
Date: |
Thu, 23 May 2019 14:58:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/23/19 2:30 PM, Laurent Vivier wrote:
> On 23/05/2019 13:56, Cornelia Huck wrote:
>> On Wed, 22 May 2019 15:22:23 +0200
>> Aleksandar Markovic <address@hidden> wrote:
>>
>>> The alternative way of invoking via IPCV6 (else part of “ifdef
>>> __NR_MSGSND”) should work for MIPS in the present stage of headers and
>>> kernel.
>>
>> I tried to do that so that we have at least a workaround for now; but
>> this fails building on my x86 laptop (the safe_syscall6 for ipc
>> complains about missing __NR_ipc). Maybe I'm holding it wrong (should
>> that be conditional on the host?), but I think that really needs to be
>> done by the mips maintainers...
>>
>
> Perhaps a simple workaround could be:
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index e311fcda0517..5b431736032c 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -761,14 +761,8 @@ safe_syscall2(int, nanosleep, const struct timespec *,
> req,
> safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags,
> const struct timespec *, req, struct timespec *, rem)
> #endif
> -#ifdef __NR_msgsnd
> -safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz,
> - int, flags)
> -safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz,
> - long, msgtype, int, flags)
> -safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,
> - unsigned, nsops, const struct timespec *, timeout)
> -#else
> +
> +#ifdef __NR_ipc
> /* This host kernel architecture uses a single ipc syscall; fake up
> * wrappers for the sub-operations to hide this implementation detail.
> * Annoyingly we can't include linux/ipc.h to get the constant definitions
> @@ -783,14 +777,30 @@ safe_syscall4(int, semtimedop, int, semid, struct
> sembuf *, tsops,
>
> safe_syscall6(int, ipc, int, call, long, first, long, second, long, third,
> void *, ptr, long, fifth)
> +#endif
> +
> +#ifdef __NR_msgsnd
> +safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz,
> + int, flags)
> +#else
> static int safe_msgsnd(int msgid, const void *msgp, size_t sz, int flags)
> {
> return safe_ipc(Q_IPCCALL(0, Q_MSGSND), msgid, sz, flags, (void *)msgp,
> 0);
> }
> +#endif
> +#ifdef __NR_msgrcv
> +safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz,
> + long, msgtype, int, flags)
> +#else
> static int safe_msgrcv(int msgid, void *msgp, size_t sz, long type, int
> flags)
> {
> return safe_ipc(Q_IPCCALL(1, Q_MSGRCV), msgid, sz, flags, msgp, type);
> }
> +#endif
> +#ifdef __NR_semtimedop
> +safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,
> + unsigned, nsops, const struct timespec *, timeout)
> +#else
> static int safe_semtimedop(int semid, struct sembuf *tsops, unsigned nsops,
> const struct timespec *timeout)
> {
>
Works for me!
I have no idea if this is the proper fix, but this fix my test setup.
Can you send a proper patch?
Thanks :)
Phil.
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, (continued)
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Laurent Vivier, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Cornelia Huck, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Alex Bennée, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Aleksandar Markovic, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Aleksandar Markovic, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Alex Bennée, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Cornelia Huck, 2019/05/22
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Aleksandar Markovic, 2019/05/23
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Cornelia Huck, 2019/05/23
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Laurent Vivier, 2019/05/23
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1,
Philippe Mathieu-Daudé <=
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Alex Bennée, 2019/05/23
- Re: [qemu-s390x] [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1, Laurent Vivier, 2019/05/23
Re: [qemu-s390x] [PULL v3 00/55] s390x update, Peter Maydell, 2019/05/21