Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3183499rdb; Tue, 6 Feb 2024 09:24:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEb52R9/uwdVwMmcK6aS9M2sS3wuwYY/IPktD5kyq+xs+5WfywzdksK1HNuRyCg39uzFKCu X-Received: by 2002:a05:6a00:1c87:b0:6df:fbd9:6389 with SMTP id y7-20020a056a001c8700b006dffbd96389mr273884pfw.10.1707240242475; Tue, 06 Feb 2024 09:24:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707240242; cv=pass; d=google.com; s=arc-20160816; b=nky66dolXP9IgMycVkY2ubw8OoZ9k/1ZClK0ZmjeYRnORkLtjGF3mfqT5TmhUVXVCl EEjG1MO/BeTq3QxsshLT1hV4CvYLSxfGXwiBWwhC9CEuc1t+V9iRziWubcnKfzJ/49PN RcjAVSaWyWF5wB/i0WTkZnI7IEgL8p2r0W/k4ib4cqpj8h1qSh/uaxu/s1M7RQuq0tEs ZG04EhEOA3Y6Kvs7vnp2dnBY1gdkXzdO7trAMDQfS+b4mZJCUnRU5dq6m4yeqq6UfdBa jnWfEA5WsuXCwKwAHGgfZRVzQ7raq6rw3p5KtWJFrGUGgzMxstlMyncNTluyoi1MCEaQ mIgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=He9sHTO3yCMRrZ2WXlfT9Ytyc8Q9h3J/bSKNa0mKbLI=; fh=njQqGX0TaVOjIb0n8PwVZYwnOZlW33sNe6Bv7vAHf7o=; b=pvdgzSVqwURZoln3lxedxYEr2dM06TNdZV2mfq133q2SNyVHwrHbQYFlVbdIHEB6iA /h7kMqj3mHwSY5X2hoNBzFkHA7Q2javywUtXgSb4sNF38HLhCvvfKoqRT3x0yHSHQW5j +9GnaMkq4P5ZeGsFDdm4pHM895ezBRd7IoiheC7Q6MbVoYNdISdC66ivMPEWKaRiI4k1 SVM7sdOSxjkkpzj5yaDeGIcnQBPagwa29r8CMtX7d1+Taspx4cIfT2KzcCdVIXfqRrz/ ekBF46arp7+fwWZRfgFP7SvJqR03UjzRuLTLhZ0cg0iZyqMu1h+w9HqhZgFRdDUy81VT yoJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="VbH/xjJY"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55363-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55363-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUSh71CZ+s4JsHIVtgwyDJek1GfVOQ9589YcesJu6RsnWLzPo/KlACo5uFjjJWMJusJSNgM8ahQwEz+pg3TLcxFVBJNA/Kbdi18MrnNpA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id jc18-20020a056a006c9200b006e045c176fcsi1920218pfb.324.2024.02.06.09.24.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 09:24:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55363-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="VbH/xjJY"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55363-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55363-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 50FB5B21796 for ; Tue, 6 Feb 2024 17:23:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 773A6D51D; Tue, 6 Feb 2024 17:23:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VbH/xjJY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88E4CCA4A; Tue, 6 Feb 2024 17:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707240217; cv=none; b=W+NRZ+NbhvI6LkVxj25VuVzbT6bhH9pEyLGEyYuHKp8kyj0CisKCFo3AfoSS34wZtBlDHyTkollysPsYrt66B6rULPmCtx4BO2wsJ5XVIy8DiM9YRN34EW6q3ZiDFJqUG0njBOHACavmpRRg9whkJEW+vs5ebUcJ3iT9F5L3A1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707240217; c=relaxed/simple; bh=po8vFxWrgnIMI30IcGK3wKjOx+diDmMTZZJBoYh+eQs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=ptp/Ub1Vh+vRM3vexZNK4ipHEDE4MBnoiODARqM4nuUtT/wjZ76mPTUIrQIrF+NnmC6p2iZs6KhXvKQInMbbFWjvX9gXMgBQ/zzosX3e0m+o4wVJzj3LBZJ2llRSs9BwTTv91vEvUg1DrR7Ikdkklf/tDOvTariT/aj0KJcAzu0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VbH/xjJY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C145DC433F1; Tue, 6 Feb 2024 17:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707240217; bh=po8vFxWrgnIMI30IcGK3wKjOx+diDmMTZZJBoYh+eQs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=VbH/xjJYNUgcSHYX8q6R3XOgMBMYdLFz0wwh7u9in+aDxvfieDaQsfcKyvc8IJljm b4KjHmApQTFpV3dO3iDbgzIq452iChe4Hlh+NbWkOfvbUZAwcqMJKOmdrdWJDvx820 yGKAU6o3UzpUqJtxSEDdVVdgjfhrjOOzt539Zz72GbRfzqXZni2RnBmRWm0weRDqIa abarX5VsT/PfIoUpx71JSSklbKAA2HtBv69vFwRwxqV13L9xCWMblKCxtAmGpAIqwi 8sqKs24ZwA9C+e3TEvivW9S6Jps4z6qQAk8w70V+oieQDehciCMb6nvmk5plKPIwiL i1EveBd1FnZ6A== Date: Tue, 6 Feb 2024 11:23:35 -0600 From: Bjorn Helgaas To: "Wang, Qingshun" Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, chao.p.peng@linux.intel.com, erwin.tsaur@intel.com, feiting.wanyan@intel.com, qingshun.wang@intel.com, "Rafael J. Wysocki" , Len Brown , James Morse , Tony Luck , Borislav Petkov , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Bjorn Helgaas , Mahesh J Salgaonkar , Oliver O'Halloran , Miaohe Lin , Shiju Jose , Adam Preble , Li Yang , Lukas Wunner , Kuppuswamy Sathyanarayanan , Smita Koralahalli , Robert Richter , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-edac@vger.kernel.org Subject: Re: [PATCH v2 1/4] PCI/AER: Store more information in aer_err_info Message-ID: <20240206172335.GA872811@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2rfnevhnhylik4r6smr56uunsxweo7s5elo65sjhiztvxnr6bq@5fcyv22zxyyp> On Wed, Feb 07, 2024 at 12:41:41AM +0800, Wang, Qingshun wrote: > On Mon, Feb 05, 2024 at 05:12:31PM -0600, Bjorn Helgaas wrote: > > On Thu, Jan 25, 2024 at 02:27:59PM +0800, Wang, Qingshun wrote: > > > When Advisory Non-Fatal errors are raised, both correctable and > > > uncorrectable error statuses will be set. The current kernel code cannot > > > store both statuses at the same time, thus failing to handle ANFE properly. > > > In addition, to avoid clearing UEs that are not ANFE by accident, UE > > > severity and Device Status also need to be recorded: any fatal UE cannot > > > be ANFE, and if Fatal/Non-Fatal Error Detected is set in Device Status, do > > > not take any assumption and let UE handler to clear UE status. > > > > > > Store status and mask of both correctable and uncorrectable errors in > > > aer_err_info. The severity of UEs and the values of the Device Status > > > register are also recorded, which will be used to determine UEs that should > > > be handled by the ANFE handler. Refactor the rest of the code to use > > > cor/uncor_status and cor/uncor_mask fields instead of status and mask > > > fields. > > > > There's a lot going on in this patch. Could it possibly be split up a > > bit, e.g., first tease apart aer_err_info.status/.mask into > > .cor_status/mask and .uncor_status/mask, then add .uncor_severity, > > then add the device_status bit separately? If it could be split up, I > > think the ANFE case would be easier to see. > > Thanks for the feedback! Will split it up into two pacthes in the next > version. Or even three: 1) tease apart aer_err_info.status/.mask into .cor_status/mask and .uncor_status/mask 2) add .uncor_severity 3) add device_status Looking at this again, I'm a little confused about 2) and 3). I see the new read of PCI_ERR_UNCOR_SEVER into .uncor_severity, but there's no actual *use* of it. Same for 3), I see the new read of PCI_EXP_DEVSTA, but AFAICS there's no use of that value. We should have the addition of these new values in the same patch that *uses* them. Bjorn