Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8689028rwp; Wed, 19 Jul 2023 13:50:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFiPCeFGiCJpLq7VF8iQboWK0jkt11IQ3pWaQTF6JnyUOxidTJ10/kqsgdt10xqUJiGtpBN X-Received: by 2002:a05:6808:18aa:b0:3a3:6360:ffbe with SMTP id bi42-20020a05680818aa00b003a36360ffbemr22892744oib.24.1689799812094; Wed, 19 Jul 2023 13:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689799812; cv=none; d=google.com; s=arc-20160816; b=cBYjhUlxuaJOcR1LW2vRFkI8qP6u7w+nAgJDWZgbabaHHpIIwq25G8o3i0p1SEMkSg QexugXk60iyOxyMbmQ88xcgqxZHQGP7NLgOImqDt8fSvvqGbhNlVs7jMLiM3WamOFZ/Z 821eyxFo2X5i1hmGh0I9rQkw3M9D2GL1b7xEogztCtXjNffvM5qvetm6BIijARMpKYo7 ga9m8D7FH5/vjCaflunM/07jeTAYnkmh3D/+dPV1CllmQhqlbtfWMuhH7Kzb++X79S3z 75Ty5QoF6pgT33xyoQGRknXdDyF+uC2LYI7IV4hVzzixMY9kl79rgP7oMAmCqhyS2/KR wDEg== 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=OnHnJpMnGwYK13TuCvbDsYB8LfR1rmsKQISOvIaIysQ=; fh=e2ZOYrixFuVeaBFmlaQmVeRjcLPlNU/VcDtYtqkSGaA=; b=fWZZa2027hkxejEsdI0dL7BgpOc86RMfblIQGFdtRj8rPacs/voTO9jFHBC7UKNMZU j9I2x5orc+knkuWLpQXA829WNI04YLjSGSs/0LBfFK2bHQo6agC6YZvX23lVHGY+WJ65 wuP9rfZ+cZp0XZwczMM6s0/5MoumDV7VfO9tLlClfjsssjQ8VOJIYCfj0ixwC+9Z6rL3 X/QuXhEAlWGQ29AjkOZNh3l64jyDdoMuSHtlPUNpXT9qEM5CseMHf1IBoxA3v4ypWIWu Ta01gRt9Mi+NHe422qp0y+KCG+C28YereZbmiYUvp53uLiL5V61zMprrXqrI4KDOqEpV r68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DNI2J6H+; 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 kk1-20020a17090b4a0100b0025c256add2bsi2120777pjb.49.2023.07.19.13.50.00; Wed, 19 Jul 2023 13:50:12 -0700 (PDT) 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=DNI2J6H+; 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 S230319AbjGSUgn (ORCPT + 99 others); Wed, 19 Jul 2023 16:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbjGSUgl (ORCPT ); Wed, 19 Jul 2023 16:36:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2792112; Wed, 19 Jul 2023 13:36:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05FE061827; Wed, 19 Jul 2023 20:36:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1345C433C7; Wed, 19 Jul 2023 20:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689798963; bh=XrQ/pPRSHvXh7lxVqpPGBAZ3IM9RShfrP9G5GJYGNpY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=DNI2J6H+YnMEsoWAuadSAWPeYD7tM3mWfNvpmrOqbG1twEQ6KZveIJI5Rz/s3zJKU 6XonmkQXwNQly5B4kySr9PK279KtmwSNiUufvrkBIjVw9HoQxtZlOuy/QoAIOUnmWN lNvuHwtCTcL5705avEj+eL1IjBlhUCnMsc+RN8T7kh9ESH5xNQ1lAOw7a3KwkKugzt uHZojok/KrXl6Q0Cp925GujyX3nbsf+BQWMvTT6bklPboEyCZbvrjwFkWR7oMyOpu9 Tfb1h4EbTIhIoUbp5tFYjnPZIoPwXL/4bf4oviI2vOna7wSUhi/p79rBkjx8WZ+xT+ i7SEgldqHzc4g== Date: Wed, 19 Jul 2023 15:36:00 -0500 From: Bjorn Helgaas To: Smita Koralahalli Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, Bjorn Helgaas , oohall@gmail.com, Lukas Wunner , Kuppuswamy Sathyanarayanan , Mahesh J Salgaonkar , Alison Schofield , Vishal Verma , Ira Weiny , Ben Widawsky , Dan Williams , Jonathan Cameron , Yazen Ghannam , Terry Bowman , Robert Richter Subject: Re: [PATCH 1/2] PCI, AER: Export and make pcie_aer_is_native() global Message-ID: <20230719203600.GA514279@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719192313.38591-2-Smita.KoralahalliChannabasappa@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, Jul 19, 2023 at 07:23:12PM +0000, Smita Koralahalli wrote: > Export and move the declaration of pcie_aer_is_native() to a common header > file to be reused by cxl/pci module. Run "git log --oneline drivers/pci/pcie/aer.c" and format your subject line to match. "Exporting" pretty much means making it global, so "Export pcie_aer_is_native()" is probably enough. > Signed-off-by: Smita Koralahalli With the above, Acked-by: Bjorn Helgaas > --- > drivers/pci/pcie/aer.c | 1 + > drivers/pci/pcie/portdrv.h | 2 -- > include/linux/aer.h | 2 ++ > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index f6c24ded134c..87d90dbda023 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -229,6 +229,7 @@ int pcie_aer_is_native(struct pci_dev *dev) > > return pcie_ports_native || host->native_aer; > } > +EXPORT_SYMBOL_GPL(pcie_aer_is_native); > > int pci_enable_pcie_error_reporting(struct pci_dev *dev) > { > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index 58a2b1a1cae4..1f3803bde7ee 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -29,10 +29,8 @@ extern bool pcie_ports_dpc_native; > > #ifdef CONFIG_PCIEAER > int pcie_aer_init(void); > -int pcie_aer_is_native(struct pci_dev *dev); > #else > static inline int pcie_aer_init(void) { return 0; } > -static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; } > #endif > > #ifdef CONFIG_HOTPLUG_PCI_PCIE > diff --git a/include/linux/aer.h b/include/linux/aer.h > index 3a3ab05e13fd..94ce49a5f8d5 100644 > --- a/include/linux/aer.h > +++ b/include/linux/aer.h > @@ -45,6 +45,7 @@ struct aer_capability_regs { > int pci_enable_pcie_error_reporting(struct pci_dev *dev); > int pci_disable_pcie_error_reporting(struct pci_dev *dev); > int pci_aer_clear_nonfatal_status(struct pci_dev *dev); > +int pcie_aer_is_native(struct pci_dev *dev); > #else > static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) > { > @@ -58,6 +59,7 @@ static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev) > { > return -EINVAL; > } > +static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; } > #endif > > void cper_print_aer(struct pci_dev *dev, int aer_severity, > -- > 2.17.1 >