From 68204e823ca389ea54f6a3436bb29dd07ae9b055 Mon Sep 17 00:00:00 2001 From: guenther Date: Tue, 25 Oct 2022 15:15:38 +0000 Subject: [PATCH] Consistently use 'proc_trampoline' as the name of the trampoline used by cpu_fork() ok miod@ kettenis@ mpi@ deraadt@ --- sys/arch/alpha/alpha/locore.s | 8 ++++---- sys/arch/alpha/alpha/vm_machdep.c | 4 ++-- sys/arch/alpha/include/cpu.h | 4 ++-- sys/arch/hppa/hppa/locore.S | 6 +++--- sys/arch/hppa/hppa/vm_machdep.c | 4 ++-- sys/arch/hppa/include/cpu.h | 4 ++-- sys/arch/macppc/macppc/locore.S | 8 ++++---- sys/arch/powerpc/powerpc/vm_machdep.c | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s index eb26251806e..0ff9201ec3d 100644 --- a/sys/arch/alpha/alpha/locore.s +++ b/sys/arch/alpha/alpha/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.48 2020/05/17 13:48:29 deraadt Exp $ */ +/* $OpenBSD: locore.s,v 1.49 2022/10/25 15:15:38 guenther Exp $ */ /* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */ /*- @@ -767,7 +767,7 @@ LEAF(cpu_idle_leave, 0) END(cpu_idle_leave) /* - * switch_trampoline() + * proc_trampoline() * * Arrange for a function to be invoked neatly, after a cpu_fork(). * @@ -775,7 +775,7 @@ LEAF(cpu_idle_leave, 0) * address specified by the s1 register and with one argument specified * by the s2 register. */ -LEAF(switch_trampoline, 0) +LEAF(proc_trampoline, 0) #if defined(MULTIPROCESSOR) CALL(proc_trampoline_mp) #endif @@ -783,7 +783,7 @@ LEAF(switch_trampoline, 0) mov s1, ra mov s2, a0 jmp zero, (pv) - END(switch_trampoline) + END(proc_trampoline) /**************************************************************************/ diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c index 0ed99ccd6bc..dc093c45c42 100644 --- a/sys/arch/alpha/alpha/vm_machdep.c +++ b/sys/arch/alpha/alpha/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.48 2022/02/21 19:22:21 kettenis Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.49 2022/10/25 15:15:38 guenther Exp $ */ /* $NetBSD: vm_machdep.c,v 1.55 2000/03/29 03:49:48 simonb Exp $ */ /* @@ -159,7 +159,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb, (u_int64_t)exception_return; /* s1: ra */ up->u_pcb.pcb_context[2] = (u_int64_t)arg; up->u_pcb.pcb_context[7] = - (u_int64_t)switch_trampoline; /* ra: assembly magic */ + (u_int64_t)proc_trampoline; /* ra: assembly magic */ #ifdef MULTIPROCESSOR /* * MULTIPROCESSOR kernels will reuse the IPL of the parent diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 00d7508613e..03afb3a355a 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.66 2022/08/10 10:41:35 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.67 2022/10/25 15:15:38 guenther Exp $ */ /* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */ /*- @@ -140,11 +140,11 @@ void machine_check(unsigned long, struct trapframe *, unsigned long, unsigned long); u_int64_t hwrpb_checksum(void); void hwrpb_restart_setup(void); +void proc_trampoline(void); /* MAGIC */ void regdump(struct trapframe *); void regtoframe(struct reg *, struct trapframe *); void savectx(struct pcb *); void switch_exit(struct proc *); /* MAGIC */ -void switch_trampoline(void); /* MAGIC */ void syscall(u_int64_t, struct trapframe *); void trap(unsigned long, unsigned long, unsigned long, unsigned long, struct trapframe *); diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 77dc1e3d780..a9963b380ee 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.203 2021/02/22 23:17:50 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.204 2022/10/25 15:15:38 guenther Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -2695,7 +2695,7 @@ LEAF_ENTRY(cpu_idle_leave) nop EXIT(cpu_idle_leave) -ENTRY(switch_trampoline,0) +ENTRY(proc_trampoline,0) copy r0, r3 #ifdef MULTIPROCESSOR copy t4, r5 @@ -2716,7 +2716,7 @@ ENTRY(switch_trampoline,0) .call b $syscall_return ldw P_MD_REGS(t2), t3 -EXIT(switch_trampoline) +EXIT(proc_trampoline) #ifdef MULTIPROCESSOR /* diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c index 0e8de2c0818..17a864cc75c 100644 --- a/sys/arch/hppa/hppa/vm_machdep.c +++ b/sys/arch/hppa/hppa/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.84 2022/05/21 23:43:31 kettenis Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.85 2022/10/25 15:15:38 guenther Exp $ */ /* * Copyright (c) 1999-2004 Michael Shalayeff @@ -114,7 +114,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb, */ sp += HPPA_FRAME_SIZE; *(register_t*)(sp - HPPA_FRAME_SIZE) = 0; - *(register_t*)(sp + HPPA_FRAME_CRP) = (register_t)&switch_trampoline; + *(register_t*)(sp + HPPA_FRAME_CRP) = (register_t)&proc_trampoline; *(register_t*)(sp) = (sp - HPPA_FRAME_SIZE); sp += HPPA_FRAME_SIZE + 16*4; /* frame + callee-saved registers */ diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 6270268518f..34a0d21c801 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.95 2021/07/06 09:34:06 kettenis Exp $ */ +/* $OpenBSD: cpu.h,v 1.96 2022/10/25 15:15:38 guenther Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -238,7 +238,7 @@ int spcopy32(pa_space_t ssp, const uint32_t *src, int spstrcpy(pa_space_t ssp, const void *src, pa_space_t dsp, void *dst, size_t size, size_t *rsize); int copy_on_fault(void); -void switch_trampoline(void); +void proc_trampoline(void); int cpu_dumpsize(void); int cpu_dump(void); diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index deeee723a97..68a87f3932c 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.59 2022/09/04 06:49:11 jsg Exp $ */ +/* $OpenBSD: locore.S,v 1.60 2022/10/25 15:15:38 guenther Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -842,9 +842,9 @@ rfi1: rfi * Child comes here at the end of a fork. * Mostly similar to the above. */ - .globl _C_LABEL(fork_trampoline) - .type _C_LABEL(fork_trampoline),@function -_C_LABEL(fork_trampoline): + .globl _C_LABEL(proc_trampoline) + .type _C_LABEL(proc_trampoline),@function +_C_LABEL(proc_trampoline): #ifdef MULTIPROCESSOR bl _C_LABEL(proc_trampoline_mp) #endif diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index 179ba76ba9c..de674db7815 100644 --- a/sys/arch/powerpc/powerpc/vm_machdep.c +++ b/sys/arch/powerpc/powerpc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.53 2022/02/21 19:17:51 kettenis Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.54 2022/10/25 15:15:38 guenther Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -57,7 +57,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb, struct callframe *cf; struct switchframe *sf; caddr_t stktop1, stktop2; - extern void fork_trampoline(void); + extern void proc_trampoline(void); struct pcb *pcb = &p2->p_addr->u_pcb; struct cpu_info *ci = curcpu(); @@ -106,7 +106,7 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, void *tcb, * There happens to be a callframe, too. */ cf = (struct callframe *)stktop2; - cf->lr = (int)fork_trampoline; + cf->lr = (int)proc_trampoline; /* * Below the trap frame, there is another call frame: -- 2.20.1