From owner-dev-commits-src-all@freebsd.org Thu Apr 8 10:18:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 184EF5D78BA; Thu, 8 Apr 2021 10:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FGHJx0rwdz4j6k; Thu, 8 Apr 2021 10:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 733F94FD; Thu, 8 Apr 2021 10:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 138AI7KH012751; Thu, 8 Apr 2021 10:18:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 138AI74p012750; Thu, 8 Apr 2021 10:18:07 GMT (envelope-from git) Date: Thu, 8 Apr 2021 10:18:07 GMT Message-Id: <202104081018.138AI74p012750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4d9488674f3a - main - Remove the last users of ARM_TP_ADDRESS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d9488674f3a36a2d12d11cad170cb1bd1c14a6d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 10:18:10 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4d9488674f3a36a2d12d11cad170cb1bd1c14a6d commit 4d9488674f3a36a2d12d11cad170cb1bd1c14a6d Author: Andrew Turner AuthorDate: 2021-04-07 10:29:03 +0000 Commit: Andrew Turner CommitDate: 2021-04-08 07:52:54 +0000 Remove the last users of ARM_TP_ADDRESS This was only needed on 32-bit arm prior to ARMv6. As we only support ARMv6 or later remove it. Reviewed by: mannu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D29624 --- lib/libc/arm/gen/__aeabi_read_tp.S | 10 ---------- lib/libc/arm/gen/_set_tp.c | 4 ---- lib/libc/arm/static_tls.h | 4 ---- lib/libthr/arch/arm/include/pthread_md.h | 8 -------- libexec/rtld-elf/arm/reloc.c | 14 -------------- 5 files changed, 40 deletions(-) diff --git a/lib/libc/arm/gen/__aeabi_read_tp.S b/lib/libc/arm/gen/__aeabi_read_tp.S index 224d6a632185..6229c951b344 100644 --- a/lib/libc/arm/gen/__aeabi_read_tp.S +++ b/lib/libc/arm/gen/__aeabi_read_tp.S @@ -31,18 +31,8 @@ __FBSDID("$FreeBSD$"); #include ENTRY(__aeabi_read_tp) -#ifdef ARM_TP_ADDRESS - ldr r0, .Larm_tp_address - ldr r0, [r0] -#else mrc p15, 0, r0, c13, c0, 3 -#endif RET END(__aeabi_read_tp) -#ifdef ARM_TP_ADDRESS -.Larm_tp_address: - .word ARM_TP_ADDRESS -#endif - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/arm/gen/_set_tp.c b/lib/libc/arm/gen/_set_tp.c index d0801d7444ba..1346ece5c9ef 100644 --- a/lib/libc/arm/gen/_set_tp.c +++ b/lib/libc/arm/gen/_set_tp.c @@ -38,9 +38,5 @@ void _set_tp(void *tp) { -#ifdef ARM_TP_ADDRESS - *((struct tcb **)ARM_TP_ADDRESS) = tp; -#else sysarch(ARM_SET_TP, tp); -#endif } diff --git a/lib/libc/arm/static_tls.h b/lib/libc/arm/static_tls.h index e6be9adfcff6..9f24cd4aae39 100644 --- a/lib/libc/arm/static_tls.h +++ b/lib/libc/arm/static_tls.h @@ -38,11 +38,7 @@ _libc_get_static_tls_base(size_t offset) { uintptr_t tlsbase; -#ifdef ARM_TP_ADDRESS - tlsbase = *(uintptr_t *)ARM_TP_ADDRESS; -#else __asm __volatile("mrc p15, 0, %0, c13, c0, 3" : "=r" (tlsbase)); -#endif tlsbase += offset; return (tlsbase); diff --git a/lib/libthr/arch/arm/include/pthread_md.h b/lib/libthr/arch/arm/include/pthread_md.h index 55d93d0853bc..6f99eb7a139b 100644 --- a/lib/libthr/arch/arm/include/pthread_md.h +++ b/lib/libthr/arch/arm/include/pthread_md.h @@ -54,11 +54,7 @@ struct tcb { static __inline void _tcb_set(struct tcb *tcb) { -#ifdef ARM_TP_ADDRESS - *((struct tcb **)ARM_TP_ADDRESS) = tcb; /* avoids a system call */ -#else sysarch(ARM_SET_TP, tcb); -#endif } /* @@ -67,15 +63,11 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { -#ifdef ARM_TP_ADDRESS - return (*((struct tcb **)ARM_TP_ADDRESS)); -#else struct tcb *tcb; __asm __volatile("mrc p15, 0, %0, c13, c0, 3" \ : "=r" (tcb)); return (tcb); -#endif } static __inline struct pthread * diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index 7779169667be..4e551b0948ad 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -491,10 +491,6 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) void allocate_initial_tls(Obj_Entry *objs) { -#ifdef ARM_TP_ADDRESS - void **_tp = (void **)ARM_TP_ADDRESS; -#endif - /* * Fix the size of the static TLS block by using the maximum * offset allocated so far and adding a bit for dynamic modules to @@ -503,27 +499,17 @@ allocate_initial_tls(Obj_Entry *objs) tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; -#ifdef ARM_TP_ADDRESS - (*_tp) = (void *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8); -#else sysarch(ARM_SET_TP, allocate_tls(objs, NULL, TLS_TCB_SIZE, 8)); -#endif } void * __tls_get_addr(tls_index* ti) { char *p; -#ifdef ARM_TP_ADDRESS - void **_tp = (void **)ARM_TP_ADDRESS; - - p = tls_get_addr_common((Elf_Addr **)(*_tp), ti->ti_module, ti->ti_offset); -#else void *_tp; __asm __volatile("mrc p15, 0, %0, c13, c0, 3" \ : "=r" (_tp)); p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset); -#endif return (p); }