Skip to content

Commit cc3f556

Browse files
committed
merge proc_trampoline and child_trampoline as has been done on amd64
1 parent d1e035f commit cc3f556

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

sys/arch/arm64/arm64/cpuswitch.S

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,6 @@ ENTRY(cpu_switchto)
9090
ret
9191

9292
ENTRY(proc_trampoline)
93-
#ifdef MULTIPROCESSOR
94-
bl _C_LABEL(proc_trampoline_mp)
95-
#endif
96-
// call it or just set the variable?
97-
mov x0, IPL_NONE
98-
bl spllower
99-
mov x0, x20
100-
blr x19
101-
b .
102-
103-
104-
ENTRY(child_trampoline)
10593
#ifdef MULTIPROCESSOR
10694
bl _C_LABEL(proc_trampoline_mp)
10795
#endif

sys/arch/arm64/arm64/vm_machdep.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize,
9595
sf = (struct switchframe *)tf - 1;
9696
sf->sf_x19 = (uint64_t)func;
9797
sf->sf_x20= (uint64_t)arg;
98-
if (p2->p_pid == 1)
99-
sf->sf_lr = (u_int64_t)&proc_trampoline;
100-
else
101-
sf->sf_lr = (u_int64_t)&child_trampoline;
98+
sf->sf_lr = (u_int64_t)&proc_trampoline;
10299
pcb->pcb_sp = (uint64_t)sf;
103100
}
104101

0 commit comments

Comments
 (0)