Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1140320rwl; Thu, 5 Jan 2023 09:10:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXsG3hoJIOU8zloMTp+Q3x8R/tYLey3IlDADAxxFpsw9JTHaNOQnudz5ketNxG3kj7nBo3Sw X-Received: by 2002:a05:6402:916:b0:461:7d2:c9fc with SMTP id g22-20020a056402091600b0046107d2c9fcmr46693901edz.26.1672938632817; Thu, 05 Jan 2023 09:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672938632; cv=none; d=google.com; s=arc-20160816; b=RYTe6hkBOO8eJLihn5I2sTggt2Or5OVzsElgA0/2gf7RifmjALcSth9OSBS71BiGfb OCFSuX3yx+uhJjhkDnzVA5hy1UH5nboJFm0NGl5TK9+pxTULe6tzw9whki6haJg/dLfq 5kp19ve7vM45mOD0ig1QX3bLziKMuBdwSeFDceGcbM5NvRNWBMsTVhAeW8q/h/eY1/Fx acqGMKhjA5P2W2YPdT0VkF6lefV6FjccYIiDsn5LP3uk9eVwe0JJDsf74J4ds+pfI3Io QpIfA9SqorZko27Iv8mGcxZFHLUGqc0n0xg5qhtp/T2uPgTDoe4AaWNNBNa4FlH81G4d xYWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=OwUYR+58CSJwUs755LvZFGF+xQsonYc1NvXh97J3PCA=; b=vVXAKuhnT9GUXpU3HB5TnYUxJWfhGMsj89ktJut8TwLXZ1b9BtzZYZWNfYBq0+c19s ML8rk+e5vn2TcMIh6MDNCQYBuCdLnN2KwAv07OeVGEbWib2XPdnETwhw4jTfeJ/M8+4h 6yYDv2zSMmChsNPVFwECqHKtRPHhht+ColyPrC4+O6c/gWfKbD28xPUMnEDmvwpCAlXW 7mxlRNX9E0nub9BLw4iVNPGYo9kdCRGbnXKtWi6gNdzhthAvodFvt/b8SE5Yj7iSAiKG K5ngWX9ZLmP9dcGSO3FpZjv3SjpRMIGSIa6f0bKejf999CqrKjAnJkQ+xeSsD2UlS4VU XDZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E32D3tUU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y92-20020a50bb65000000b0046965a49126si32444164ede.528.2023.01.05.09.10.15; Thu, 05 Jan 2023 09:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E32D3tUU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234545AbjAEQ4r (ORCPT + 56 others); Thu, 5 Jan 2023 11:56:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233450AbjAEQ4q (ORCPT ); Thu, 5 Jan 2023 11:56:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359763727D; Thu, 5 Jan 2023 08:56:45 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id DF6F4B81B50; Thu, 5 Jan 2023 16:56:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F96DC433D2; Thu, 5 Jan 2023 16:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672937802; bh=7tc21u/mJwi7G11AK6MRIZWAXhvEEkRIab0Zxf68F+Q=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=E32D3tUUsJHdLsR9EkFw7rjw8/bVapN/RF8R90nNXlBSTU/l5w+3tX22bOHRFW3Pw zzJQJ9eErtHplJx+MXkQ5XYCZ04zMAjm5natweJALS3U2WAZ7Q8oCM7mZwS0DWJNT1 LA8MiEBzWnNRMzhPNqYLqm7m4TKVT+bGzsFsgElu4eC6PhmZnQaSAuoPnJLuOIuGgT 9/iA0G5GXhcKA+I+sCWF7PXsrahqUau82/EhNTD8FKRSmZWqlZfcFyxxEwcITRYK05 tkqLX40vCDap7BFZIkGc38MxMdbqRBcg0hHn/602LQekTgs3HgB5+TVVxghiLOfAlA +jfgqWXJg1//w== Date: Thu, 5 Jan 2023 10:56:39 -0600 From: Bjorn Helgaas To: ira.weiny@intel.com Cc: Dan Williams , Bjorn Helgaas , Lukas Wunner , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Alison Schofield , Vishal Verma , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org Subject: Re: [PATCH V4 1/9] PCI/CXL: Export native CXL error reporting control Message-ID: <20230105165639.GA1150637@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221212070627.1372402-2-ira.weiny@intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 11, 2022 at 11:06:19PM -0800, ira.weiny@intel.com wrote: > From: Ira Weiny > > CXL _OSC Error Reporting Control is used by the OS to determine if > Firmware has control of various CXL error reporting capabilities > including the event logs. > > Expose the result of negotiating CXL Error Reporting Control in struct > pci_host_bridge for consumption by the CXL drivers. > > Cc: Bjorn Helgaas > Cc: Lukas Wunner > Cc: linux-pci@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Ira Weiny FWIW, for probe.c and pci.h: Acked-by: Bjorn Helgaas > --- > Changes from V3: > New patch split out > --- > drivers/acpi/pci_root.c | 3 +++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index b3c202d2a433..84030804a763 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) > host_bridge->native_dpc = 0; > > + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) > + host_bridge->native_cxl_error = 0; > + > /* > * Evaluate the "PCI Boot Configuration" _DSM Function. If it > * exists and returns 0, we must preserve any PCI resource > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 2f4e88a44e8b..34c9fd6840c4 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) > bridge->native_ltr = 1; > bridge->native_dpc = 1; > bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; > + bridge->native_cxl_error = 1; > > device_initialize(&bridge->dev); > } > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 1f81807492ef..08c3ccd2617b 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -577,6 +577,7 @@ struct pci_host_bridge { > unsigned int native_pme:1; /* OS may use PCIe PME */ > unsigned int native_ltr:1; /* OS may use PCIe LTR */ > unsigned int native_dpc:1; /* OS may use PCIe DPC */ > + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ > unsigned int preserve_config:1; /* Preserve FW resource setup */ > unsigned int size_windows:1; /* Enable root bus sizing */ > unsigned int msi_domain:1; /* Bridge wants MSI domain */ > -- > 2.37.2 >