From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 7172D388A400 for ; Fri, 23 Apr 2021 14:36:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7172D388A400 Received: by mail-oi1-x22d.google.com with SMTP id u80so15777921oia.0 for ; Fri, 23 Apr 2021 07:36:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AF88FPZjFMvw1Px3qmnLz9cyrVsccPohH5Wt2Nwvie4=; b=rtAd1h+H6Ki2UBqTV/zjzdZ2drrX7Op+nMfseZoqE1zK3X0vf385kWd3uvee9n5Gfi 0qaYmuW8XrWOHacJ+UAOZ+blK0EMkZPFrvUwnVX4ocLaHZM0+dFTfk51C6H8hlAnYCua GXTn5wVEpB23/UYKY0SKOzu9YjAcloW8Yqg885VKwImvqsX561Yf668LrOxAfaXAYS00 7z7/uFJAFrAbD7xqOMwj87xiDqOQo0IylEhYAyUJ0H+uh8FyHI1u+9J2vsOFA+pT/TCE Ju77lbnWLhjf43RaIy5Jz4h2pXCHoAtleqxTsReujwhVuYeWeeu5B5X6tzTKbGrSbuAt lQiw== X-Gm-Message-State: AOAM533gAr9hcAi6Ix/xi26ZMS7bAjZuQVL4jVH2v6m3wOKK6lP2z8yJ eVnOp+w7lM8MArC/mKRtb4vUerqvm4gChPEtCWA= X-Google-Smtp-Source: ABdhPJw0HsOA68wgRDQf2ysYxo+curjg2zRf1hwB1C708Ev09rSUOP7z3oKEAKp3soYPRTUTLMSV0mBlro6GFEUdKDI= X-Received: by 2002:aca:5904:: with SMTP id n4mr4202121oib.25.1619188611922; Fri, 23 Apr 2021 07:36:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "H.J. Lu" Date: Fri, 23 Apr 2021 07:36:15 -0700 Message-ID: Subject: Re: [PATCH 0/4] nptl: Move spinlock symbols into libc To: Florian Weimer Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3028.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 14:36:54 -0000 On Fri, Apr 23, 2021 at 7:23 AM Florian Weimer via Libc-alpha wrote: > > This is slightly more complicated than usual because there are many C > and assembler implementations of the spinlock functions. > > Full consolidation in a single C implementation is not possible because > the algorithm is subtly different, and PTHREAD_SPINLOCK_INITIALIZER > varies. I did not try to simplify this, but instead patched all the > different implementations. > > Tested on i686-linux-gnu, powerpc64le-linux-gnu, x86_64-linux-gnu. > Built with build-many-glibcs.py, both with defaults and with binutils > 2.33 and GCC 9. > > Florian Weimer (4): > nptl: Move pthread_spin_destroy into libc > nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc > nptl: Move pthread_spin_lock into libc > nptl: Move pthread_spin_trylock into libc > > nptl/Makefile | 10 ++++----- > nptl/Versions | 15 ++++++++----- > nptl/pthread_spin_destroy.c | 11 ++++++++-- > nptl/pthread_spin_init.c | 8 ++++++- > nptl/pthread_spin_lock.c | 8 ++++++- > nptl/pthread_spin_trylock.c | 10 ++++++++- > nptl/pthread_spin_unlock.c | 10 ++++++++- > sysdeps/alpha/nptl/pthread_spin_lock.S | 14 +++++++++---- > sysdeps/alpha/nptl/pthread_spin_trylock.S | 16 ++++++++++---- > sysdeps/hppa/nptl/pthread_spin_init.c | 10 ++++++++- > sysdeps/hppa/nptl/pthread_spin_unlock.c | 10 ++++++++- > sysdeps/i386/nptl/pthread_spin_lock.S | 10 +++++++-- > sysdeps/i386/nptl/pthread_spin_unlock.S | 16 +++++++++----- > sysdeps/i386/pthread_spin_trylock.S | 13 +++++++++--- > sysdeps/ia64/nptl/pthread_spin_lock.c | 10 ++++++++- > sysdeps/ia64/nptl/pthread_spin_trylock.c | 10 ++++++++- > sysdeps/ia64/nptl/pthread_spin_unlock.c | 11 ++++++++-- > sysdeps/powerpc/nptl/pthread_spin_lock.c | 8 ++++++- > sysdeps/powerpc/nptl/pthread_spin_trylock.c | 10 ++++++++- > sysdeps/powerpc/nptl/pthread_spin_unlock.c | 10 ++++++++- > sysdeps/sh/nptl/pthread_spin_lock.c | 8 ++++++- > sysdeps/sh/nptl/pthread_spin_trylock.S | 16 ++++++++++---- > sysdeps/sh/nptl/pthread_spin_unlock.S | 21 ++++++++++++------- > sysdeps/sparc/sparc32/pthread_spin_lock.S | 10 +++++++-- > sysdeps/sparc/sparc32/pthread_spin_trylock.S | 12 +++++++++-- > sysdeps/sparc/sparc64/pthread_spin_lock.S | 10 +++++++-- > sysdeps/sparc/sparc64/pthread_spin_trylock.S | 12 +++++++++-- > sysdeps/sparc/sparc64/pthread_spin_unlock.S | 14 ++++++++++--- > sysdeps/unix/sysv/linux/aarch64/libc.abilist | 10 +++++++++ > .../sysv/linux/aarch64/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/alpha/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/alpha/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/arc/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/arc/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/arm/be/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/arm/be/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/arm/le/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/arm/le/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/csky/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/csky/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/hppa/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/hppa/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/i386/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/i386/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/ia64/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/ia64/libpthread.abilist | 5 ----- > .../sysv/linux/m68k/coldfire/libc.abilist | 10 +++++++++ > .../linux/m68k/coldfire/libpthread.abilist | 5 ----- > .../unix/sysv/linux/m68k/m680x0/libc.abilist | 10 +++++++++ > .../sysv/linux/m68k/m680x0/libpthread.abilist | 5 ----- > .../sysv/linux/microblaze/be/libc.abilist | 10 +++++++++ > .../linux/microblaze/be/libpthread.abilist | 5 ----- > .../sysv/linux/microblaze/le/libc.abilist | 10 +++++++++ > .../linux/microblaze/le/libpthread.abilist | 5 ----- > .../sysv/linux/mips/mips32/fpu/libc.abilist | 10 +++++++++ > .../sysv/linux/mips/mips32/libpthread.abilist | 5 ----- > .../sysv/linux/mips/mips32/nofpu/libc.abilist | 10 +++++++++ > .../sysv/linux/mips/mips64/libpthread.abilist | 5 ----- > .../sysv/linux/mips/mips64/n32/libc.abilist | 10 +++++++++ > .../sysv/linux/mips/mips64/n64/libc.abilist | 10 +++++++++ > sysdeps/unix/sysv/linux/nios2/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/nios2/libpthread.abilist | 5 ----- > .../linux/powerpc/powerpc32/fpu/libc.abilist | 10 +++++++++ > .../powerpc/powerpc32/libpthread.abilist | 5 ----- > .../powerpc/powerpc32/nofpu/libc.abilist | 10 +++++++++ > .../linux/powerpc/powerpc64/be/libc.abilist | 10 +++++++++ > .../powerpc/powerpc64/be/libpthread.abilist | 5 ----- > .../linux/powerpc/powerpc64/le/libc.abilist | 10 +++++++++ > .../powerpc/powerpc64/le/libpthread.abilist | 5 ----- > .../unix/sysv/linux/riscv/rv32/libc.abilist | 10 +++++++++ > .../sysv/linux/riscv/rv32/libpthread.abilist | 5 ----- > .../unix/sysv/linux/riscv/rv64/libc.abilist | 10 +++++++++ > .../sysv/linux/riscv/rv64/libpthread.abilist | 5 ----- > .../unix/sysv/linux/s390/s390-32/libc.abilist | 10 +++++++++ > .../linux/s390/s390-32/libpthread.abilist | 5 ----- > .../unix/sysv/linux/s390/s390-64/libc.abilist | 10 +++++++++ > .../linux/s390/s390-64/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/sh/be/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/sh/be/libpthread.abilist | 5 ----- > sysdeps/unix/sysv/linux/sh/le/libc.abilist | 10 +++++++++ > .../unix/sysv/linux/sh/le/libpthread.abilist | 5 ----- > .../sysv/linux/sparc/sparc32/libc.abilist | 10 +++++++++ > .../linux/sparc/sparc32/libpthread.abilist | 5 ----- > .../sysv/linux/sparc/sparc64/libc.abilist | 10 +++++++++ > .../linux/sparc/sparc64/libpthread.abilist | 5 ----- > .../unix/sysv/linux/x86_64/64/libc.abilist | 10 +++++++++ > .../sysv/linux/x86_64/64/libpthread.abilist | 5 ----- > .../unix/sysv/linux/x86_64/x32/libc.abilist | 10 +++++++++ > .../sysv/linux/x86_64/x32/libpthread.abilist | 5 ----- > sysdeps/x86_64/nptl/pthread_spin_lock.S | 10 +++++++-- > sysdeps/x86_64/nptl/pthread_spin_trylock.S | 13 +++++++++--- > sysdeps/x86_64/nptl/pthread_spin_unlock.S | 16 +++++++++----- > 92 files changed, 606 insertions(+), 221 deletions(-) > > -- > 2.30.2 > All patches look good to me. Thanks. -- H.J.