From 0a85ee9986afb7dfb6f84c11a4feee32ac46edb2 Mon Sep 17 00:00:00 2001 From: br Date: Wed, 17 Feb 2016 14:13:25 +0000 Subject: There is no need to pre save tp in cpu_fork(). Discussed with: jhb --- sys/riscv/riscv/vm_machdep.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 49d31ba..023c1f0 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -64,16 +64,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { struct pcb *pcb2; struct trapframe *tf; - uint64_t val; if ((flags & RFPROC) == 0) return; - if (td1 == curthread) { - __asm __volatile("mv %0, tp" : "=&r"(val)); - td1->td_pcb->pcb_tp = val; - } - pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; -- cgit v1.1