From: Kumar Gala <galak@kernel.crashing.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Jeff Haran" <jharan@Brocade.COM>, <linux-kernel@vger.kernel.org>,
Dave Jiang <djiang@mvista.com>,
Doug Thompson <dougthompson@xmission.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Kumar Gala <galak@gate.crashing.org>,
linuxppc-dev@ozlabs.org
Subject: Re: bug in drivers/edac/mpc85xx_edac.c:mpc85xx_mc_check()
Date: Wed, 29 Apr 2009 07:46:37 -0500 [thread overview]
Message-ID: <66D3881A-A16D-4051-9073-1FF28C4F4742@kernel.crashing.org> (raw)
In-Reply-To: <20090429003704.1c37d6e1.akpm@linux-foundation.org>
On Apr 29, 2009, at 2:37 AM, Andrew Morton wrote:
> Let's cc the suitable people.
>
> On Tue, 28 Apr 2009 18:23:42 -0700 "Jeff Haran" <jharan@Brocade.COM>
> wrote:
>
>> Hi,
>>
>> Recent versions of this function contain the following snippets:
>>
>> if (err_detect & DDR_EDE_SBE)
>> edac_mc_handle_ce(mci, pfn, err_addr & PAGE_MASK,
>> syndrome, row_index, 0, mci->ctl_name);
>>
>> if (err_detect & DDR_EDE_MBE)
>> edac_mc_handle_ue(mci, pfn, err_addr & PAGE_MASK,
>> row_index, mci->ctl_name);
>>
>> I am pretty sure the references to PAGE_MASK should be proceeded by a
>> tilda, as in:
>>
>> if (err_detect & DDR_EDE_SBE)
>> edac_mc_handle_ce(mci, pfn, err_addr & ~PAGE_MASK,
>> syndrome, row_index, 0, mci->ctl_name);
>>
>> if (err_detect & DDR_EDE_MBE)
>> edac_mc_handle_ue(mci, pfn, err_addr & ~PAGE_MASK,
>> row_index, mci->ctl_name);
>>
>
> Could well be. PAGE_MASK is very easy to get wrong. I've _never_
> trusted my own memory of it and I always have to go back to the
> definition when reviewing code :(
This should ~PAGE_MASK to get the offset into the page.
>> Much as I would like to submit a tested patch like the rest of the
>> world, I find myself in the situation where the only Freescale target
>> system I have to test on is running a 3 year old kernel (2.6.14),
>> which
>> preceeds the introduction of EDAC driver support, at least for
>> Freescale. So the best I can do is borrow from the new EDAC driver
>> and
>> backport it to the old kernel.
>>
>> But I have learned a few things in this process and can thus share
>> what
>> I've learned as it may be of help to the EDAC driver developers:
>>
>> 1) Before you read the Freescale 8548 CAPTURE_ADDRESS register, you
>> want
>> to read CAPTURE_ATTRIBUTES first and make sure the VLD bit (least
>> significant bit in the register) is set or else the data in
>> CAPTURE_ADDRESS may not be yet valid.
>>
>> 2) When you are done scrubbing the memory with the single bit
>> error, you
>> want to write 0 to CAPTURE_ATTRIBUTES so as to clear VLD and thus
>> setup
>> the ECC capture logic to capture the next single bit error.
This is a correct description based on how FSL error HW works.
- k
next prev parent reply other threads:[~2009-04-29 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 1:23 Jeff Haran
2009-04-29 7:37 ` Andrew Morton
2009-04-29 12:46 ` Kumar Gala [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-29 4:12 Doug Thompson
2009-04-08 21:57 bug in drivers/edac/mpc85xx_edac.c:mpc85xx_mc_check() ? Jeff Haran
2009-04-10 21:47 ` Andrew Morton
2009-04-13 17:10 ` Dave Jiang
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=66D3881A-A16D-4051-9073-1FF28C4F4742@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=djiang@mvista.com \
--cc=dougthompson@xmission.com \
--cc=galak@gate.crashing.org \
--cc=jharan@Brocade.COM \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®