From: Borislav Petkov <bp@amd64.org>
To: Han Pingtian <phan@redhat.com>
Cc: mchehab@redhat.com, linux-kernel@vger.kernel.org,
edac-devel <linux-edac@vger.kernel.org>
Subject: Re: [PATCH] Fix EDAC sdram_scrub_rate read failure
Date: Fri, 16 Sep 2011 14:53:27 +0200 [thread overview]
Message-ID: <20110916125326.GA1957@gere.osrc.amd.com> (raw)
In-Reply-To: <20110916105856.GA13253@hpt.nay.redhat.com>
On Fri, Sep 16, 2011 at 06:58:56PM +0800, Han Pingtian wrote:
> If sdram scrubbing rate ins't implemented on current system, read it
> will cause an error:
>
> cat: /sys/devices/system/edac/mc//mc0/sdram_scrub_rate: Invalid argument
>
> The eba042a81edd6baaff44831b2d719b14a6d21e58 let it returning -EINVAL,
Can you please add the patch author to CC next time, out of courtesy?
Thanks.
> but according to the document, it should show -1:
>
> dram memory scrubbing rate:
>
> 'sdram_scrub_rate'
>
> Read/Write attribute file that controls memory scrubbing. The scrubbing
> rate is set by writing a minimum bandwidth in bytes/sec to the attribute
> file. The rate will be translated to an internal value that gives at
> least the specified rate.
>
> Reading the file will return the actual scrubbing rate employed.
>
> If configuration fails or memory scrubbing is not implemented, the value
> of the attribute file will be -1.
>
> Signed-off-by: Han Pingtian <phan@redhat.com>
> ---
> drivers/edac/edac_mc_sysfs.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
> index 29ffa35..602fdcf 100644
> --- a/drivers/edac/edac_mc_sysfs.c
> +++ b/drivers/edac/edac_mc_sysfs.c
> @@ -475,7 +475,7 @@ static ssize_t mci_sdram_scrub_rate_show(struct mem_ctl_info *mci, char *data)
> int bandwidth = 0;
>
> if (!mci->get_sdram_scrub_rate)
> - return -EINVAL;
> + return sprintf(date, "%d\n", -1);
Have you even build-tested your patch:
drivers/edac/edac_mc_sysfs.c: In function ‘mci_sdram_scrub_rate_show’:
drivers/edac/edac_mc_sysfs.c:478: error: ‘date’ undeclared (first use in this function)
drivers/edac/edac_mc_sysfs.c:478: error: (Each undeclared identifier is reported only once
drivers/edac/edac_mc_sysfs.c:478: error: for each function it appears in.)
make[2]: *** [drivers/edac/edac_mc_sysfs.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/edac] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
>
> bandwidth = mci->get_sdram_scrub_rate(mci);
> if (bandwidth < 0) {
Anyway, the EDAC document says that sdram_scrub_rate is
read/write and when writing you have to write -1 too. Care to fix
mci_sdram_scrub_rate_store too, test your patch properly and resend?
Thanks.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2011-09-16 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 10:58 Han Pingtian
2011-09-16 12:53 ` Borislav Petkov [this message]
2011-09-19 7:37 ` [PATCH v2] Fix EDAC sdram_scrub_rate read/write failure Han Pingtian
2011-09-19 14:20 ` Borislav Petkov
2011-09-19 20:23 ` Luck, Tony
2011-09-21 12:33 ` Borislav Petkov
2011-09-21 15:41 ` Luck, Tony
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=20110916125326.GA1957@gere.osrc.amd.com \
--to=bp@amd64.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=phan@redhat.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
Powered by JetHome