Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cpuctl/arch Fix a bug that some TLB related lines w...
details: https://anonhg.NetBSD.org/src/rev/7e374c7b723e
branches: trunk
changeset: 1023834:7e374c7b723e
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Sep 27 16:47:15 2021 +0000
description:
Fix a bug that some TLB related lines were not printed.
diffstat:
usr.sbin/cpuctl/arch/i386.c | 103 +++++++++++++++++++------------------------
1 files changed, 45 insertions(+), 58 deletions(-)
diffs (131 lines):
diff -r a33613b42868 -r 7e374c7b723e usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c Mon Sep 27 16:22:58 2021 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c Mon Sep 27 16:47:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.118 2021/09/27 16:22:58 msaitoh Exp $ */
+/* $NetBSD: i386.c,v 1.119 2021/09/27 16:47:15 msaitoh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.118 2021/09/27 16:22:58 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.119 2021/09/27 16:47:15 msaitoh Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -2421,7 +2421,7 @@
aprint_verbose_dev(ci->ci_dev, "");
else
aprint_verbose("%s", sep);
- if (name != NULL)
+ if ((name != NULL) && (sep == NULL))
aprint_verbose("%s ", name);
if (cai->cai_string != NULL) {
@@ -2477,61 +2477,48 @@
if (sep != NULL)
aprint_verbose("\n");
}
- if (ci->ci_cinfo[CAI_ITLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_ITLB, "ITLB:", NULL);
- sep = print_tlb_config(ci, CAI_ITLB2, NULL, sep);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_DTLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_DTLB, "DTLB:", NULL);
- sep = print_tlb_config(ci, CAI_DTLB2, NULL, sep);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L2_ITLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L2_ITLB, "L2 ITLB:", NULL);
- sep = print_tlb_config(ci, CAI_L2_ITLB2, NULL, sep);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L2_DTLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L2_DTLB, "L2 DTLB:", NULL);
- sep = print_tlb_config(ci, CAI_L2_DTLB2, NULL, sep);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L2_STLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L2_STLB, "L2 STLB:", NULL);
- sep = print_tlb_config(ci, CAI_L2_STLB2, NULL, sep);
- sep = print_tlb_config(ci, CAI_L2_STLB3, NULL, sep);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L1_1GBITLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L1_1GBITLB, "L1 1GB page ITLB:",
- NULL);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L1_1GBDTLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L1_1GBDTLB, "L1 1GB page DTLB:",
- NULL);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L2_1GBITLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L2_1GBITLB, "L2 1GB page ITLB:",
- NULL);
- if (sep != NULL)
- aprint_verbose("\n");
- }
- if (ci->ci_cinfo[CAI_L2_1GBDTLB].cai_totalsize != 0) {
- sep = print_tlb_config(ci, CAI_L2_1GBDTLB, "L2 1GB page DTLB:",
- NULL);
- if (sep != NULL)
- aprint_verbose("\n");
- }
+
+ sep = print_tlb_config(ci, CAI_ITLB, "ITLB:", NULL);
+ sep = print_tlb_config(ci, CAI_ITLB2, "ITLB:", sep);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_DTLB, "DTLB:", NULL);
+ sep = print_tlb_config(ci, CAI_DTLB2, "DTLB:", sep);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L2_ITLB, "L2 ITLB:", NULL);
+ sep = print_tlb_config(ci, CAI_L2_ITLB2, "L2 ITLB:", sep);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L2_DTLB, "L2 DTLB:", NULL);
+ sep = print_tlb_config(ci, CAI_L2_DTLB2, "L2 DTLB:", sep);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L2_STLB, "L2 STLB:", NULL);
+ sep = print_tlb_config(ci, CAI_L2_STLB2, "L2 STLB:", sep);
+ sep = print_tlb_config(ci, CAI_L2_STLB3, "L2 STLB:", sep);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L1_1GBITLB, "L1 1GB page ITLB:", NULL);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L1_1GBDTLB, "L1 1GB page DTLB:", NULL);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L2_1GBITLB, "L2 1GB page ITLB:", NULL);
+ if (sep != NULL)
+ aprint_verbose("\n");
+
+ sep = print_tlb_config(ci, CAI_L2_1GBDTLB, "L2 1GB page DTLB:", NULL);
+ if (sep != NULL)
+ aprint_verbose("\n");
}
static void
Home |
Main Index |
Thread Index |
Old Index