From: "Luck, Tony" <tony.luck@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH 2.6.0test5: 2 of 3] MCA/TLB recovery
Date: Fri, 03 Oct 2003 23:27:25 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106522368223247@msgid-missing> (raw)
This part is just a clean-up of the logging code to only
print registers that are implemented (instead of blindly
dumping CR[0] ... CR[127] and AR[0] ... AR[127].
-Tony
diff -ru linux-2.6.0-test5/arch/ia64/kernel/mca.c temp/arch/ia64/kernel/mca.c
--- linux-2.6.0-test5/arch/ia64/kernel/mca.c 2003-09-08 12:50:03.000000000 -0700
+++ temp/arch/ia64/kernel/mca.c 2003-10-03 15:37:40.095070954 -0700
@@ -1498,6 +1498,12 @@
lh->timestamp.slh_second, lh->severity);
}
+/* Bitmasks of implemented registers */
+static u64 arbits[2] = { 0x11117f2f00ffUL, 0x7UL };
+static u64 brbits[1] = { 0xffUL };
+static u64 crbits[2] = { 0x3fb0107UL, 0x307ffUL };
+static u64 rrbits[1] = { 0xffUL };
+
/*
* ia64_log_processor_regs_print
* Print the contents of the saved processor register(s) in the format
@@ -1513,6 +1519,7 @@
void
ia64_log_processor_regs_print(u64 *regs,
int reg_num,
+ u64 *reg_bits,
char *reg_class,
char *reg_prefix,
prfunc_t prfunc)
@@ -1521,7 +1528,8 @@
prfunc("+%s Registers\n", reg_class);
for (i = 0; i < reg_num; i++)
- prfunc("+ %s[%d] 0x%lx\n", reg_prefix, i, regs[i]);
+ if (reg_bits[i/64] & (1UL << (i%64)))
+ prfunc("+ %s[%d] 0x%lx\n", reg_prefix, i, regs[i]);
}
/*
@@ -2159,22 +2167,22 @@
/* Print branch register contents if valid */
if (spsi->valid.br)
- ia64_log_processor_regs_print(spsi->br, 8, "Branch", "br",
+ ia64_log_processor_regs_print(spsi->br, 8, brbits, "Branch", "br",
prfunc);
/* Print control register contents if valid */
if (spsi->valid.cr)
- ia64_log_processor_regs_print(spsi->cr, 128, "Control", "cr",
+ ia64_log_processor_regs_print(spsi->cr, 128, crbits, "Control", "cr",
prfunc);
/* Print application register contents if valid */
if (spsi->valid.ar)
- ia64_log_processor_regs_print(spsi->ar, 128, "Application",
+ ia64_log_processor_regs_print(spsi->ar, 128, arbits, "Application",
"ar", prfunc);
/* Print region register contents if valid */
if (spsi->valid.rr)
- ia64_log_processor_regs_print(spsi->rr, 8, "Region", "rr",
+ ia64_log_processor_regs_print(spsi->rr, 8, rrbits, "Region", "rr",
prfunc);
/* Print floating-point register contents if valid */
next reply other threads:[~2003-10-03 23:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-03 23:27 Luck, Tony [this message]
2003-10-08 20:51 ` [PATCH 2.6.0test5: 2 of 3] MCA/TLB recovery David Mosberger
2003-10-08 21:44 ` Luck, Tony
2003-10-08 22:39 ` David Mosberger
2003-10-08 22:45 ` Jesse Barnes
2003-10-08 23:31 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-106522368223247@msgid-missing \
--to=tony.luck@intel.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.