From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: linuxppc-dev list <Linuxppc-dev@ozlabs.org>,
Torez Smith <torez@us.ibm.com>
Subject: Re: [PATCH 04/13] powerpc/476: add machine check handler for 47x core
Date: Wed, 5 May 2010 08:59:05 -0400 [thread overview]
Message-ID: <20100505125905.GH29593@zod.rchland.ibm.com> (raw)
In-Reply-To: <20100505122701.GG29593@zod.rchland.ibm.com>
On Wed, May 05, 2010 at 08:27:01AM -0400, Josh Boyer wrote:
>>+int machine_check_47x(struct pt_regs *regs)
>>+{
>>+ unsigned long reason = get_mc_reason(regs);
>>+ u32 mcsr;
>>+
>>+ printk(KERN_ERR "Machine check in kernel mode.\n");
>>+ if (reason & ESR_IMCP) {
>>+ printk(KERN_ERR
>>+ "Instruction Synchronous Machine Check exception\n");
>>+ mtspr(SPRN_ESR, reason & ~ESR_IMCP);
>>+ return 0;
>>+ }
>>+ mcsr = mfspr(SPRN_MCSR);
>>+ if (mcsr & MCSR_IB)
>>+ printk(KERN_ERR "Instruction Read PLB Error\n");
>>+ if (mcsr & MCSR_DRB)
>>+ printk(KERN_ERR "Data Read PLB Error\n");
>>+ if (mcsr & MCSR_DWB)
>>+ printk(KERN_ERR "Data Write PLB Error\n");
>>+ if (mcsr & MCSR_TLBP)
>>+ printk(KERN_ERR "TLB Parity Error\n");
>>+ if (mcsr & MCSR_ICP) {
>>+ flush_instruction_cache();
>>+ printk(KERN_ERR "I-Cache Parity Error\n");
>>+ }
>>+ if (mcsr & MCSR_DCSP)
>>+ printk(KERN_ERR "D-Cache Search Parity Error\n");
>>+ if (mcsr & PPC47x_MCSR_GPR)
>>+ printk(KERN_ERR "GPR Parity Error\n");
>>+ if (mcsr & PPC47x_MCSR_FPR)
>>+ printk(KERN_ERR "FPR Parity Error\n");
>>+ if (mcsr & PPC47x_MCSR_IPR)
>>+ printk(KERN_ERR "Machine Check exception is imprecise\n");
>
>This function isn't guarded by CONFIG_PPC_47x, however the defines for
>PPC47x_MCSR_* are in include/asm/reg_booke.h. They were added that way in patch
>4. As it stands, we get this when trying to build for plain 44x:
>
> CC arch/powerpc/kernel/traps.o
>arch/powerpc/kernel/traps.c: In function 'machine_check_47x':
>arch/powerpc/kernel/traps.c:411: error: 'PPC47x_MCSR_GPR' undeclared (first use in this function)
>arch/powerpc/kernel/traps.c:411: error: (Each undeclared identifier is reported only once
>arch/powerpc/kernel/traps.c:411: error: for each function it appears in.)
>arch/powerpc/kernel/traps.c:413: error: 'PPC47x_MCSR_FPR' undeclared (first use in this function)
>arch/powerpc/kernel/traps.c:415: error: 'PPC47x_MCSR_IPR' undeclared (first use in this function)
>make[1]: *** [arch/powerpc/kernel/traps.o] Error 1
>make: *** [arch/powerpc/kernel] Error 2
>make: *** Waiting for unfinished jobs....
>
>
>We should probably guard this function behind CONFIG_PPC_47x, right? If so, I
>can fix that up locally quickly enough.
Actually, that won't work unless we wrap the .machine_check addition in cputable
as well. That looks ugly. I'm guessing the easiest and cleanest fix is to
not guard the #defines for those regs in reg_booke.h. Anyone have problems with
that?
josh
next prev parent reply other threads:[~2010-05-05 12:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 20:42 [PATCH 00/13] powerpc/47x: Support for 476 core - Version 2 Dave Kleikamp
2010-03-05 13:43 ` [PATCH 04/13] powerpc/476: add machine check handler for 47x core Dave Kleikamp
2010-05-05 12:27 ` Josh Boyer
2010-05-05 12:59 ` Josh Boyer [this message]
2010-05-05 13:05 ` Dave Kleikamp
2010-03-05 20:43 ` [PATCH 01/13] powerpc/booke: Add Stack Marking support to Booke Exception Prolog Dave Kleikamp
2010-03-05 20:43 ` [PATCH 02/13] powerpc/44x: break out cpu init code into stand-alone function Dave Kleikamp
2010-03-05 20:43 ` [PATCH 03/13] powerpc/47x: Base ppc476 support Dave Kleikamp
2010-03-05 20:43 ` [PATCH 05/13] powerpc/476: Add isync after loading mmu and debug spr's Dave Kleikamp
2010-03-07 23:08 ` Hollis Blanchard
2010-03-10 21:09 ` Dave Kleikamp
2010-03-05 20:43 ` [PATCH 07/13] powerpc/47x: defconfig for 476 on the iss 4xx simulator Dave Kleikamp
2010-03-05 20:43 ` [PATCH 08/13] powerpc/476: define specific cpu table entry DD1.1 core Dave Kleikamp
2010-03-05 20:43 ` [PATCH 09/13] powerpc/476: Workaround for dcbf/dcbz workaround on DD1 Dave Kleikamp
2010-03-05 20:43 ` [PATCH 10/13] powerpc/476: Add isync to the top of all exception handlers for DD1.1 core Dave Kleikamp
2010-03-05 20:43 ` [PATCH 11/13] powerpc/476: Software workaround to fix dcr read/write sequencing Dave Kleikamp
2010-03-05 20:44 ` [PATCH 12/13] powerpc/476: Workaround for DD1.1: Issue lwsync after mtpid Dave Kleikamp
2010-03-05 20:44 ` [PATCH 13/13] powerpc/476: Add dci instruction to async interrupt handlers on DD1 core Dave Kleikamp
2010-03-05 20:45 ` [PATCH 06/13] powerpc/4xx: Simple platform for the ISS 4xx simulator Dave Kleikamp
2010-05-05 15:11 ` Josh Boyer
2010-05-05 15:16 ` Dave Kleikamp
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=20100505125905.GH29593@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=Linuxppc-dev@ozlabs.org \
--cc=shaggy@linux.vnet.ibm.com \
--cc=torez@us.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).