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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DDFCC433EF for ; Tue, 16 Nov 2021 02:26:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 292CD61B68 for ; Tue, 16 Nov 2021 02:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242674AbhKPC3e (ORCPT ); Mon, 15 Nov 2021 21:29:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:53034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236555AbhKORP7 (ORCPT ); Mon, 15 Nov 2021 12:15:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CFC6B6120F; Mon, 15 Nov 2021 17:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636996333; bh=CLgcuZ1J6nr6wGWkCaTe1NScLDXUWv54Dd/V71XVwUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fv56P/SoDnHhz/AoZK/Qc6MZeiAUsDjChzDrlbnV7Gzf/0fDamzRqo0zu9T1YMPFt D15axX1cFKKBngBX4xn1HDFPt4UceIiIRbMKwL91efI8EY95RszmUaRpfmmRu+Hxyh Fh3wTM99lFRpXt+YxOj8CBG+SwRf++XeEWWJQdcc= 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 5.4 068/355] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell Date: Mon, 15 Nov 2021 17:59:52 +0100 Message-Id: <20211115165316.006547160@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165313.549179499@linuxfoundation.org> References: <20211115165313.549179499@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 @@ -1055,7 +1055,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)