Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3887C43217 for ; Wed, 24 Nov 2021 12:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344702AbhKXMih (ORCPT ); Wed, 24 Nov 2021 07:38:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:52018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243577AbhKXMbb (ORCPT ); Wed, 24 Nov 2021 07:31:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E3D961167; Wed, 24 Nov 2021 12:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756384; bh=opOnPafpuBBB6v2uuUKkjTqIxh8vuwvOEI0r+8axOuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MCE969EmEborrC6O8cCXJV3axzIPSvDkwWAn893b4YUfptHu0UrNwwWQcBaAUtCPq Z5E8TbzxoS7iUke++t676ddSNUpDkHt56mxj6m11DTLNEjlssbkGcgDPAy+BRPMZpK QgISqEaGP3DJUqnExBMyENBmfzDEljgqfvQsbcVg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Meeta Saggi , Eric Badger , Tony Luck Subject: [PATCH 4.14 035/251] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell Date: Wed, 24 Nov 2021 12:54:37 +0100 Message-Id: <20211124115711.464811671@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Badger commit 537bddd069c743759addf422d0b8f028ff0f8dbc upstream. The computation of TOHM is off by one bit. This missed bit results in too low a value for TOHM, which can cause errors in regular memory to incorrectly report: EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory Fixes: 50d1bb93672f ("sb_edac: add support for Haswell based systems") Cc: stable@vger.kernel.org Reported-by: Meeta Saggi Signed-off-by: Eric Badger Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20211010170127.848113-1-ebadger@purestorage.com Signed-off-by: Greg Kroah-Hartman --- drivers/edac/sb_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c @@ -1014,7 +1014,7 @@ static u64 haswell_get_tohm(struct sbrid pci_read_config_dword(pvt->info.pci_vtd, HASWELL_TOHM_1, ®); rc = ((reg << 6) | rc) << 26; - return rc | 0x1ffffff; + return rc | 0x3ffffff; } static u64 knl_get_tolm(struct sbridge_pvt *pvt)