Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 - move pmap_ctx() macro into pmap.h instead...
details: https://anonhg.NetBSD.org/src/rev/a36495c4a141
branches: trunk
changeset: 447419:a36495c4a141
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jan 10 10:33:49 2019 +0000
description:
- move pmap_ctx() macro into pmap.h instead of duplicating it.
- fix description of some mach ddb commands.
diffstat:
sys/arch/sparc64/include/pmap.h | 9 ++++++++-
sys/arch/sparc64/sparc64/db_interface.c | 21 ++++++---------------
sys/arch/sparc64/sparc64/pmap.c | 10 ++--------
3 files changed, 16 insertions(+), 24 deletions(-)
diffs (119 lines):
diff -r f2565636ad6c -r a36495c4a141 sys/arch/sparc64/include/pmap.h
--- a/sys/arch/sparc64/include/pmap.h Thu Jan 10 10:04:43 2019 +0000
+++ b/sys/arch/sparc64/include/pmap.h Thu Jan 10 10:33:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.61 2016/11/04 05:41:01 macallan Exp $ */
+/* $NetBSD: pmap.h,v 1.62 2019/01/10 10:33:49 mrg Exp $ */
/*-
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -269,6 +269,13 @@
(pg)->mdpage.mdpg_pvh.pv_va = 0; \
} while (/*CONSTCOND*/0)
+#ifdef MULTIPROCESSOR
+#define pmap_ctx_cpu(PM, C) ((PM)->pm_ctx[(C)])
+#define pmap_ctx(PM) pmap_ctx_cpu((PM), cpu_number())
+#else
+#define pmap_ctx(PM) ((PM)->pm_ctx[0])
+#endif
+
#endif /* _KERNEL */
#endif /* _LOCORE */
diff -r f2565636ad6c -r a36495c4a141 sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c Thu Jan 10 10:04:43 2019 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c Thu Jan 10 10:33:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.133 2016/05/01 20:12:54 palle Exp $ */
+/* $NetBSD: db_interface.c,v 1.134 2019/01/10 10:33:49 mrg Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.133 2016/05/01 20:12:54 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.134 2019/01/10 10:33:49 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -90,15 +90,6 @@
u_int tfault; /* MMU tag access */
} trap_trace[], trap_trace_end[];
-/*
- * Helpers for ddb variables.
- */
-#ifdef MULTIPROCESSOR
-#define pmap_ctx(PM) ((PM)->pm_ctx[cpu_number()])
-#else
-#define pmap_ctx(PM) ((PM)->pm_ctx[0])
-#endif
-
void fill_ddb_regs_from_tf(struct trapframe64 *tf);
void ddb_restore_state(void);
bool ddb_running_on_this_cpu(void);
@@ -428,7 +419,7 @@
void
db_dump_dtlb(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
{
- extern void print_dtlb(size_t, int);
+ extern void print_dtlb(size_t /*tlbsize*/, int /*tlbmask*/);
if (CPU_IS_USIII_UP()) {
print_dtlb(TLB_SIZE_CHEETAH_D16, TLB_CHEETAH_D16);
@@ -443,7 +434,7 @@
void
db_dump_itlb(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
{
- extern void print_itlb(size_t, int);
+ extern void print_itlb(size_t /*tlbsize*/, int /*tlbmask*/);
if (CPU_IS_USIII_UP()) {
print_itlb(TLB_SIZE_CHEETAH_I16, TLB_CHEETAH_I16);
@@ -1056,10 +1047,10 @@
"switch to another cpu", "cpu-no", NULL) },
#endif
{ DDB_ADD_CMD("dtlb", db_dump_dtlb, 0,
- "Print data translation look-aside buffer context information.",
+ "Display data translation look-aside buffer context information.",
NULL,NULL) },
{ DDB_ADD_CMD("itlb", db_dump_itlb, 0,
- "Display instruction translation storage buffer information.",
+ "Display instruction translation look-aside buffer information.",
NULL,NULL) },
{ DDB_ADD_CMD("dtsb", db_dump_dtsb, 0,
"Display data translation storage buffer information.", NULL,NULL) },
diff -r f2565636ad6c -r a36495c4a141 sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Thu Jan 10 10:04:43 2019 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Thu Jan 10 10:33:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.309 2018/11/29 20:58:36 palle Exp $ */
+/* $NetBSD: pmap.c,v 1.310 2019/01/10 10:33:49 mrg Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.309 2018/11/29 20:58:36 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.310 2019/01/10 10:33:49 mrg Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -194,12 +194,6 @@
return false;
}
-#ifdef MULTIPROCESSOR
-#define pmap_ctx(PM) ((PM)->pm_ctx[cpu_number()])
-#else
-#define pmap_ctx(PM) ((PM)->pm_ctx[0])
-#endif
-
/*
* Check if this pmap has a live mapping on some MMU.
*/
Home |
Main Index |
Thread Index |
Old Index