From: Borislav Petkov <bp@alien8.de>
To: Tony Luck <tony.luck@intel.com>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
Aristeu Rozanski <aris@redhat.com>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>,
linux-edac@vger.kernel.org
Subject: EDAC, skx_edac: Fix logical channel intermediate decoding bug
Date: Tue, 9 Oct 2018 19:38:06 +0200 [thread overview]
Message-ID: <20181009173806.GI16287@zn.tnic> (raw)
On Tue, Oct 09, 2018 at 10:20:25AM -0700, Tony Luck wrote:
> From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
>
> The code "lchan = (lchan << 1) | ~lchan" for logical channel
> intermediate decoding is wrong. The wrong intermediate decoding
> result is {0xffffffff, 0xfffffffe}.
>
> Fix it by replacing '~' with '!'. The correct intermediate
> decoding result is {0x1, 0x2}.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> drivers/edac/skx_edac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c
> index fae095162c01..45c5a8931a58 100644
> --- a/drivers/edac/skx_edac.c
> +++ b/drivers/edac/skx_edac.c
> @@ -668,7 +668,7 @@ static bool skx_sad_decode(struct decoded_addr *res)
> break;
> case 2:
> lchan = (addr >> shift) % 2;
> - lchan = (lchan << 1) | ~lchan;
> + lchan = (lchan << 1) | !lchan;
> break;
> case 3:
> lchan = ((addr >> shift) % 2) << 1;
> --
Applied, thanks.
next reply other threads:[~2018-10-09 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 17:38 Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-09 17:20 EDAC, skx_edac: Fix logical channel intermediate decoding bug 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=20181009173806.GI16287@zn.tnic \
--to=bp@alien8.de \
--cc=aris@redhat.com \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=qiuxu.zhuo@intel.com \
--cc=tony.luck@intel.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