Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp780568rwd; Thu, 1 Jun 2023 06:33:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Wi59E5V79YTjJXLERK3j0EshVW9YzxHFXoEFEOPy6c8S8imonQTSlCTLd6r2VAcCJqnJV X-Received: by 2002:a05:6a20:c510:b0:10f:8798:9ff3 with SMTP id gm16-20020a056a20c51000b0010f87989ff3mr8282093pzb.8.1685626381086; Thu, 01 Jun 2023 06:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685626381; cv=none; d=google.com; s=arc-20160816; b=QLi38ZOZmyoSNzaE9xd6fvi/r5nBFa9syizXlyy5CLb8T2gNrLP1umMeV5SFkH0Ur2 ewDu2H64ikAP/NfmFRsjdSnweRl3bbqIvbATgAQGw64fghcssqzuFNWk+G8j9Pm7/HEe Xp3gh89pHSez3VzfqBPWBR87EoDJioIbG9G+29N57T4HGZRmvokGjjXifsrLEwKhsCZW U4/1n1PKUIvjifwwJBXaQG4H9Kc3Y6rGyvu9fprAIfHyXRVVAOXaow+GlolA/2N+vsCp CizqbVGeqUFe+dBmdXDYeiih0AziWYoThMPuqaxE7/cdFX2fkae3Yu0hLYwx2gFs0Pqb 0EJw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=s+NZ+6OVkSs3K9eGi2vgdKPrez8kUTqBoKrV6OMvmrA=; b=OWzXcWP3MnMxu8SLuoU+qzinQR2DJUH1u0rz9yOK7EevG0sbd+W8jGYhUz/ZWp+8pe TiXXcPYmi9WA1AlRP2+NEuHRAdxg05naiC+jNMd0rLBsJub9XZNV42SCFR0EErwViw/Y EG5Dx4tle/cYvvwchyuHqkxfR+K8GthTmu42eye0iNslLlX3z+ZAx9ptTyuIKixndSY6 1x28ZUfhnxHXVz6hvQtjMIGwuHFoMZ6shQ37hxiuK9wgXkBqJz41J0I/SXktQBSsZp/r kf3sMG73FpPdKGCXWTal8woK4Q7bp10hC7orJU//aew07DJtZfHhc3TA5QLTmA3lLThJ MXsw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a63b914000000b0053040aaf8adsi2920896pge.112.2023.06.01.06.32.48; Thu, 01 Jun 2023 06:33:01 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234083AbjFAN3o (ORCPT + 99 others); Thu, 1 Jun 2023 09:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234010AbjFAN3d (ORCPT ); Thu, 1 Jun 2023 09:29:33 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84608E56; Thu, 1 Jun 2023 06:29:11 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QX6Qz5RG2z6J748; Thu, 1 Jun 2023 21:28:43 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 1 Jun 2023 14:28:44 +0100 Date: Thu, 1 Jun 2023 14:28:44 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , Subject: Re: [PATCH v4 16/23] cxl/pci: Remove Component Register base address from struct cxl_dev_state Message-ID: <20230601142844.0000028c@Huawei.com> In-Reply-To: <20230523232214.55282-17-terry.bowman@amd.com> References: <20230523232214.55282-1-terry.bowman@amd.com> <20230523232214.55282-17-terry.bowman@amd.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500003.china.huawei.com (7.191.162.67) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 Tue, 23 May 2023 18:22:07 -0500 Terry Bowman wrote: > From: Robert Richter > > The Component Register base address @component_reg_phys is no longer > used after the rework of the Component Register setup which now uses > struct member @comp_map instead. Remove the base address. > > Signed-off-by: Robert Richter > Signed-off-by: Terry Bowman Reviewed-by: Jonathan Cameron > --- > drivers/cxl/cxlmem.h | 2 -- > drivers/cxl/mem.c | 4 ++-- > drivers/cxl/pci.c | 3 --- > 3 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h > index 2823c5aaf3db..7b5b2d3187bf 100644 > --- a/drivers/cxl/cxlmem.h > +++ b/drivers/cxl/cxlmem.h > @@ -287,7 +287,6 @@ struct cxl_poison_state { > * @active_persistent_bytes: sum of hard + soft persistent > * @next_volatile_bytes: volatile capacity change pending device reset > * @next_persistent_bytes: persistent capacity change pending device reset > - * @component_reg_phys: register base of component registers > * @info: Cached DVSEC information about the device. > * @serial: PCIe Device Serial Number > * @event: event log driver state > @@ -326,7 +325,6 @@ struct cxl_dev_state { > u64 next_volatile_bytes; > u64 next_persistent_bytes; > > - resource_size_t component_reg_phys; > u64 serial; > > struct cxl_event_state event; > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index 0643852444f3..618e839919eb 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -49,7 +49,6 @@ static int devm_cxl_add_endpoint(struct device *host, struct cxl_memdev *cxlmd, > struct cxl_dport *parent_dport) > { > struct cxl_port *parent_port = parent_dport->port; > - struct cxl_dev_state *cxlds = cxlmd->cxlds; > struct cxl_port *endpoint, *iter, *down; > int rc; > > @@ -65,8 +64,9 @@ static int devm_cxl_add_endpoint(struct device *host, struct cxl_memdev *cxlmd, > ep->next = down; > } > > + /* The Endpoint's component regs are located in cxlds. */ > endpoint = devm_cxl_add_port(host, &cxlmd->dev, > - cxlds->component_reg_phys, > + CXL_RESOURCE_NONE, > parent_dport); > if (IS_ERR(endpoint)) > return PTR_ERR(endpoint); > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index 00983770ea7b..0db71493db5d 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -661,7 +661,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) > * If the component registers can't be found, the cxl_pci driver may > * still be useful for management functions so don't return an error. > */ > - cxlds->component_reg_phys = CXL_RESOURCE_NONE; > rc = cxl_pci_setup_regs(pdev, CXL_REGLOC_RBI_COMPONENT, > &cxlds->comp_map); > if (rc) > @@ -669,8 +668,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) > else if (!cxlds->comp_map.component_map.ras.valid) > dev_dbg(&pdev->dev, "RAS registers not found\n"); > > - cxlds->component_reg_phys = cxlds->comp_map.resource; > - > rc = cxl_map_component_regs(&cxlds->comp_map, &cxlds->regs.component, > BIT(CXL_CM_CAP_CAP_ID_RAS)); > if (rc)