From patchwork Tue Nov 15 03:11:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LeoLiu-oc X-Patchwork-Id: 13043189 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 766BAC433FE for ; Tue, 15 Nov 2022 03:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231807AbiKODLY (ORCPT ); Mon, 14 Nov 2022 22:11:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbiKODLX (ORCPT ); Mon, 14 Nov 2022 22:11:23 -0500 Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB9F2263D for ; Mon, 14 Nov 2022 19:11:21 -0800 (PST) X-ASG-Debug-ID: 1668481878-1eb14e7e6389870001-I98ny2 Received: from ZXSHMBX3.zhaoxin.com (ZXSHMBX3.zhaoxin.com [10.28.252.165]) by mx2.zhaoxin.com with ESMTP id 5A9uGEdVIYFdYG38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 15 Nov 2022 11:11:18 +0800 (CST) X-Barracuda-Envelope-From: LeoLiu-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Received: from ZXBJMBX03.zhaoxin.com (10.29.252.7) by ZXSHMBX3.zhaoxin.com (10.28.252.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 15 Nov 2022 11:11:18 +0800 Received: from localhost.localdomain (10.32.64.1) by ZXBJMBX03.zhaoxin.com (10.29.252.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 15 Nov 2022 11:11:16 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 From: LeoLiu-oc X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.7 To: , , , , , , , , , , , , CC: , , , leoliu-oc Subject: [PATCH v2 0/5] Parse the PCIe AER and set to relevant registers Date: Tue, 15 Nov 2022 11:11:15 +0800 X-ASG-Orig-Subj: [PATCH v2 0/5] Parse the PCIe AER and set to relevant registers Message-ID: <20221115031115.1666464-1-LeoLiu-oc@zhaoxin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.32.64.1] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To ZXBJMBX03.zhaoxin.com (10.29.252.7) X-Barracuda-Connect: ZXSHMBX3.zhaoxin.com[10.28.252.165] X-Barracuda-Start-Time: 1668481878 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 1247 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0485 1.0000 -1.7092 X-Barracuda-Spam-Score: -1.71 X-Barracuda-Spam-Status: No, SCORE=-1.71 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.102147 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: leoliu-oc According to the sec 18.3.2.4, 18.3.2.5 and 18.3.2.6 in ACPI r6.5, the register values form HEST PCI Express AER Structure should be written to relevant PCIe Device's AER Capabilities. So the purpose of the patch set is to extract register values from HEST PCI Express AER structures and program them into AER Capabilities. Refer to the ACPI Spec r6.5 for a more detailed description. v2: - Optimize the description of patches. - Adjusted the code logic in function apei_hest_parse_aer. leoliu-oc (5): ACPI/APEI: Add apei_hest_parse_aer() ACPI/APEI: Remove static from apei_hest_parse() ACPI/PCI: Add AER bits #defines for PCIe to PCI/PCI-X Bridge ACPI/PCI: Add pci_acpi_program_hest_aer_params() ACPI/PCI: Config PCIe devices's AER register drivers/acpi/apei/hest.c | 117 +++++++++++++++++++++++++++++++++- drivers/pci/pci-acpi.c | 92 ++++++++++++++++++++++++++ drivers/pci/pci.h | 5 ++ drivers/pci/probe.c | 1 + include/acpi/actbl1.h | 69 ++++++++++++++++++++ include/acpi/apei.h | 9 +++ include/uapi/linux/pci_regs.h | 5 ++ 7 files changed, 295 insertions(+), 3 deletions(-)