Page MenuHomeFreeBSD

D26556.id77530.diff
No OneTemporary

D26556.id77530.diff

Index: head/sys/mips/include/elf.h
===================================================================
--- head/sys/mips/include/elf.h
+++ head/sys/mips/include/elf.h
@@ -105,8 +105,6 @@
int a_type; /* Entry type. */
union {
int a_val; /* Integer value. */
- void *a_ptr; /* Address. */
- void (*a_fcn)(void); /* Function pointer (not used). */
} a_un;
} Elf32_Auxinfo;
Index: head/sys/mips/mips/freebsd32_machdep.c
===================================================================
--- head/sys/mips/mips/freebsd32_machdep.c
+++ head/sys/mips/mips/freebsd32_machdep.c
@@ -58,6 +58,7 @@
#include <vm/vm.h>
#include <vm/vm_param.h>
+#include <machine/cpuinfo.h>
#include <machine/md_var.h>
#include <machine/reg.h>
#include <machine/sigframe.h>
@@ -455,6 +456,17 @@
switch (uap->op) {
case MIPS_SET_TLS:
td->td_md.md_tls = (void *)(intptr_t)uap->parms;
+
+ /*
+ * If there is an user local register implementation (ULRI)
+ * update it as well. Add the TLS and TCB offsets so the
+ * value in this register is adjusted like in the case of the
+ * rdhwr trap() instruction handler.
+ */
+ if (cpuinfo.userlocal_reg == true) {
+ mips_wr_userlocal((unsigned long)(uap->parms +
+ td->td_md.md_tls_tcb_offset));
+ }
return (0);
case MIPS_GET_TLS:
tlsbase = (int32_t)(intptr_t)td->td_md.md_tls;

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 16, 8:45 AM (11 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33984758
Default Alt Text
D26556.id77530.diff (1 KB)

Event Timeline