Make md_tp a register_t not a void *. This will keep us from
accidentally dereferencng it and might be one fewer things to change if arm64 happens... Submitted by: rwatson's question on irc...
This commit is contained in:
parent
3835f47c7e
commit
ae5b8077df
@ -85,7 +85,7 @@ static int
|
||||
arm32_set_tp(struct thread *td, void *args)
|
||||
{
|
||||
|
||||
td->td_md.md_tp = args;
|
||||
td->td_md.md_tp = (register_t)args;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ static int
|
||||
arm32_get_tp(struct thread *td, void *args)
|
||||
{
|
||||
|
||||
td->td_retval[0] = (uint32_t)td->td_md.md_tp;
|
||||
td->td_retval[0] = td->td_md.md_tp;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
|
||||
/* Setup to release spin count in fork_exit(). */
|
||||
td2->td_md.md_spinlock_count = 1;
|
||||
td2->td_md.md_saved_cspr = 0;
|
||||
td2->td_md.md_tp = *(uint32_t **)ARM_TP_ADDRESS;
|
||||
td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS;
|
||||
}
|
||||
|
||||
void
|
||||
@ -370,10 +370,10 @@ cpu_set_user_tls(struct thread *td, void *tls_base)
|
||||
{
|
||||
|
||||
if (td != curthread)
|
||||
td->td_md.md_tp = tls_base;
|
||||
td->td_md.md_tp = (register_t)tls_base;
|
||||
else {
|
||||
critical_enter();
|
||||
*(void **)ARM_TP_ADDRESS = tls_base;
|
||||
*(register_t *)ARM_TP_ADDRESS = (register_t)tls_base;
|
||||
critical_exit();
|
||||
}
|
||||
return (0);
|
||||
|
@ -50,7 +50,7 @@ struct mdthread {
|
||||
register_t md_saved_cspr; /* (k) */
|
||||
int md_ptrace_instr;
|
||||
int md_ptrace_addr;
|
||||
void *md_tp;
|
||||
register_t md_tp;
|
||||
void *md_ras_start;
|
||||
void *md_ras_end;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user