From: Aristeu Rozanski Date: Mon, 2 Jun 2014 18:15:27 +0000 (-0300) Subject: sb_edac: fix socket detection on Ivy Bridge controllers X-Git-Tag: v3.17-rc1~12^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ff3a308b5c776bdf4641311b87c843fe1bc3785;p=thirdparty%2Fkernel%2Flinux.git sb_edac: fix socket detection on Ivy Bridge controllers This patch fixes the obvious bug while handling the socket/HA bitmask used in Ivy Bridge memory controllers. Cc: Tony Luck Signed-off-by: Aristeu Rozanski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index 3411f502a3745..939b54c4a87c2 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c @@ -616,7 +616,7 @@ static u8 get_node_id(struct sbridge_pvt *pvt) static inline u8 sad_pkg_socket(u8 pkg) { /* on Ivy Bridge, nodeID is SASS, where A is HA and S is node id */ - return (pkg >> 3) | (pkg & 0x3); + return ((pkg >> 3) << 2) | (pkg & 0x3); } static inline u8 sad_pkg_ha(u8 pkg)