diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s index 68ccfde924f1..ac601ea5609b 100644 --- a/sys/arch/amiga/amiga/locore.s +++ b/sys/arch/amiga/amiga/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.161 2022/05/30 09:56:02 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.162 2023/12/25 21:32:56 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1124,8 +1124,6 @@ ENTRY(probeva) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #ifdef M68060 cmpl #CPU_68060,_C_LABEL(cputype) | 68060? jeq Lldustp060 | yes, skip diff --git a/sys/arch/atari/atari/locore.s b/sys/arch/atari/atari/locore.s index 019e20533ace..84c478bba883 100644 --- a/sys/arch/atari/atari/locore.s +++ b/sys/arch/atari/atari/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.117 2023/01/06 10:28:27 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.118 2023/12/25 21:32:56 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1141,8 +1141,6 @@ ENTRY(probeva) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68060) cmpl #CPU_68060,_C_LABEL(cputype) | 68060? jeq Lldustp060 | yes, skip diff --git a/sys/arch/cesfic/cesfic/locore.s b/sys/arch/cesfic/cesfic/locore.s index a745131c0638..31db9a5cde57 100644 --- a/sys/arch/cesfic/cesfic/locore.s +++ b/sys/arch/cesfic/cesfic/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.34 2022/05/30 09:56:03 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.35 2023/12/25 21:32:56 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -805,8 +805,6 @@ ENTRY(loadustp) tstl _C_LABEL(mmutype) | HP MMU? jeq Lhpmmu9 | yes, skip movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip @@ -834,7 +832,10 @@ Lhpmmu9: andl #~MMU_CEN,%a0@(MMUCMD) | toggle cache enable orl #MMU_CEN,%a0@(MMUCMD) | to clear data cache 1: - movl %sp@(4),%a0@(MMUUSTP) | load a new USTP + movl %sp@(4),%d0 + moveq #PGSHIFT,%d1 + lsrl %d1,%d0 | convert to page frame + movl %d0,%a0@(MMUUSTP) | load a new USTP #endif rts diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index 10ba5821c533..181914b26eab 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.174 2023/10/14 15:31:36 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.175 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -1087,8 +1087,6 @@ ENTRY(loadustp) tstl _C_LABEL(mmutype) | HP MMU? jeq Lhpmmu9 | yes, skip movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip @@ -1116,7 +1114,10 @@ Lhpmmu9: andl #~MMU_CEN,%a0@(MMUCMD) | toggle cache enable orl #MMU_CEN,%a0@(MMUCMD) | to clear data cache 1: - movl %sp@(4),%a0@(MMUUSTP) | load a new USTP + movl %sp@(4),%d0 + moveq #PGSHIFT,%d1 + lsrl %d1,%d0 | convert to page frame + movl %d0,%a0@(MMUUSTP) | load a new USTP #endif rts diff --git a/sys/arch/luna68k/luna68k/locore.s b/sys/arch/luna68k/luna68k/locore.s index d3ce3fc621ec..fb8e4587eae2 100644 --- a/sys/arch/luna68k/luna68k/locore.s +++ b/sys/arch/luna68k/luna68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.68 2022/06/10 21:42:24 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.69 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -784,8 +784,6 @@ ENTRY(ecacheoff) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h index 457ecf7914a8..e6ae9efd2008 100644 --- a/sys/arch/m68k/include/pmap_motorola.h +++ b/sys/arch/m68k/include/pmap_motorola.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.h,v 1.38 2023/09/26 12:46:30 tsutsui Exp $ */ +/* $NetBSD: pmap_motorola.h,v 1.39 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1991, 1993 @@ -176,7 +176,7 @@ struct pmap { #define PMAP_ACTIVATE(pmap, loadhw) \ { \ if ((loadhw)) \ - loadustp(m68k_btop((paddr_t)(pmap)->pm_stpa)); \ + loadustp((paddr_t)(pmap)->pm_stpa); \ } /* diff --git a/sys/arch/mac68k/mac68k/locore.s b/sys/arch/mac68k/mac68k/locore.s index 428c3d628091..2c6e6f754e07 100644 --- a/sys/arch/mac68k/mac68k/locore.s +++ b/sys/arch/mac68k/mac68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.175 2022/05/30 09:56:03 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.176 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -956,8 +956,6 @@ ENTRY(ecacheoff) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s index 066700fea43a..87c006b8d0fd 100644 --- a/sys/arch/mvme68k/mvme68k/locore.s +++ b/sys/arch/mvme68k/mvme68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.118 2022/05/30 09:56:03 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.119 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1097,8 +1097,6 @@ ENTRY_NOPROFILE(getsp) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT, %d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) || defined(M68060) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip diff --git a/sys/arch/news68k/news68k/locore.s b/sys/arch/news68k/news68k/locore.s index 09d2b7843a3f..bcbd7ae19b52 100644 --- a/sys/arch/news68k/news68k/locore.s +++ b/sys/arch/news68k/news68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.71 2023/10/15 10:46:51 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.72 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -896,8 +896,6 @@ Lnocache8: */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT, %d1 - lsll %d1,%d0 | convert to addr pflusha | flush entire TLB lea _C_LABEL(protorp),%a0 | CRP prototype movl %d0,%a0@(4) | stash USTP diff --git a/sys/arch/next68k/next68k/locore.s b/sys/arch/next68k/next68k/locore.s index 646ed2b2ab51..fac26182ad30 100644 --- a/sys/arch/next68k/next68k/locore.s +++ b/sys/arch/next68k/next68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.73 2023/06/16 20:01:20 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.74 2023/12/25 21:32:57 thorpej Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell @@ -891,8 +891,6 @@ ENTRY(loadustp) tstl _C_LABEL(mmutype) | HP MMU? jeq Lhpmmu9 | yes, skip movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip diff --git a/sys/arch/x68k/x68k/locore.s b/sys/arch/x68k/x68k/locore.s index 594320d6b19a..131733c6bfdd 100644 --- a/sys/arch/x68k/x68k/locore.s +++ b/sys/arch/x68k/x68k/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.122 2023/09/17 07:22:17 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.123 2023/12/25 21:32:58 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -833,8 +833,6 @@ ENTRY(ecacheoff) */ ENTRY(loadustp) movl %sp@(4),%d0 | new USTP - moveq #PGSHIFT,%d1 - lsll %d1,%d0 | convert to addr #if defined(M68040) || defined(M68060) cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? jne LmotommuC | no, skip