public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Vincent Chen <vincentc@andestech.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH 08/11] nds32: Linux ABI
Date: Wed, 09 May 2018 13:34:00 -0000	[thread overview]
Message-ID: <20180509133428.GA17885@andestech.com> (raw)
In-Reply-To: <4faf3336-84ca-63ab-68a3-e30afe417a20@linaro.org>

On Wed, May 09, 2018 at 05:18:41AM +0800, Adhemerval Zanella wrote:
> 
> 
> On 06/05/2018 11:41, vincentc wrote:
> > diff --git a/sysdeps/unix/sysv/linux/nds32/ipc_priv.h b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
> > new file mode 100644
> > index 0000000..e0732b9
> > --- /dev/null
> > +++ b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
> > @@ -0,0 +1,22 @@
> > +/* Old SysV permission definition for Linux, Andes nds32 version.
> > +   Copyright (C) 2018 Free Software Foundation, Inc.
> > +   This file is part of the GNU C Library.
> > +
> > +   The GNU C Library is free software; you can redistribute it and/or
> > +   modify it under the terms of the GNU Lesser General Public
> > +   License as published by the Free Software Foundation; either
> > +   version 2.1 of the License, or (at your option) any later version.
> > +
> > +   The GNU C Library is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > +   Lesser General Public License for more details.
> > +
> > +   You should have received a copy of the GNU Lesser General Public
> > +   License along with the GNU C Library; if not, see
> > +   <http://www.gnu.org/licenses/>.  */
> > +
> > +#include <sys/ipc.h>  /* For __key_t.  */
> > +
> > +#define __IPC_64	0x0
> > +
> 
> My understanding was generic uapi for Linux expects IPC_64 being 0x100 for
> newer ports, but seems for recent ones that 0x0 is the expect values.  Is
> the case or NDS32 is a outlier? 
>


For new ports of Linux, only new IPC version is supported. Therefore, kernel
does not identify the IPC version by __IPC_64 flag. Unfortunately, kernel also 
skip the code for removing __IPC_64 flag from cmd. Therefore, -EINVAL is returned
if __IPC_64 is set. To solve this problem, we set __IPC_64 as 0x0 instead of
0x100.

 
> > diff --git a/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h b/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h
> > new file mode 100644
> > index 0000000..d7fab19
> > --- /dev/null
> > +++ b/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h
> > @@ -0,0 +1,30 @@
> > +/* Define struct old_kernel_sigaction and kernel_sigaction for Andes nds32.
> > +   Copyright (C) 2006-2018 Free Software Foundation, Inc.
> > +   This file is part of the GNU C Library.
> > +
> > +   The GNU C Library is free software; you can redistribute it and/or
> > +   modify it under the terms of the GNU Lesser General Public
> > +   License as published by the Free Software Foundation; either
> > +   version 2.1 of the License, or (at your option) any later version.
> > +
> > +   The GNU C Library is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > +   Lesser General Public License for more details.
> > +
> > +   You should have received a copy of the GNU Lesser General Public
> > +   License along with the GNU C Library.  If not, see
> > +   <http://www.gnu.org/licenses/>.  */
> > +
> > +
> > +struct old_kernel_sigaction {
> > +	__sighandler_t k_sa_handler;
> > +	unsigned long sa_mask;
> > +	unsigned long sa_flags;
> > +};
> > +
> > +struct kernel_sigaction {
> > +	__sighandler_t k_sa_handler;
> > +	unsigned long sa_flags;
> > +	sigset_t sa_mask;
> > +};
> 
> The 'old_kernel_sigaction' is not used anywhere in glibc code and after
> sigaction consolidation (b4a5d26d8835d972995f0a0a2f805a8845bafa0b) the
> generic Linux kernel_sigactions.h should follow generic uapi.  It seems
> NDS32 follows this case, so are you sure you need a arch-specific
> version?

OK, we will remove it in the next version.

Thanks for your suggestions.

Best regards
Vincent Chen

  reply	other threads:[~2018-05-09 13:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06 14:41 [PATCH 00/11] nds32 glibc Port v1 vincentc
2018-05-06 14:42 ` [PATCH 10/11] Add Andes nds32 dynamic relocation type to elf/elf.h vincentc
2018-05-06 14:42 ` [PATCH 06/11] nds32: Atomic and Locking Routines vincentc
2018-05-06 14:42 ` [PATCH 03/11] nds32: Thread-Local Storage Support vincentc
2018-05-06 14:42 ` [PATCH 07/11] nds32: Linux Syscall Interface vincentc
2018-05-08 21:27   ` Adhemerval Zanella
2018-05-09 13:46     ` Vincent Chen
2018-05-09 13:57       ` Adhemerval Zanella
2018-05-10  2:58         ` Vincent Chen
2018-05-12  7:21           ` Florian Weimer
2018-05-14 21:11             ` Vincent Chen
2018-05-06 14:42 ` [PATCH 01/11] nds32: Build Infastructure vincentc
2018-05-08 14:49   ` Joseph Myers
2018-05-09  8:32     ` Vincent Chen
2018-05-06 14:42 ` [PATCH 04/11] nds32: Startup and Dynamic Loader vincentc
2018-05-06 14:42 ` [PATCH 11/11] Add nds32 entries to config.h.in vincentc
2018-05-06 14:42 ` [PATCH 09/11] nds32: Add ABI list vincentc
2018-05-06 14:42 ` [PATCH 02/11] nds32: ABI Implementation vincentc
2018-05-12  7:15   ` Florian Weimer
2018-05-14 20:56     ` Vincent Chen
2018-05-15 11:32       ` Florian Weimer
2018-05-15 11:50         ` Vincent Chen
2018-05-06 14:42 ` [PATCH 08/11] nds32: Linux ABI vincentc
2018-05-08 21:18   ` Adhemerval Zanella
2018-05-09 13:34     ` Vincent Chen [this message]
2018-05-09 13:42       ` Adhemerval Zanella
2018-05-06 14:42 ` [PATCH 05/11] nds32: Generic <math.h> and soft-fp Routines vincentc
2018-05-08 14:46 ` [PATCH 00/11] nds32 glibc Port v1 Joseph Myers
2018-05-09  5:22   ` Vincent Chen
2018-05-09 12:10     ` Joseph Myers
2018-05-09 13:49       ` Vincent Chen

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=20180509133428.GA17885@andestech.com \
    --to=vincentc@andestech.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).