EDAC/sb_edac: Fix computation of channel address
authorLuck, Tony <tony.luck@intel.com>
Thu, 10 Mar 2016 00:40:48 +0000 (16:40 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:50:52 +0000 (08:50 -0400)
commitb314ace942506718f3c3bc2787f700bf49d84ea2
tree99656c67e952e6df873702f94b16df9a6e0f3aa1
parent3b6a70271a4e1e72585b3a7236cbd17d646b38d1
EDAC/sb_edac: Fix computation of channel address

[ Upstream commit eb1af3b71f9d83e45f2fd2fd649356e98e1c582c ]

Large memory Haswell-EX systems with multiple DIMMs per channel were
sometimes reporting the wrong DIMM.

Found three problems:

 1) Debug printouts for socket and channel interleave were not interpreting
    the register fields correctly. The socket interleave field is a 2^X
    value (0=1, 1=2, 2=4, 3=8). The channel interleave is X+1 (0=1, 1=2,
    2=3. 3=4).

 2) Actual use of the socket interleave value didn't interpret as 2^X

 3) Conversion of address to channel address was complicated, and wrong.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/edac/sb_edac.c