From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: art <art@sigrand.ru>, linux-mips@linux-mips.org
Subject: Re: Problem with TLB mcheck!
Date: Wed, 24 May 2006 15:49:17 +0100 [thread overview]
Message-ID: <20060524144917.GA11657@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64N.0605241304090.7887@blysk.ds.pg.gda.pl>
On Wed, May 24, 2006 at 01:45:26PM +0100, Maciej W. Rozycki wrote:
j The "linux-mips" mailing list (as cc-ed in this response) is a better
> place to ask such questions.
>
> You haven't included some important information, such as the version
> number of your Linux kernel and where you got your sources from. Without
> that bit all I can say is there is something wrong with handling of the
> TLB.
>
> Ralf, BTW -- shouldn't we report the Index, EntryHi and possibly EntryLo*
> registers in show_regs() if the cause is a machine check? I think it
> would be useful and these registers shouldn't have been corrupted since
> the triggering tlbw* instruction. A call to show_code() could be useful
> too, to determine which kind of TLB exception has been taken originally.
Depends on when exactly a CPU will raise the machine check. On some cores
the information in registers is totally useless if not even missloading.
But generally a good idea, patch below.
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 35cb08d..44a30e6 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -819,8 +819,19 @@ asmlinkage void do_watch(struct pt_regs
asmlinkage void do_mcheck(struct pt_regs *regs)
{
+ const int field = 2 * sizeof(unsigned long);
+
show_regs(regs);
+
+ printk("Hi : %0*lx\n", field, regs->hi);
+ printk("Pagemask: %0*x\n", read_c0_pagemask());
+ printk("EntryHi : %0*lx\n", field, read_c0_entryhi());
+ printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0());
+ printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1());
+ printk("\n");
dump_tlb_all();
+ show_code((unsigned int *) regs->cp0_epc);
+
/*
* Some chips may have other causes of machine check (e.g. SB1
* graduation timer)
next prev parent reply other threads:[~2006-05-24 14:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 9:35 Problem with TLB mcheck! art
2006-05-24 12:45 ` Maciej W. Rozycki
2006-05-24 14:49 ` Ralf Baechle [this message]
2006-05-24 15:11 ` Maciej W. Rozycki
2006-05-24 15:52 ` Ralf Baechle
2006-05-24 16:29 ` Maciej W. Rozycki
2006-05-26 11:40 ` Re[2]: " art
-- strict thread matches above, loose matches on Subject: below --
2006-05-31 3:42 art
2006-05-31 4:18 Zhan, Rongkai
2006-05-31 4:18 ` Zhan, Rongkai
2006-05-31 11:02 art
2006-05-31 11:27 ` Maciej W. Rozycki
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=20060524144917.GA11657@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=art@sigrand.ru \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.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.