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
This commit is contained in:
parent
24b2f4ea49
commit
4d9488674f
@ -31,18 +31,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/sysarch.h>
|
#include <machine/sysarch.h>
|
||||||
|
|
||||||
ENTRY(__aeabi_read_tp)
|
ENTRY(__aeabi_read_tp)
|
||||||
#ifdef ARM_TP_ADDRESS
|
|
||||||
ldr r0, .Larm_tp_address
|
|
||||||
ldr r0, [r0]
|
|
||||||
#else
|
|
||||||
mrc p15, 0, r0, c13, c0, 3
|
mrc p15, 0, r0, c13, c0, 3
|
||||||
#endif
|
|
||||||
RET
|
RET
|
||||||
END(__aeabi_read_tp)
|
END(__aeabi_read_tp)
|
||||||
|
|
||||||
#ifdef ARM_TP_ADDRESS
|
|
||||||
.Larm_tp_address:
|
|
||||||
.word ARM_TP_ADDRESS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
@ -38,9 +38,5 @@ void
|
|||||||
_set_tp(void *tp)
|
_set_tp(void *tp)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef ARM_TP_ADDRESS
|
|
||||||
*((struct tcb **)ARM_TP_ADDRESS) = tp;
|
|
||||||
#else
|
|
||||||
sysarch(ARM_SET_TP, tp);
|
sysarch(ARM_SET_TP, tp);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,7 @@ _libc_get_static_tls_base(size_t offset)
|
|||||||
{
|
{
|
||||||
uintptr_t tlsbase;
|
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));
|
__asm __volatile("mrc p15, 0, %0, c13, c0, 3" : "=r" (tlsbase));
|
||||||
#endif
|
|
||||||
|
|
||||||
tlsbase += offset;
|
tlsbase += offset;
|
||||||
return (tlsbase);
|
return (tlsbase);
|
||||||
|
@ -54,11 +54,7 @@ struct tcb {
|
|||||||
static __inline void
|
static __inline void
|
||||||
_tcb_set(struct tcb *tcb)
|
_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);
|
sysarch(ARM_SET_TP, tcb);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -67,15 +63,11 @@ _tcb_set(struct tcb *tcb)
|
|||||||
static __inline struct tcb *
|
static __inline struct tcb *
|
||||||
_tcb_get(void)
|
_tcb_get(void)
|
||||||
{
|
{
|
||||||
#ifdef ARM_TP_ADDRESS
|
|
||||||
return (*((struct tcb **)ARM_TP_ADDRESS));
|
|
||||||
#else
|
|
||||||
struct tcb *tcb;
|
struct tcb *tcb;
|
||||||
|
|
||||||
__asm __volatile("mrc p15, 0, %0, c13, c0, 3" \
|
__asm __volatile("mrc p15, 0, %0, c13, c0, 3" \
|
||||||
: "=r" (tcb));
|
: "=r" (tcb));
|
||||||
return (tcb);
|
return (tcb);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline struct pthread *
|
static __inline struct pthread *
|
||||||
|
@ -491,10 +491,6 @@ ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused)
|
|||||||
void
|
void
|
||||||
allocate_initial_tls(Obj_Entry *objs)
|
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
|
* Fix the size of the static TLS block by using the maximum
|
||||||
* offset allocated so far and adding a bit for dynamic modules to
|
* 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;
|
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));
|
sysarch(ARM_SET_TP, allocate_tls(objs, NULL, TLS_TCB_SIZE, 8));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
__tls_get_addr(tls_index* ti)
|
__tls_get_addr(tls_index* ti)
|
||||||
{
|
{
|
||||||
char *p;
|
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;
|
void *_tp;
|
||||||
__asm __volatile("mrc p15, 0, %0, c13, c0, 3" \
|
__asm __volatile("mrc p15, 0, %0, c13, c0, 3" \
|
||||||
: "=r" (_tp));
|
: "=r" (_tp));
|
||||||
p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset);
|
p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset);
|
||||||
#endif
|
|
||||||
|
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user