Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha The only remaining consumer of curpcb was the...
details: https://anonhg.NetBSD.org/src/rev/dfa7c37a0358
branches: trunk
changeset: 975635:dfa7c37a0358
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Sep 03 04:18:30 2020 +0000
description:
The only remaining consumer of curpcb was the PROM mapping code, for if
PROM console routines are being used (only on KN8AE). We have access to
the sam information via curlwp, so use that, and eliminate the need to set
cpu_info::ci_curpcb when context switching, which saves an extra all into
PALcode.
diffstat:
sys/arch/alpha/alpha/genassym.cf | 3 +--
sys/arch/alpha/alpha/locore.s | 8 ++------
sys/arch/alpha/alpha/prom.c | 11 ++++++-----
sys/arch/alpha/include/asm.h | 8 +-------
4 files changed, 10 insertions(+), 20 deletions(-)
diffs (120 lines):
diff -r 7a551350e156 -r dfa7c37a0358 sys/arch/alpha/alpha/genassym.cf
--- a/sys/arch/alpha/alpha/genassym.cf Thu Sep 03 02:09:09 2020 +0000
+++ b/sys/arch/alpha/alpha/genassym.cf Thu Sep 03 04:18:30 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.22 2020/02/20 08:27:38 skrll Exp $
+# $NetBSD: genassym.cf,v 1.23 2020/09/03 04:18:30 thorpej Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -187,6 +187,5 @@
# CPU info
define CPU_INFO_CURLWP offsetof(struct cpu_info, ci_curlwp)
-define CPU_INFO_CURPCB offsetof(struct cpu_info, ci_curpcb)
define CPU_INFO_IDLE_LWP offsetof(struct cpu_info, ci_data.cpu_idlelwp)
define CPU_INFO_SIZEOF sizeof(struct cpu_info)
diff -r 7a551350e156 -r dfa7c37a0358 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s Thu Sep 03 02:09:09 2020 +0000
+++ b/sys/arch/alpha/alpha/locore.s Thu Sep 03 04:18:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.126 2020/09/03 02:09:09 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.127 2020/09/03 04:18:30 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.126 2020/09/03 02:09:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.127 2020/09/03 04:18:30 thorpej Exp $");
#include "assym.h"
@@ -78,10 +78,6 @@
* hwpcb should be in a0. Clobbers v0, t0, t8..t11, a0.
*/
#define SWITCH_CONTEXT \
- /* Make a note of the context we're running on. */ \
- GET_CURPCB ; \
- stq a0, 0(v0) ; \
- \
/* Swap in the new context. */ \
call_pal PAL_OSF1_swpctx
diff -r 7a551350e156 -r dfa7c37a0358 sys/arch/alpha/alpha/prom.c
--- a/sys/arch/alpha/alpha/prom.c Thu Sep 03 02:09:09 2020 +0000
+++ b/sys/arch/alpha/alpha/prom.c Thu Sep 03 04:18:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.c,v 1.54 2020/09/03 02:09:09 thorpej Exp $ */
+/* $NetBSD: prom.c,v 1.55 2020/09/03 04:18:30 thorpej Exp $ */
/*
* Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@@ -27,7 +27,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.54 2020/09/03 02:09:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.55 2020/09/03 04:18:30 thorpej Exp $");
#include "opt_multiprocessor.h"
@@ -77,7 +77,8 @@
/*
* Find the level 1 map that we're currently running on.
*/
- apcb = (struct alpha_pcb *)ALPHA_PHYS_TO_K0SEG(curpcb);
+ apcb = (struct alpha_pcb *))
+ ALPHA_PHYS_TO_K0SEG((paddr_t)curlwp->l_md.md_pcbpaddr);
return ((pt_entry_t *)ALPHA_PHYS_TO_K0SEG(apcb->apcb_ptbr << PGSHIFT));
}
@@ -186,7 +187,7 @@
* (i.e. the first one after alpha_init()), then the PROM
* is still mapped, regardless of the `prom_mapped' setting.
*/
- if (prom_mapped == 0 && curpcb != 0) {
+ if (! prom_mapped) {
if (!prom_uses_prom_console())
panic("prom_enter");
{
@@ -209,7 +210,7 @@
/*
* See comment above.
*/
- if (prom_mapped == 0 && curpcb != 0) {
+ if (! prom_mapped) {
if (!prom_uses_prom_console())
panic("prom_leave");
{
diff -r 7a551350e156 -r dfa7c37a0358 sys/arch/alpha/include/asm.h
--- a/sys/arch/alpha/include/asm.h Thu Sep 03 02:09:09 2020 +0000
+++ b/sys/arch/alpha/include/asm.h Thu Sep 03 04:18:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.39 2020/08/29 22:50:27 thorpej Exp $ */
+/* $NetBSD: asm.h,v 1.40 2020/09/03 04:18:30 thorpej Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -675,10 +675,6 @@
call_pal PAL_OSF1_rdval ; \
addq v0, CPU_INFO_FPCURLWP, v0
-#define GET_CURPCB \
- call_pal PAL_OSF1_rdval ; \
- addq v0, CPU_INFO_CURPCB, v0
-
#else /* if not MULTIPROCESSOR... */
IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)
@@ -688,8 +684,6 @@
#define GET_CURLWP lda v0, cpu_info_primary + CPU_INFO_CURLWP
#define GET_FPCURLWP lda v0, cpu_info_primary + CPU_INFO_FPCURLWP
-
-#define GET_CURPCB lda v0, cpu_info_primary + CPU_INFO_CURPCB
#endif /* MULTIPROCESSOR */
#else
#define RCSID(_s) __SECTIONSTRING(.ident, _s)
Home |
Main Index |
Thread Index |
Old Index