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 8F2E6C2D0CD for ; Wed, 21 May 2025 09:00:43 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4b2QPQ0fvRz3bsS; Wed, 21 May 2025 19:00:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=185.176.79.56 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747818042; cv=none; b=M7vpvOfi6uCvlDY3nHM7af953YIFrzaLtX0PfCijH0/yt7FW9jU9pnst77qfbPgli6pAxoWpMEfY5znpmPa1Jl5VlQWCb6lTjYogqqcHNlf1MLRvgzMafFKs0HuLmztKF/9tIpHCy3LY0AKKDjxRaxicWtz574f46yAIps2fzU80y2WAey7M7u7pvifcf95KBl4fckNKo5+hL5E4nEh3hOioFvt1VRUrITC8qYYWTR7CAbqm1VVs+NYsqSN1FhKhNcy5LJdHMtjxtfSKbiJSvzxopvZA0tFBCB+kMkM1hF2zWqSCxhAV1daK/B2UF9Dhqd5khwNhftTdVBcJ9wMjtg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747818042; c=relaxed/relaxed; bh=eloPbXbomFIUCljQCzRRsDs7elU4pw5qp/t93CaYODw=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hV0jxMahYiZ52SNlJzMFds1ubEvZ1Z0ypyQLk8K9nnOz5VbERlBQYcC4e2FvJeiRQEay7r4YmQ+OL7Vt4p6x9dRyO85O3hf+yIkDO6ifIG7MQj5Cvvy43+pyCCvrYqUeQ9WaNGhB0476/G2fXKjJFe0hpLXzZlyFdp5V44ci9I3ZOxLY5MQHhqTrObfAPciamgFq3f3ZNukVusBGFDgntnp+4AZ/jOsxfII11AyGvYG0k7VeNNGFNnGUCZNsSYEyQaaLqiI6pCjHsYx+SzcZ8REPEp118NgJMdj+LtMzeNk1e/tll9JaprD+Sa08xCT1QNwIN//NUbcIaMnR9i6FJQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass (client-ip=185.176.79.56; helo=frasgout.his.huawei.com; envelope-from=jonathan.cameron@huawei.com; receiver=lists.ozlabs.org) smtp.mailfrom=huawei.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=185.176.79.56; helo=frasgout.his.huawei.com; envelope-from=jonathan.cameron@huawei.com; receiver=lists.ozlabs.org) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 4b2QPP0r42z3bsQ for ; Wed, 21 May 2025 19:00:41 +1000 (AEST) Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4b2QNK2mzjz6GDGS; Wed, 21 May 2025 16:59:45 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 06F41140557; Wed, 21 May 2025 17:00:38 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 21 May 2025 11:00:36 +0200 Date: Wed, 21 May 2025 10:00:35 +0100 From: Jonathan Cameron To: Bjorn Helgaas CC: , Jon Pan-Doh , "Karolina Stolarek" , Weinan Liu , Martin Petersen , Ben Fuller , Drew Walton , "Anil Agrawal" , Tony Luck , Ilpo =?UTF-8?Q?J=C3=A4rvinen?= , "Sathyanarayanan Kuppuswamy" , Lukas Wunner , Sargun Dhillon , "Paul E . McKenney" , Mahesh J Salgaonkar , "Oliver O'Halloran" , Kai-Heng Feng , "Keith Busch" , Robert Richter , Terry Bowman , Shiju Jose , Dave Jiang , , , Bjorn Helgaas , Krzysztof =?UTF-8?Q?Wilczy=C5=84ski?= Subject: Re: [PATCH v7 02/17] PCI/DPC: Log Error Source ID only when valid Message-ID: <20250521100035.0000544e@huawei.com> In-Reply-To: <20250520215047.1350603-3-helgaas@kernel.org> References: <20250520215047.1350603-1-helgaas@kernel.org> <20250520215047.1350603-3-helgaas@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To frapeml500008.china.huawei.com (7.182.85.71) On Tue, 20 May 2025 16:50:19 -0500 Bjorn Helgaas wrote: > From: Bjorn Helgaas >=20 > DPC Error Source ID is only valid when the DPC Trigger Reason indicates > that DPC was triggered due to reception of an ERR_NONFATAL or ERR_FATAL > Message (PCIe r6.0, sec 7.9.14.5). >=20 > When DPC was triggered by ERR_NONFATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_NF= E) > or ERR_FATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE) from a downstream device, > log the Error Source ID (decoded into domain/bus/device/function). Don't > print the source otherwise, since it's not valid. >=20 > For DPC trigger due to reception of ERR_NONFATAL or ERR_FATAL, the dmesg > logging changes: >=20 > - pci 0000:00:01.0: DPC: containment event, status:0x000d source:0x0200 > - pci 0000:00:01.0: DPC: ERR_FATAL detected > + pci 0000:00:01.0: DPC: containment event, status:0x000d, ERR_FATAL re= ceived from 0000:02:00.0 >=20 > and when DPC triggered for other reasons, where DPC Error Source ID is > undefined, e.g., unmasked uncorrectable error: >=20 > - pci 0000:00:01.0: DPC: containment event, status:0x0009 source:0x0200 > - pci 0000:00:01.0: DPC: unmasked uncorrectable error detected > + pci 0000:00:01.0: DPC: containment event, status:0x0009: unmasked unc= orrectable error detected >=20 > Previously the "containment event" message was at KERN_INFO and the > "%s detected" message was at KERN_WARNING. Now the single message is at > KERN_WARNING. >=20 > Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczy=C5=84ski > Reviewed-by: Kuppuswamy Sathyanarayanan Matches the spec conditions as far as I can tell. I guess interesting debate on whether providing extra garbage info is a bug or not. Maybe a fixes tag for this one as well? Reviewed-by: Jonathan Cameron I briefly wondered if it makes sense to have a prefix string initialized outside the switch with "containment event, status:%#06x:" made sense but it's probably not worth the effort and maybe makes it harder to grep for the error messages. So in the end I think your code here is the best option. Jonathan