Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10764891rwd; Thu, 22 Jun 2023 04:42:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P6HoiLdKqzVQzz3jqhnAGZVfZZey4Too+hF55oryi12qko2qV9Or/CbwyL+H75mHuz/dq X-Received: by 2002:a05:6a20:3951:b0:110:f66c:a0e1 with SMTP id r17-20020a056a20395100b00110f66ca0e1mr25430179pzg.14.1687434122739; Thu, 22 Jun 2023 04:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687434122; cv=none; d=google.com; s=arc-20160816; b=wQfYUWZ+/k9CQnykx1+qJFWJeaJVuTJLxPyhXoqCarT8vqSy1xoz5mHh/FdQDmfeUS /tvEdaBCK3OjzDPdqdxvO6lbh0kMW8LDT2uyhTPBSCs0zCb4WdZoXJIJ5zExBsqrazXC 7JvEOz1pZgXcc5++/v7yM8+K7Odv4oNWf2gcbsKgeGeVeVlFUN5nfglFMZu8wW/GSjrg TEluH2NH9KqiFyX2ghSqSXhoWqEDR4w0U7smknv7tnOvnG42ZmNAXM2T7Kn3247R4pP4 XoylvhmDAFmp01pV+t94Bncd4xnAP+dmtImr9knw+sqwCVAU4tHEOaxeeB7EYXpCv2xx wYNA== 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=jNa3bt3d3GlKT3LJNMc0nA8WAPadcmiTi3tS/eWpszk=; b=K3LitIzIc2kZ4mlJT2Gf3ey6i4HgP67yamYNWsgeVJeAH6YJuLyiLNTZWulbUKvgP1 MnzsqGwTJe73eRJAduqIiJnzqmvCo3aJpNV3XFRQOS9bs52ErXNfkPRK/ezxNcB8Knaf 187OMgRfSQbZv7oMNgDI6zw15P34sASQyjODINNG6wnyFwssAFw614TbLYravPFLXXeu oI7fNbBklaK7ra+M5ugZC3NBMCFb/kP0P0+eQ2ulHOb3VGHzJkfBu7/PrbkeNFLAUZUl t1OiLest9QFeGDDhksPfI4CWLjSyM+2E6ebBap9hxxHHc32nXNjvE0W1iAYhVt8oIG+i l21w== 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 c5-20020a6566c5000000b00543d33304e6si2711439pgw.667.2023.06.22.04.41.50; Thu, 22 Jun 2023 04:42:02 -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 S229544AbjFVLRZ (ORCPT + 99 others); Thu, 22 Jun 2023 07:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjFVLRT (ORCPT ); Thu, 22 Jun 2023 07:17:19 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 943A91BDF; Thu, 22 Jun 2023 04:17:18 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QmySS4Tjfz67Gvv; Thu, 22 Jun 2023 19:14:32 +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.27; Thu, 22 Jun 2023 12:17:16 +0100 Date: Thu, 22 Jun 2023 12:17:15 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , Subject: Re: [PATCH v6 13/27] cxl/mem: Prepare for early RCH dport component register setup Message-ID: <20230622121715.000056fb@Huawei.com> In-Reply-To: <20230622035126.4130151-14-terry.bowman@amd.com> References: <20230622035126.4130151-1-terry.bowman@amd.com> <20230622035126.4130151-14-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: lhrpeml500002.china.huawei.com (7.191.160.78) 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_H4,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 Wed, 21 Jun 2023 22:51:12 -0500 Terry Bowman wrote: > From: Robert Richter > > In order to move the RCH dport component register setup to cxl_pci the > base address must be stored in CXL device state (cxlds) for both > modes, RCH and VH. Store it in cxlds->component_reg_phys and use it > for endpoint creation. > > Signed-off-by: Robert Richter > Signed-off-by: Terry Bowman Seems reasonable. Reviewed-by: Jonathan Cameron > --- > drivers/cxl/mem.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index 4cc461c22b8b..7638a7f8f333 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -51,7 +51,6 @@ static int devm_cxl_add_endpoint(struct device *host, struct cxl_memdev *cxlmd, > struct cxl_port *parent_port = parent_dport->port; > struct cxl_dev_state *cxlds = cxlmd->cxlds; > struct cxl_port *endpoint, *iter, *down; > - resource_size_t component_reg_phys; > int rc; > > /* > @@ -72,11 +71,11 @@ static int devm_cxl_add_endpoint(struct device *host, struct cxl_memdev *cxlmd, > * typical register locator mechanism. > */ > if (parent_dport->rch && cxlds->component_reg_phys == CXL_RESOURCE_NONE) > - component_reg_phys = > + cxlds->component_reg_phys = > cxl_rcd_component_reg_phys(&cxlmd->dev, parent_dport); > - else > - component_reg_phys = cxlds->component_reg_phys; > - endpoint = devm_cxl_add_port(host, &cxlmd->dev, component_reg_phys, > + > + endpoint = devm_cxl_add_port(host, &cxlmd->dev, > + cxlds->component_reg_phys, > parent_dport); > if (IS_ERR(endpoint)) > return PTR_ERR(endpoint);