[0/5] add s390 support to nolibc and rcutorture

Message ID 20221209141939.3634586-1-svens@linux.ibm.com
Headers
Series add s390 support to nolibc and rcutorture |

Message

Sven Schnelle Dec. 9, 2022, 2:19 p.m. UTC
  Hi,

these patches add support for the s390 architecture both to nolibc
and rcutorture. Note that this only adds support for the 64 bit
version, no support for 31 bit (compat) is added. For nolibc it
includes one bugfix to make the fd_set datatype match the kernel
type.

Sven Schnelle (5):
  nolibc: fix fd_set type
  nolibc: add support for s390
  selftests/nolibc: add s390 support
  rcutorture: add support for s390
  rcutorture: build initrd for rcutorture with nolibc

 tools/include/nolibc/arch-s390.h              | 213 ++++++++++++++++++
 tools/include/nolibc/arch.h                   |   2 +
 tools/include/nolibc/sys.h                    |   2 +
 tools/include/nolibc/types.h                  |  53 +++--
 tools/testing/selftests/nolibc/Makefile       |   4 +
 .../selftests/rcutorture/bin/functions.sh     |   6 +
 .../selftests/rcutorture/bin/mkinitrd.sh      |   2 +-
 7 files changed, 258 insertions(+), 24 deletions(-)
 create mode 100644 tools/include/nolibc/arch-s390.h
  

Comments

Paul E. McKenney Dec. 9, 2022, 3:03 p.m. UTC | #1
On Fri, Dec 09, 2022 at 03:19:34PM +0100, Sven Schnelle wrote:
> Hi,
> 
> these patches add support for the s390 architecture both to nolibc
> and rcutorture. Note that this only adds support for the 64 bit
> version, no support for 31 bit (compat) is added. For nolibc it
> includes one bugfix to make the fd_set datatype match the kernel
> type.

Nice!!!

The rcutorture patches look plausible to me, but I must defer to Willy
Tarreau on the nolibc changes.

							Thanx, Paul

> Sven Schnelle (5):
>   nolibc: fix fd_set type
>   nolibc: add support for s390
>   selftests/nolibc: add s390 support
>   rcutorture: add support for s390
>   rcutorture: build initrd for rcutorture with nolibc
> 
>  tools/include/nolibc/arch-s390.h              | 213 ++++++++++++++++++
>  tools/include/nolibc/arch.h                   |   2 +
>  tools/include/nolibc/sys.h                    |   2 +
>  tools/include/nolibc/types.h                  |  53 +++--
>  tools/testing/selftests/nolibc/Makefile       |   4 +
>  .../selftests/rcutorture/bin/functions.sh     |   6 +
>  .../selftests/rcutorture/bin/mkinitrd.sh      |   2 +-
>  7 files changed, 258 insertions(+), 24 deletions(-)
>  create mode 100644 tools/include/nolibc/arch-s390.h
> 
> -- 
> 2.34.1
>
  
Willy Tarreau Dec. 9, 2022, 3:28 p.m. UTC | #2
On Fri, Dec 09, 2022 at 07:03:25AM -0800, Paul E. McKenney wrote:
> On Fri, Dec 09, 2022 at 03:19:34PM +0100, Sven Schnelle wrote:
> > Hi,
> > 
> > these patches add support for the s390 architecture both to nolibc
> > and rcutorture. Note that this only adds support for the 64 bit
> > version, no support for 31 bit (compat) is added. For nolibc it
> > includes one bugfix to make the fd_set datatype match the kernel
> > type.
> 
> Nice!!!

indeed :-)

> The rcutorture patches look plausible to me, but I must defer to Willy
> Tarreau on the nolibc changes.

I had a very quick glance over them and nothing shocked me. I just want
to double-check the u32->long conversion with a careful eye but I'm happy
to see that your rcutorture binary continues its diet on more and more
architectures ;-)

Cheers,
Willy
  
Paul E. McKenney Dec. 10, 2022, 1:26 a.m. UTC | #3
On Fri, Dec 09, 2022 at 04:28:35PM +0100, Willy Tarreau wrote:
> On Fri, Dec 09, 2022 at 07:03:25AM -0800, Paul E. McKenney wrote:
> > On Fri, Dec 09, 2022 at 03:19:34PM +0100, Sven Schnelle wrote:
> > > Hi,
> > > 
> > > these patches add support for the s390 architecture both to nolibc
> > > and rcutorture. Note that this only adds support for the 64 bit
> > > version, no support for 31 bit (compat) is added. For nolibc it
> > > includes one bugfix to make the fd_set datatype match the kernel
> > > type.
> > 
> > Nice!!!
> 
> indeed :-)
> 
> > The rcutorture patches look plausible to me, but I must defer to Willy
> > Tarreau on the nolibc changes.
> 
> I had a very quick glance over them and nothing shocked me. I just want
> to double-check the u32->long conversion with a careful eye but I'm happy
> to see that your rcutorture binary continues its diet on more and more
> architectures ;-)

Very good, and I will await your review.

							Thanx, Paul
  
Willy Tarreau Dec. 10, 2022, 9:12 a.m. UTC | #4
On Fri, Dec 09, 2022 at 05:26:43PM -0800, Paul E. McKenney wrote:
> On Fri, Dec 09, 2022 at 04:28:35PM +0100, Willy Tarreau wrote:
> > On Fri, Dec 09, 2022 at 07:03:25AM -0800, Paul E. McKenney wrote:
> > > On Fri, Dec 09, 2022 at 03:19:34PM +0100, Sven Schnelle wrote:
> > > > Hi,
> > > > 
> > > > these patches add support for the s390 architecture both to nolibc
> > > > and rcutorture. Note that this only adds support for the 64 bit
> > > > version, no support for 31 bit (compat) is added. For nolibc it
> > > > includes one bugfix to make the fd_set datatype match the kernel
> > > > type.
> > > 
> > > Nice!!!
> > 
> > indeed :-)
> > 
> > > The rcutorture patches look plausible to me, but I must defer to Willy
> > > Tarreau on the nolibc changes.
> > 
> > I had a very quick glance over them and nothing shocked me. I just want
> > to double-check the u32->long conversion with a careful eye but I'm happy
> > to see that your rcutorture binary continues its diet on more and more
> > architectures ;-)
> 
> Very good, and I will await your review.

So overall the series looks good to me except one occurrence of "s390x"
instead of "s390" in arch.h which will prevent the build from working
with the old "-include nolibc.h" mode. If Sven agrees we can fix it
directly in the patch (drop the 'x' in the "#include") so that he does
not need to respin the series. I'm deferring to you the final word on
the part on rcutorture (but it looks trivially correct to me).

Thanks!
Willy