diff options
author | Qiuxu Zhuo <qiuxu.zhuo@intel.com> | 2018-10-09 10:20:25 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:44 -0800 |
commit | 51819131edabfbb96b8495b875a73d58a10d53cf (patch) | |
tree | 525e20faff75aa0c8084c8b310747b118245a850 /drivers/edac | |
parent | 5d1267c68169de90ef1157751d37ac7d3ee3470f (diff) | |
download | linux-stable-51819131edabfbb96b8495b875a73d58a10d53cf.tar.gz linux-stable-51819131edabfbb96b8495b875a73d58a10d53cf.tar.bz2 linux-stable-51819131edabfbb96b8495b875a73d58a10d53cf.zip |
EDAC, skx_edac: Fix logical channel intermediate decoding
commit 8f18973877204dc8ca4ce1004a5d28683b9a7086 upstream.
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}.
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Aristeu Rozanski <aris@redhat.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-edac <linux-edac@vger.kernel.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20181009172025.18594-1-tony.luck@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/skx_edac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c index 3c5c95428f1d..4ba92f1dd0f7 100644 --- a/drivers/edac/skx_edac.c +++ b/drivers/edac/skx_edac.c @@ -668,7 +668,7 @@ sad_found: break; case 2: lchan = (addr >> shift) % 2; - lchan = (lchan << 1) | ~lchan; + lchan = (lchan << 1) | !lchan; break; case 3: lchan = ((addr >> shift) % 2) << 1; |