Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp897311pxb; Wed, 27 Oct 2021 14:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3QQ0XDPAgnmcLo0d83qpXqNxuueYw/StqmmmzxPry3GjFZ8vdQTJ/hNM3B10n0IIpDhBD X-Received: by 2002:a17:90b:4a8d:: with SMTP id lp13mr8497187pjb.240.1635370951084; Wed, 27 Oct 2021 14:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370951; cv=none; d=google.com; s=arc-20160816; b=vsdqnKCo4huS08uESItneZPV9aEkC9DDolHxEAB9rTjEZQIUxhJvPiaTrN4pOwKj4L n7G2SmJ3eTdXFyBP1rMkOvfnfde334O8gfGzLFEL+yTGfJkGoRn+kV0HB/PPSHg05Vqh a4g1iecoQJleaQ1hUQIOGR/c8yigKudQVTXV2Qol6jMzmrots3AyqftFqLfWJ+avQ9xh Szzwe2/HbbGeHVnZKlYo08yhSMAliOFeAahsVrC51VUR/Xcum/RuFGvKu1W6bzxJIVIL 0ZLa7Sdt5JNrMCs8fsF/8r7d0JreKf3iI9mMQRQ9nVsWpeObJLVpIB/hOJpqhut0FMeG HZSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WhxnRTw1xrG9YHWRnZy1Qf7ImAv9O+h9UiCdFzt7+SM=; b=mp/gFUVbjQIRV7hQjstNcGbgGrr6Gm+P+z65CO0ar9dwf3JifcPC5cqWmu2nZHIrNE ePUqBnVUhdZYs+1VuHCyDKVRVgQuypmVAKJFQVNdaI6nQRxqXOggbkM7Nh5f38BIUH7b 9Bu86w1aAJRABDUEcLAjXotZqtVg00w36IWkshJOUecNssmPjD85JJvvLtoHXIuryR+T isvya36fdXbR2ZA0WiqYSpAm4JU5HBTK7++YZ99iq3xvx4/21jWxoof8Eo9iCvAcKVpq uWWxdVfcoUrcK/D2zqL6h1vN2KpqgpbahVGeYEB0paan+RILtsolvb8183+FjJRwTT1i 0deA== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si1601707plh.392.2021.10.27.14.42.18; Wed, 27 Oct 2021 14:42:31 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240782AbhJ0INM (ORCPT + 99 others); Wed, 27 Oct 2021 04:13:12 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:55690 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240780AbhJ0INL (ORCPT ); Wed, 27 Oct 2021 04:13:11 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=xuesong.chen@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0Uts4e-Z_1635322242; Received: from localhost.localdomain(mailfrom:xuesong.chen@linux.alibaba.com fp:SMTPD_---0Uts4e-Z_1635322242) by smtp.aliyun-inc.com(127.0.0.1); Wed, 27 Oct 2021 16:10:43 +0800 From: Xuesong Chen To: helgaas@kernel.org Cc: catalin.marinas@arm.com, lorenzo.pieralisi@arm.com, james.morse@arm.com, will@kernel.org, rafael@kernel.org, tony.luck@intel.com, bp@alien8.de, mingo@kernel.org, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xuesong.chen@linux.alibaba.com Subject: [PATCH v4 0/4] PCI MCFG consolidation and APEI resource filtering Date: Wed, 27 Oct 2021 16:10:35 +0800 Message-Id: <20211027081035.53370-1-xuesong.chen@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The issue of commit d91525eb8ee6 ("ACPI, EINJ: Enhance error injection tolerance level") on x86 is also happened on our own ARM64 platform. We sent a patch[1] trying to fix this issue in an arch-specific way as x86 does at first, but according to the suggestion from Lorenzo Pieralisi and Catalin Marinas, we can consolidate the PCI MCFG part then fix it in a more common way, that's why this patch series comes. [1] https://marc.info/?l=linux-arm-kernel&m=163108478627166&w=2 --- Change from v3 to v4: - Add a new patch (patch #3) to address the quirk ECAM access issue. Because the normal ECAM config space can be accessed in a lockless way, so we don't need the mutual exclusion with the EINJ action. But those quirks maybe break this rule and corrupt the configuration access, reserve its MCFG address regions in this case to avoid that happens. - Add another patch (patch #4) to log the PCI MCFG entry parse message per the suggestion from Bjorn Helgaas. The output on ARM64 as: ACPI: MCFG entry for domain 0000 [bus 00-0f] at [mem 0x50000000-0x50ffffff] (base 0x50000000) - Commit message updated with more details of patch #2 Change from v2 to v3: - Address the comments of Lorenzo Pieralisi about the CONFIG_PCI dependence issue in APEI module (patch #2) Change from v1 to v2: - Fix the "undefined reference to `pci_mmcfg_list'" build error in case of PCI_CONFIG=n, reported by the kernel test robot Xuesong Chen (4): PCI: MCFG: Consolidate the separate PCI MCFG table entry list ACPI: APEI: Filter the PCI MCFG address with an arch-agnostic method ACPI: APEI: Reserve the MCFG address for quirk ECAM implementation PCI: MCFG: Add the MCFG entry parse log message arch/x86/include/asm/pci_x86.h | 17 +---------- arch/x86/pci/mmconfig-shared.c | 30 ------------------- drivers/acpi/apei/apei-base.c | 68 ++++++++++++++++++++++++++++++++---------- drivers/acpi/pci_mcfg.c | 46 +++++++++++++++------------- drivers/pci/pci.c | 2 ++ drivers/pci/quirks.c | 2 ++ include/linux/pci.h | 18 +++++++++++ 7 files changed, 101 insertions(+), 82 deletions(-) -- 1.8.3.1