Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp206305ybj; Wed, 6 May 2020 15:21:24 -0700 (PDT) X-Google-Smtp-Source: APiQypL9Cqzdz9UiTosZEVZaJ9Qn18ikN58P82u4YIj2tbM1BG7J+1TSwRuhDnIuxyNugFnbjkVV X-Received: by 2002:a17:906:a857:: with SMTP id dx23mr9717735ejb.52.1588803684218; Wed, 06 May 2020 15:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588803684; cv=none; d=google.com; s=arc-20160816; b=x3epbls5kZyjDQN2mNivtJIRzWUAYUzxRUL3PBUbdDZM+Jt6to6hvs7hbah5P0oAzy Zu9LAgMYRUAGnI4N3h23nlHHjJOZ7eDGUpld5JnqqS55hdaCkDjXpukwIRPGBzUK3r1C kFhcP9hSoLUAoQwQcvW+09kBy9X9gDfl02k+D482e2bQmdBlKkZiPbauETxyWo0VjO2o VJmuxJrImNjXWneWqX5euE/GaNz1UlNjf2rubkj+x10rr5fl5rPTMxYs7ZHDjMPnMxsZ peCoTLf4VNSHlrf4mmXd/iyKNtIzbWAyT5sjiMEHxaAYg8o1KVWieb0TlZFDOaxuxzyt wEKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ro+PNXqIlV7JhSwz5AxKQ2sQHdX/vdAFMRY81roPDlQ=; b=c/I4AaAFmHUNqsUlwSzocpG0eQUZ9lky84O5GLoSAz+t3XCsZ/PTO6Ys5al5FUuXRv UzYaRs/CPeCAtUhkUYZB2urRwRcLTVJcdrN+b7bvL7PczxvEl0ZuhmX30ayobwGfpAKw 7UYqcMQE+392wRW0LPItHyUZZqTSngKVUFkMXV/rRnyWmt+MHmG3Wn+t/KSvOUFM1r9Z KkKWpsapyFug8/5ESmiXAZeh4hnWHBd+xGwKtKGwDq8B/IvIUV/llpXYS4fDgsWH++7h W8Sb0wn22deASJC/S+lKVYv/2xJ2Yrv607YOToGbapYLEzt/T/lx/ShO+PaLtS8qK6bP f6CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v28si1896128edx.335.2020.05.06.15.21.01; Wed, 06 May 2020 15:21:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730289AbgEFWSG (ORCPT + 99 others); Wed, 6 May 2020 18:18:06 -0400 Received: from mail.ispras.ru ([83.149.199.45]:45370 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729114AbgEFWSG (ORCPT ); Wed, 6 May 2020 18:18:06 -0400 X-Greylist: delayed 477 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 May 2020 18:18:05 EDT Received: from localhost.localdomain (unknown [46.188.10.168]) by mail.ispras.ru (Postfix) with ESMTPSA id C2AFDCD460; Thu, 7 May 2020 01:10:06 +0300 (MSK) From: Alexander Monakov To: linux-kernel@vger.kernel.org Cc: Alexander Monakov , Borislav Petkov , linux-edac@vger.kernel.org Subject: [PATCH] EDAC/amd64: Dump registers before checking ECC Date: Wed, 6 May 2020 22:06:42 +0000 Message-Id: <20200506220642.32717-1-amonakov@ispras.ru> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move dump_misc_regs earlier so decoded register contents are shown even if ECC cannot be enabled. The dump gives info such as number of memory controllers, so it serves as a sensible smoke-check even on platforms without ECC memory. Signed-off-by: Alexander Monakov Cc: Borislav Petkov Cc: linux-edac@vger.kernel.org --- Hi, I used this patch when testing EDAC on AMD Family 17h Model 60h CPU, which needs another patch (adding PCI ids) that I intend to send shortly. I think it would be useful to have this upstream. drivers/edac/amd64_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index f91f3bc1e0b2..1136500c5f53 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3533,6 +3533,8 @@ static int probe_one_instance(unsigned int nid) goto err_enable; } + dump_misc_regs(pvt); + if (!ecc_enabled(pvt)) { ret = -ENODEV; @@ -3559,8 +3561,6 @@ static int probe_one_instance(unsigned int nid) goto err_enable; } - dump_misc_regs(pvt); - return ret; err_enable: -- 2.26.2