Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3118052rwo; Mon, 24 Jul 2023 06:35:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHEPvukqDNUrGzYR1hZ0iXbd0AprcOBbuJZ0qmf92Twgv0+90/TpqArWag+1eKNSDz2cMlp X-Received: by 2002:a17:903:1208:b0:1b9:d307:c1df with SMTP id l8-20020a170903120800b001b9d307c1dfmr12710304plh.17.1690205731517; Mon, 24 Jul 2023 06:35:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690205731; cv=pass; d=google.com; s=arc-20160816; b=YTWIXzv2oTBoacCrRwlLC3krXdLUglm4YMjYtjZdIxJYkH3NzGuucoTNhOr/rngLdi 1zjMLUJ5mH+4a7Q8gP2J2JLKDkV5wnVJbTb5/MCY0vV1fygJrL07nbBl9TxHaGXyHz3t whqE0SZbakmoh1tknu3A0n21Dc9l4W3hpigD3eGsj4zst7Aa3G/2iLC/SvKILITs00oj 2WN9hST7lgG3vW2yKZGW2CI8YT5sg/emuFhMTz2cPBsWWFi009NHYJu1/uYFps+OF1f8 qG382HW2lMgxWxlkU1qUQVsR75QetDMOvJddCk31/6IwCDlNTPeSBOVai9hHtLkg7vHr n7XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UKVkdi8qFFDzAlbiGKSU2yXpO3Roo2PPQIXZWVSX+nM=; fh=9qaNgX/E/+hjnVbGtO6ioG+k9TvYa1YZ6rlIUH3MmnA=; b=R9yjiAkXjamTcDZjDDB0GDZrGUxNzJAbVOTValPPCJGfPEH2rjKX4JmV08ZLiY+zyY 9OxhOLcuGWguuZEuFfSByrU5dMpe/nRNUkQjRyDPNVcHrov1CYrgsW6GGr7Y6fZvHmri 5VHs0DUBQ/iAyXLNgH5qYgkDJQPPWlpldq/sAsdL4FujuVjUmt3MNlNXdCnxqa5J3muB K+E7euCh7+BFI0FPHjjCpB4c2/z2AnIABbPiMS2bd7ahi+9Y4ZHiw+QGd+12YSsaIcaa oEAJGTV3pfJ8c/Bgu8UoPKWDfxU0emK31R8y9994DD9QCrkwgKeiB0Y4aT2JRxz+jQPu 3rWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ZO5F52fc; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd3-20020a170902830300b001b8c4168e20si8997307plb.58.2023.07.24.06.35.18; Mon, 24 Jul 2023 06:35:31 -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=@amd.com header.s=selector1 header.b=ZO5F52fc; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229710AbjGXMoz (ORCPT + 99 others); Mon, 24 Jul 2023 08:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjGXMoy (ORCPT ); Mon, 24 Jul 2023 08:44:54 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 674EFD8; Mon, 24 Jul 2023 05:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6W3oc7TYWzlUSjNTSPdhYeNly2i8/CnfgCSByekIrzLb1oPx/2SmsTkyGNsa34Cnoz/CXtRyiP6DcY6sVNHGX/c4J0QacWwOlfrMX+ACXdKLZ7Stjw7OcCoJ0cwmvnFWKnFVCj+jc0Ie/CLvkNJvArx5HWzmf4nf2TgvmzI9mqDZPqI2XCvzvHIYLTU9Z7Go6oPq0/WhlKzMx9hLsrfzXaoJu+VeRsF3BdPiMWSNeeeUGh2GXVA72Xoasrwg+VhxJmn8aCRISA0DnA7Uf48aSBPWtCkSkb6flk99vgD2CgKvJ/ANJoR/9EiEjpc/Hd3DI+czJ0J7wyQ816ymQ5WTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UKVkdi8qFFDzAlbiGKSU2yXpO3Roo2PPQIXZWVSX+nM=; b=UF31w0L1U1JcegJGNrlLQNpkZyXtX6+eJKq4B1KBNrbPOr6PA33SdvNjmHF2yQ0KyfIE2Rh59L7tCnXb+yOLCRhYTTQ+F6J80ptHSGpEhkwLd3jQzR1S+Oui65CJ+04gzX8N5BhvQK8KPnDyhEQB3KQ60U3DUqqiUhXO9BjApalg2kJ15aB4w0hYI666XExPf4yTosVd4r/ujnunsX48Sbtz+zj0rFxUMFLMd2xisz3iw+1xBGp4381JIF1LDF6pKDAmcj+DP14b1tEr5DQbmLfDsM2mc/q4O8e82FnT/RUf38U7/huh00iCNUKv9RbwbCk0LWK7tLItg5G9UnbYMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UKVkdi8qFFDzAlbiGKSU2yXpO3Roo2PPQIXZWVSX+nM=; b=ZO5F52fcQe9CeRF9tRA8iXsyuqClI3uw8RwkxRkCo4JPh0uCoeddvWM0FSbB3ovtHbCDWGC2s2sgs4qsKHWZMavObuwocmRRQ9zHEqZyPBbmR2WNNVwHYLOhe5Y+G1pmdxSWIi0Kf6JOKN8sHC5O5KZ+sCXHqZXhVM7vc/KYKTQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB3657.namprd12.prod.outlook.com (2603:10b6:5:149::18) by MN2PR12MB4207.namprd12.prod.outlook.com (2603:10b6:208:1d9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 12:44:48 +0000 Received: from DM6PR12MB3657.namprd12.prod.outlook.com ([fe80::6cf0:e179:9f0b:edd9]) by DM6PR12MB3657.namprd12.prod.outlook.com ([fe80::6cf0:e179:9f0b:edd9%5]) with mapi id 15.20.6609.032; Mon, 24 Jul 2023 12:44:48 +0000 Date: Mon, 24 Jul 2023 14:44:41 +0200 From: Robert Richter 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 Subject: Re: [PATCH v2 3/3] cxl/pci: Replace host_bridge->native_aer with pcie_aer_is_native() Message-ID: References: <20230721214740.256602-1-Smita.KoralahalliChannabasappa@amd.com> <20230721214740.256602-4-Smita.KoralahalliChannabasappa@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721214740.256602-4-Smita.KoralahalliChannabasappa@amd.com> X-ClientProxiedBy: FR2P281CA0112.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9d::14) To DM6PR12MB3657.namprd12.prod.outlook.com (2603:10b6:5:149::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3657:EE_|MN2PR12MB4207:EE_ X-MS-Office365-Filtering-Correlation-Id: 87cb9c3a-0f4c-467a-c08f-08db8c43c404 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fqc33bX16EB2QWiqsvoR8QJwgZiWQZ835J6zqFNK1SnDsUFPXbbfHqqWn9nmac/VJG6jT8BJLAyZRytq9WZzVzJWh7/HPW5yiQoRa81cDaaavHsX9LgP2lByLoHcORBm9ZaQMI64AJw+xI+5CncR/cY0ucBIz4vxsitgGrX93Ahi0hHjc16NRus9CPwB+vq1QRCfosS0A+vgWxtYt7hnSDf6NVX32/ZOhVsuCrdvL6/+4upGTDMwejP/57VwVNYyigXtq3hp40a4VoPqgwA/EMrYeCvvPApiYgrW/utVXk3lA1BeMtRUksODCSk1WgHovlT1bPJh23+ZeE6E1Em1sz56gJFJX0tkSM1FeFiTa41eJ88ubFYBgAN41zw06kjByhp9oaIyIkMGHY2YcYEW0+ueHaIau1Nx4LcEqKPj2+kQT/FwFrQg+wD7DaSTZZaFN9gABCd3YHiodFb1sh/7aZfBoAT/PpMgRUwoIPEop7kffTbcZrC7oHw2NB1IYF/J6O7NX3aCPu6imvJqZMC4KqkdjJokHpHUzV+WNhPQRHUU5EVg3vyEMl8UdxTfJU/o X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3657.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(451199021)(26005)(186003)(41300700001)(478600001)(6506007)(53546011)(9686003)(66556008)(66946007)(66476007)(6636002)(4326008)(316002)(6512007)(6666004)(54906003)(38100700002)(6486002)(5660300002)(2906002)(7416002)(8676002)(6862004)(8936002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6lZPxejb1QDHIYd7z8A0dnX1NMvr3qdu6urUVuW0Hv3z1NSWX6YlSx5d5nSM?= =?us-ascii?Q?o8h/dzExjLlqW7AuqWUEs+e8mOUpgVif/cZAFmuXwIYgXahXCRdkajTN9V7f?= =?us-ascii?Q?zdlNDhUhXHL1l3ovDRlp1+pssVqw3DjrpyEaAT9OP8N24YkmO47VUcHiZlam?= =?us-ascii?Q?xtfoV6Xx/S8Ay2pVsH/O5elh66e8Bf0ytMSt5ylbyDa4Bw1qaUTcRAMjBhHw?= =?us-ascii?Q?FkrAhSNkl9Ng6LUOsmX287e40XQpNwEUmoIQgOjr4FwLVQePqub4fOrisOGI?= =?us-ascii?Q?V+DExAiNQQVevsMJfmsmY7zseuQHLdxZvPdWXW6voFZWxEDLHwrSeQQI9GjS?= =?us-ascii?Q?BJNcYRehAf4lyHShLmdG0SeFiAwEZyHyQ72ZwRKYiZUOl9mymvZjDAwpe6Fo?= =?us-ascii?Q?DYmLb6zREPdmXgOSSwr4qsxBmQ6MkoFL1LIgDNJa6VA1TwnWn1ffelDbYqWG?= =?us-ascii?Q?hZKaXomsWLfId74H1D8XxKVyrsglK76AHWWDhaaF0qc6xTmUVbhoBfiBM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rOCBtV1atYGJ9FsRiV0irG5b4a+wRPf7?= =?us-ascii?Q?6OBS+ZxTHuzl4o3BdDLXfXSWVl+MCDvfnX2V9e8J11M1DjZouXRG8lF0IZ+3?= =?us-ascii?Q?hzl/GtNdp2MDUojtXfolDkWwPg4i7BULAQEuv12NRPzQGlHV552RIP2GgXa+?= =?us-ascii?Q?mxtrGYj0yklzpgYcWyw+kXVf0i9AwEJMViSEecUK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87cb9c3a-0f4c-467a-c08f-08db8c43c404 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3657.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 12:44:48.4257 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pT12dwubNQilwiGT1AeMFH066B2wITK7EmscIEFNFL4HjmC7uchLxYZUL/Y5J2Egrx9K3hDHsiOGe+RbD4uuYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4207 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 21.07.23 21:47:40, Smita Koralahalli wrote: > Reuse pcie_aer_is_native() to determine the native AER ownership. > > Signed-off-by: Smita Koralahalli With Sathyanarayanan comments addressed: Reviewed-by: Robert Richter > --- > v2: > Replaced pcie_aer_is_native() at a later stage for automated > backports. > --- > drivers/cxl/pci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index 2323169b6e5f..44a21ab7add5 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -529,7 +529,6 @@ static int cxl_pci_setup_regs(struct pci_dev *pdev, enum cxl_regloc_type type, > > static int cxl_pci_ras_unmask(struct pci_dev *pdev) > { > - struct pci_host_bridge *host_bridge = pci_find_host_bridge(pdev->bus); > struct cxl_dev_state *cxlds = pci_get_drvdata(pdev); > void __iomem *addr; > u32 orig_val, val, mask; > @@ -542,7 +541,7 @@ static int cxl_pci_ras_unmask(struct pci_dev *pdev) > } > > /* BIOS has PCIe AER error control */ > - if (!host_bridge->native_aer) > + if (!pcie_aer_is_native(pdev)) > return 0; > > rc = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &cap); > -- > 2.17.1 >