Module Name: src
Committed By: mrg
Date: Thu Jan 10 10:33:50 UTC 2019
Modified Files:
src/sys/arch/sparc64/include: pmap.h
src/sys/arch/sparc64/sparc64: db_interface.c pmap.c
Log Message:
- move pmap_ctx() macro into pmap.h instead of duplicating it.
- fix description of some mach ddb commands.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc64/include/pmap.h
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/sparc64/sparc64/db_interface.c
cvs rdiff -u -r1.309 -r1.310 src/sys/arch/sparc64/sparc64/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc64/include/pmap.h
diff -u src/sys/arch/sparc64/include/pmap.h:1.61 src/sys/arch/sparc64/include/pmap.h:1.62
--- src/sys/arch/sparc64/include/pmap.h:1.61 Fri Nov 4 05:41:01 2016
+++ src/sys/arch/sparc64/include/pmap.h Thu Jan 10 10:33:49 2019
@@ -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 @@ do { \
(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 */
Index: src/sys/arch/sparc64/sparc64/db_interface.c
diff -u src/sys/arch/sparc64/sparc64/db_interface.c:1.133 src/sys/arch/sparc64/sparc64/db_interface.c:1.134
--- src/sys/arch/sparc64/sparc64/db_interface.c:1.133 Sun May 1 20:12:54 2016
+++ src/sys/arch/sparc64/sparc64/db_interface.c Thu Jan 10 10:33:49 2019
@@ -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 @@ extern struct traptrace {
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 @@ db_prom_cmd(db_expr_t addr, bool have_ad
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 @@ db_dump_dtlb(db_expr_t addr, bool have_a
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 @@ const struct db_command db_machine_comma
"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) },
Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.309 src/sys/arch/sparc64/sparc64/pmap.c:1.310
--- src/sys/arch/sparc64/sparc64/pmap.c:1.309 Thu Nov 29 20:58:36 2018
+++ src/sys/arch/sparc64/sparc64/pmap.c Thu Jan 10 10:33:49 2019
@@ -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 @@ pmap_has_ctx(struct pmap *p)
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.
*/