From mboxrd@z Thu Jan 1 00:00:00 1970 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 3B9C2C77B71 for ; Fri, 14 Apr 2023 21:49:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjDNVtX (ORCPT ); Fri, 14 Apr 2023 17:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjDNVtV (ORCPT ); Fri, 14 Apr 2023 17:49:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6459819A2; Fri, 14 Apr 2023 14:49:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A960264998; Fri, 14 Apr 2023 21:49:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDAA5C433EF; Fri, 14 Apr 2023 21:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681508959; bh=1x7EeM3VZ+EADcoA4/MQ8ManxznxDJ06SrvK/B28czY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=buZL1sGMoy9FUtbGI+SKPAjVXE/ApbZRPVdEhzF5fgwsrF+S5TyVwqkdw1ffvFIhv d7kJg+pZpaE/I8r5dztw0BY9z3yT5AcfzB9enLYzZ5dtfm//nJSyOkf4X2Fx22yR/4 RNwGj7CSMBBvAaq4NptWIRn5GlMvi5HWe+i8p3KsMDT8L71rv3py005BUOgMr5l9Qa AHVMVeih/iJM2dikBR0OoPsc4oY8s5H6JfcZtvL4kvUPJgLVoJy5JIS1x2VYe0ipag iX9G2b1kOubjkeH8LZ9uX2+FUFv/N7C/r0lzuLwJsXTIOrRCzuNCJ9WsKX9WzFL16T oa6Ri90e7zJZQ== Date: Fri, 14 Apr 2023 16:49:17 -0500 From: Bjorn Helgaas To: Robert Richter Cc: Terry Bowman , alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, bwidawsk@kernel.org, dan.j.williams@intel.com, dave.jiang@intel.com, Jonathan.Cameron@huawei.com, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, Oliver O'Halloran , Mahesh J Salgaonkar , linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling Message-ID: <20230414214917.GA221407@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 13, 2023 at 03:38:07PM +0200, Robert Richter wrote: > On 12.04.23 16:29:01, Bjorn Helgaas wrote: > > On Tue, Apr 11, 2023 at 01:03:02PM -0500, Terry Bowman wrote: > > > From: Robert Richter > > > > > > RCEC AER corrected and uncorrectable internal errors (CIE/UIE) are > > > disabled by default. > > > +static void cxl_unmask_internal_errors(struct pci_dev *rcec) > > Also renaming this to cxl_enable_rcec() to more generalize the > function. I didn't follow this. "cxl_enable_rcec" doesn't say anything about "unmasking" or "internal errors", which seems like the whole point. And the function doesn't actually *enable* and RCEC. > > > +{ > > > + if (!handles_cxl_errors(rcec)) > > > + return; > > > + > > > + if (__cxl_unmask_internal_errors(rcec)) > > > + dev_err(&rcec->dev, "cxl: Failed to unmask internal errors"); > > > + else > > > + dev_dbg(&rcec->dev, "cxl: Internal errors unmasked"); > > I am going to change this to a pci_info() for alignment with other > messages around: > > [ 14.200265] pcieport 0000:40:00.3: PME: Signaling with IRQ 44 > [ 14.213925] pcieport 0000:40:00.3: AER: cxl: Internal errors unmasked > [ 14.228413] pcieport 0000:40:00.3: AER: enabled with IRQ 44 > > Plus, using pci_err() instead of dev_err(). Thanks for that! Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8EA1C77B71 for ; Fri, 14 Apr 2023 21:50:10 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Pyqqj1CTZz3f5K for ; Sat, 15 Apr 2023 07:50:09 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=buZL1sGM; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=helgaas@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=buZL1sGM; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Pyqpn2wM9z3bgn for ; Sat, 15 Apr 2023 07:49:21 +1000 (AEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F62260C13; Fri, 14 Apr 2023 21:49:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDAA5C433EF; Fri, 14 Apr 2023 21:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681508959; bh=1x7EeM3VZ+EADcoA4/MQ8ManxznxDJ06SrvK/B28czY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=buZL1sGMoy9FUtbGI+SKPAjVXE/ApbZRPVdEhzF5fgwsrF+S5TyVwqkdw1ffvFIhv d7kJg+pZpaE/I8r5dztw0BY9z3yT5AcfzB9enLYzZ5dtfm//nJSyOkf4X2Fx22yR/4 RNwGj7CSMBBvAaq4NptWIRn5GlMvi5HWe+i8p3KsMDT8L71rv3py005BUOgMr5l9Qa AHVMVeih/iJM2dikBR0OoPsc4oY8s5H6JfcZtvL4kvUPJgLVoJy5JIS1x2VYe0ipag iX9G2b1kOubjkeH8LZ9uX2+FUFv/N7C/r0lzuLwJsXTIOrRCzuNCJ9WsKX9WzFL16T oa6Ri90e7zJZQ== Date: Fri, 14 Apr 2023 16:49:17 -0500 From: Bjorn Helgaas To: Robert Richter Subject: Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling Message-ID: <20230414214917.GA221407@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alison.schofield@intel.com, dave.jiang@intel.com, Terry Bowman , vishal.l.verma@intel.com, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, Mahesh J Salgaonkar , bhelgaas@google.com, Oliver O'Halloran , Jonathan.Cameron@huawei.com, bwidawsk@kernel.org, dan.j.williams@intel.com, ira.weiny@intel.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Apr 13, 2023 at 03:38:07PM +0200, Robert Richter wrote: > On 12.04.23 16:29:01, Bjorn Helgaas wrote: > > On Tue, Apr 11, 2023 at 01:03:02PM -0500, Terry Bowman wrote: > > > From: Robert Richter > > > > > > RCEC AER corrected and uncorrectable internal errors (CIE/UIE) are > > > disabled by default. > > > +static void cxl_unmask_internal_errors(struct pci_dev *rcec) > > Also renaming this to cxl_enable_rcec() to more generalize the > function. I didn't follow this. "cxl_enable_rcec" doesn't say anything about "unmasking" or "internal errors", which seems like the whole point. And the function doesn't actually *enable* and RCEC. > > > +{ > > > + if (!handles_cxl_errors(rcec)) > > > + return; > > > + > > > + if (__cxl_unmask_internal_errors(rcec)) > > > + dev_err(&rcec->dev, "cxl: Failed to unmask internal errors"); > > > + else > > > + dev_dbg(&rcec->dev, "cxl: Internal errors unmasked"); > > I am going to change this to a pci_info() for alignment with other > messages around: > > [ 14.200265] pcieport 0000:40:00.3: PME: Signaling with IRQ 44 > [ 14.213925] pcieport 0000:40:00.3: AER: cxl: Internal errors unmasked > [ 14.228413] pcieport 0000:40:00.3: AER: enabled with IRQ 44 > > Plus, using pci_err() instead of dev_err(). Thanks for that! Bjorn