Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8968971rwr; Thu, 11 May 2023 08:21:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZadsVP4laoCiW6owuwkaXaxAeVITuvbGk0HaxiZgf7FmYcN6BIpkKMfTEFmO5gKbtlh8h X-Received: by 2002:a17:90a:db8e:b0:250:83ef:a038 with SMTP id h14-20020a17090adb8e00b0025083efa038mr17814988pjv.8.1683818470185; Thu, 11 May 2023 08:21:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683818470; cv=pass; d=google.com; s=arc-20160816; b=yvw4Ih3EgU9pPNSLiTvvEXnFidqVoe+k1mZKYiyHe1nf1sY6al5VPGu5oyF3bJPQr+ Kk+1S3Z2lkoNWzdx5Ne36ZVkOY/gZwbLPhG8yFoxfOkuMs/Z0MyOPQvwi52O8NCq2mUJ oTgJjGgNqNTlnjT4bkzd38cFgVRxwY9U52NIGOpyDRSlL9Ii90EDZC46foLfg3wmEyCu z5TztCpX4JCE8PIiTf+gxcDzTmb5/3oBZ851FeTQocQvUNb6J6eMecwxyWNqhLuZvX4v PP1Y5pUNtIViqUqJPTuuz+frds0lhKN2/S3wd1rmYuP7anPLnHT9NZSr7xSJjoXLPr6D WMMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :date:message-id:dkim-signature; bh=9hz+qFqU61AbwPuOg5clTU+pwOi1BY4MjmcHbsPWekw=; b=JTVqCBJeWyKxOxurK73uN9L1nePs7GYUg5NrdjrESQ3u+Pk7R0DIYOJqBvUbjb6WGo krJrq603mgfPQIJyw8KPb9k3+3PLnQN3JgiCQWTqehTCZ7KfYKsttQhEhYre5Dtu0yMV L0f0MSd7RIxyir2oEFsRh4QIkrx9FkiGtqJ+YWE8zLZBuv00ZD4lACe+7edSHggrI8sc dMgEksJjodgqw6QvHOOT+Nf+i7hpBjgvugWTzI9stwEe2nwcK4kt5lQDAi3fUr2TrFLn L75bOoK86NFbGNw1dxh70CG46RqwoA4ldjIigew9RvZLqrRpm/yvUYbMmZzxGNq0rWip 7PVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cornelisnetworks.com header.s=selector1 header.b="E3s/6mk/"; arc=pass (i=1 spf=pass spfdomain=cornelisnetworks.com dkim=pass dkdomain=cornelisnetworks.com dmarc=pass fromdomain=cornelisnetworks.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a17090a6e0d00b0024696759991si19947342pjk.47.2023.05.11.08.20.54; Thu, 11 May 2023 08:21:10 -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=@cornelisnetworks.com header.s=selector1 header.b="E3s/6mk/"; arc=pass (i=1 spf=pass spfdomain=cornelisnetworks.com dkim=pass dkdomain=cornelisnetworks.com dmarc=pass fromdomain=cornelisnetworks.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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238538AbjEKPTw (ORCPT + 99 others); Thu, 11 May 2023 11:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238591AbjEKPTu (ORCPT ); Thu, 11 May 2023 11:19:50 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2139.outbound.protection.outlook.com [40.107.223.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C762125; Thu, 11 May 2023 08:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJewclR6v0QNkHYATcxKCLeuxuoJnQcoBfRIdtrREax0mGbOLN77Ijd8L/yg8E/3jydWQ9VMXgkAcfhhA1RXvEeckEZYJ7yRjS9hEEqTUP7sL/uv2e57+nq8u+s3sgei4DCOD8tFDCqFXYdc8uNjOmO9NvPKGy88GJ4btfNZvtMptmf8M0U6IDU/wrXMvkVA3A0EW5tA0Otg3aUqumv7A1L0JNk2wwonjl3GlsOE6QfF5qWaKaTyEEhl791OE7ILDYF4+yiQ3TdyzCc9XpCrbWV13/rNejo5jme2rp70ImPchdnd2+BalJKUHO2HbU11cfnDjBFanBiMMEztRjzB9w== 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=9hz+qFqU61AbwPuOg5clTU+pwOi1BY4MjmcHbsPWekw=; b=CmltCsgC3SGZDa0gi1tj3fvvDlmTlgTUeiXLvoTCJ4eIZzkfqsQoa/GGi2ZtbXnGqjPDZgyPMoUXzqMV6DBMbkIx8QACzVQqUEUeK5fLqjsOqFS69mOuj6Fik1TD6PCtxfBbZVhcL5V2+Yjc9WuqfzymZtg/rPGsniInpK8xGllH+P5yW0ZVj/UJoQ4XDvMND3EsVXOlDdCPnbTNDU6X72y3tWLqAs/GxslX3T2HYxgtC+lCEzE45G2/OZgVP2Lp9P3cvJA73tOLXTqMgmoil+OKaZV3i9Lz7uUwJZ0Hs3GO3guw3w5X6Ta00XwBPKl5+jGfIuy2w2dQmYErVBLiAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornelisnetworks.com; dmarc=pass action=none header.from=cornelisnetworks.com; dkim=pass header.d=cornelisnetworks.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornelisnetworks.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9hz+qFqU61AbwPuOg5clTU+pwOi1BY4MjmcHbsPWekw=; b=E3s/6mk/CZ+L8vTj2DdDqIg7KUOAoua14jtKsbB6MrBZNS3gTTTkoWFT2XVofhV6bQ8m4uZ08BEetrkU1siDPj8Tqjt5gJj0ixE54X3cN0hs8KE2/DHVF8FnP/8bLPTEWDBQNeLxjdBW0E+rhkPbql75sdBf5QgchQfB7+neZem4P1VWPGF7kyYZh79ZIGwYmzdxoooiGOcn+R41QHErAPGav6olgLsMcxjARTuhvQUw53bEhcccYALJ55JwDVSTRm/EsFbZfI+nHvd79y5P/HuSZW1ls3GRArLJfzoPDRkUrpstIZ93GZV/xr8wNC0+OEdkMcsQo+xEOG/zRrL6cQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cornelisnetworks.com; Received: from BL0PR01MB4131.prod.exchangelabs.com (2603:10b6:208:42::20) by MWHPR01MB2462.prod.exchangelabs.com (2603:10b6:300:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22; Thu, 11 May 2023 15:19:38 +0000 Received: from BL0PR01MB4131.prod.exchangelabs.com ([fe80::fab7:4581:2a24:8fc8]) by BL0PR01MB4131.prod.exchangelabs.com ([fe80::fab7:4581:2a24:8fc8%7]) with mapi id 15.20.6387.018; Thu, 11 May 2023 15:19:37 +0000 Message-ID: Date: Thu, 11 May 2023 10:19:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 06/17] IB/hfi1: Use pcie_lnkctl{,2}_clear_and_set() for changing LNKCTL{,2} Content-Language: en-US To: =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= , linux-pci@vger.kernel.org, Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Lukas Wunner , Dennis Dalessandro , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230511131441.45704-1-ilpo.jarvinen@linux.intel.com> <20230511131441.45704-7-ilpo.jarvinen@linux.intel.com> From: Dean Luick In-Reply-To: <20230511131441.45704-7-ilpo.jarvinen@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: CH2PR10CA0029.namprd10.prod.outlook.com (2603:10b6:610:4c::39) To BL0PR01MB4131.prod.exchangelabs.com (2603:10b6:208:42::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR01MB4131:EE_|MWHPR01MB2462:EE_ X-MS-Office365-Filtering-Correlation-Id: eebd88aa-c123-40d7-e485-08db52332253 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PMnwt6vuZAimINXb4YRQEL42/hFW6+1rMcPZ3Mf3egHzyIOpE74JD6Qe07UvdYPzBUsLBa/3IGC/Ubj9RssqziF2/pXnnobEpJ32AolCPnfGI80eCIUyXlOEa0zMtV+TLgeeT5p7F8yVtdXBnRF0dAe5Itf/g0y6nQSaMZkKoZI6i2TsIkggLXbYPUyWHgeUm95b4lQtiK+h7Ma1wmSiSNrFIsYZAHRSazqPanrCJe2uw1DuD0eLI/f0NSW7X77HFKQefbLXpFtx6Un/tyGNW75yy6LNooP6s/eX0Yh3ORAU7pM4WGPhb7XHVSiEe26E3MugW0mBtOj4ClzYmFLN/w43gY2DGyznXcNnQikkGzK2bBY4Sc+5jp8MVxgS1oUQRCRNyz2JYVnHj8XOyvByM3HbF8OUfR5A3ObSmxMvh2+L15/UP2l/pHW1MgGfAySD3EuV2mV1n0T+Yl2He7NNCI10jMmNC+VXM9GuyAS67IrcvBgH+NT7G86JrOO6mHNWZGhMZDyzKwov8X+FKaoDuKn9eVzA5RpIyHlyhebqnWWNAKhBBZL0MIXiWcIMws5vc8cuQoSZ9NhW/2GRjMwKgdu9BYPLPdNKlsykY7pJ+vAUEKZDIvaw2SrQNy02S+dor5CiX6oqbmoGpJC30TAfHA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR01MB4131.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(39840400004)(136003)(346002)(366004)(376002)(451199021)(5660300002)(44832011)(7416002)(8936002)(8676002)(83380400001)(2616005)(2906002)(36756003)(186003)(921005)(38100700002)(86362001)(31696002)(26005)(6506007)(6512007)(6666004)(41300700001)(31686004)(66946007)(66556008)(66476007)(478600001)(316002)(53546011)(6486002)(110136005)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZjdZZXhtdlJlb3lGeENhNXFGaHF5R0lxTHVSbzNVVnFBU3EvdEREOGJjN0w1?= =?utf-8?B?RkVJb1ozWEgxalV4ZyttckVrWVF4dnR6V2ZhTTY2ZFNnenZMWE0xMlgwZXZT?= =?utf-8?B?Z0hmeFRkeGNkamZLbVZXOEkwcWdONDRPelhaVTNtK0h6a296dkJjbXo1dnFz?= =?utf-8?B?WG44QkpVejhpWmFtRlZadkJhTmlvMzMydFczM1ZVYmdlTEdLdXJ0NFlDdlVL?= =?utf-8?B?aURBNWp1bFRGcHBTYmhyZzFJMmJCK0VWak1CQ1pieFM0TWRVYzZSMHpzUzA3?= =?utf-8?B?cEowYXFGMVVxRG1EZ3hTcHdEW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nEzeHRTRUZ1YjQ3WkEyOEtxazRnNENybURtTHVuZ1dWS05ONy9mVDA3Z1lF?= =?utf-8?B?Tnc9PQ==?= X-OriginatorOrg: cornelisnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: eebd88aa-c123-40d7-e485-08db52332253 X-MS-Exchange-CrossTenant-AuthSource: BL0PR01MB4131.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 15:19:37.7768 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4dbdb7da-74ee-4b45-8747-ef5ce5ebe68a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zwdM3hOEBUTWe+z0MwX8xBw4CR0DrPaK83aYbtlNIHzSeiISVb7jiy9IFUMrUg9iIh11wp9qYrsD/tyN0F4GkwK91sncQ5OK7DFhT/KWV+c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR01MB2462 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 5/11/2023 8:14 AM, Ilpo J=C3=A4rvinen wrote: > Don't assume that only the driver would be accessing LNKCTL/LNKCTL2. > ASPM policy changes can trigger write to LNKCTL outside of driver's > control. And in the case of upstream (parent), the driver does not even > own the device it's changing the registers for. > > Use pcie_lnkctl_clear_and_set() and pcie_lnkctl2_clear_and_set() which > do proper locking to avoid losing concurrent updates to the register > value. > > Suggested-by: Lukas Wunner > Signed-off-by: Ilpo J=C3=A4rvinen > --- > drivers/infiniband/hw/hfi1/aspm.c | 16 ++++++---------- > drivers/infiniband/hw/hfi1/pcie.c | 28 ++++++---------------------- > 2 files changed, 12 insertions(+), 32 deletions(-) > > diff --git a/drivers/infiniband/hw/hfi1/aspm.c b/drivers/infiniband/hw/hf= i1/aspm.c > index a3c53be4072c..d3f3b7e9b833 100644 > --- a/drivers/infiniband/hw/hfi1/aspm.c > +++ b/drivers/infiniband/hw/hfi1/aspm.c > @@ -66,12 +66,10 @@ static void aspm_hw_enable_l1(struct hfi1_devdata *dd= ) > return; > > /* Enable ASPM L1 first in upstream component and then downstream *= / > - pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPMC, > - PCI_EXP_LNKCTL_ASPM_L1); > - pcie_capability_clear_and_set_word(dd->pcidev, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPMC, > - PCI_EXP_LNKCTL_ASPM_L1); > + pcie_lnkctl_clear_and_set(parent, PCI_EXP_LNKCTL_ASPMC, > + PCI_EXP_LNKCTL_ASPM_L1); > + pcie_lnkctl_clear_and_set(dd->pcidev, PCI_EXP_LNKCTL_ASPMC, > + PCI_EXP_LNKCTL_ASPM_L1); > } > > void aspm_hw_disable_l1(struct hfi1_devdata *dd) > @@ -79,11 +77,9 @@ void aspm_hw_disable_l1(struct hfi1_devdata *dd) > struct pci_dev *parent =3D dd->pcidev->bus->self; > > /* Disable ASPM L1 first in downstream component and then upstream = */ > - pcie_capability_clear_and_set_word(dd->pcidev, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPMC, 0x0); > + pcie_lnkctl_clear_and_set(dd->pcidev, PCI_EXP_LNKCTL_ASPMC, 0); > if (parent) > - pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL, > - PCI_EXP_LNKCTL_ASPMC, 0x= 0); > + pcie_lnkctl_clear_and_set(parent, PCI_EXP_LNKCTL_ASPMC, 0); > } > > static void aspm_enable(struct hfi1_devdata *dd) > diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hf= i1/pcie.c > index 08732e1ac966..fe7324d38d64 100644 > --- a/drivers/infiniband/hw/hfi1/pcie.c > +++ b/drivers/infiniband/hw/hfi1/pcie.c > @@ -1212,14 +1212,10 @@ int do_pcie_gen3_transition(struct hfi1_devdata *= dd) > (u32)lnkctl2); > /* only write to parent if target is not as high as ours */ > if ((lnkctl2 & PCI_EXP_LNKCTL2_TLS) < target_vector) { > - lnkctl2 &=3D ~PCI_EXP_LNKCTL2_TLS; > - lnkctl2 |=3D target_vector; > - dd_dev_info(dd, "%s: ..new link control2: 0x%x\n", __func__= , > - (u32)lnkctl2); > - ret =3D pcie_capability_write_word(parent, > - PCI_EXP_LNKCTL2, lnkctl2); > + pcie_lnkctl2_clear_and_set(parent, PCI_EXP_LNKCTL2_TLS, > + target_vector); You are missing an assignment to "ret" above. -Dean External recipient