Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp407469rwe; Fri, 14 Apr 2023 04:56:06 -0700 (PDT) X-Google-Smtp-Source: AKy350Zp7P8iXPa8hy73p/TBLgNCvjNnQ6tR0XSfSVNzIaf2i/rGaiYudyCRx8EjbrjVjed/NzxP X-Received: by 2002:a17:90b:4b4e:b0:246:9eea:de23 with SMTP id mi14-20020a17090b4b4e00b002469eeade23mr5221473pjb.37.1681473366112; Fri, 14 Apr 2023 04:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681473366; cv=none; d=google.com; s=arc-20160816; b=wjD93QRlmbGBUslEXeO2g9J9xkkSytWmayTkIssrDi5gu4ybAnf0wJhYJ9doODvaQB pxJdnKjeQJCdiFOeC/yxajb9aDis9Z6/heT0JMqCrOj4CKHPPhOIi0dM+Npy1IFDTk9d gm1zzDw9sWqxajO5Uj4MadCD6u+4ruP/aeEkKRSFS1iHr5TiNbfx9h8NSZY5D/Gs+LWK O9PZbxKwx+cvK1I4PnE+0h3/qXlhlEi4jDRQEadeQpEQzvzKqaQPuEIy8TWP+8jVzS9P 8F6NFXyQRTjwdSxZ/8IUTkQRPCFG1SH5dmcOvsXk3Z4Qv7XGSdQnyNm4YkTqlLxSiiLf 66Aw== 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=6WVyfsxJuvhQhY2NGL3Dx1O3PHd3NoxpZcA0mALaIwI=; b=F/v4uNePt/Qj6kqVfXa1gh5MGoEfpiEcKei95hy7OgAAfJ+256h1h3WGYd0LiZP+5Q JopKH/L/+F5RBcJOZwkzXLzv59rdD/vOwW1j6n9aiq873PgSp5EqoaUOOtYFcjWwf7UU RVzVwuaUZpPEVCBT02/CjAqx2ISfifG6xU/4fG51e6JTD4ovx7pHeSrQwwgbZo9sBII0 KpEulK7WdsKsnuYAGBW6rDleFKwzcj/Fb3DtG8+Z1x1vYKYwv2rRrjqpRicUO4iQPWTF iKrmKbRQ1nFk63QcyPlvdthZcMUmMA1DmJynnZNULmzbODKGSK6ItSuEHwIpyl77J26q ssAw== 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 w17-20020a17090a8a1100b002375a3e4b10si4391685pjn.47.2023.04.14.04.55.49; Fri, 14 Apr 2023 04:56:06 -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 S229839AbjDNLrJ (ORCPT + 99 others); Fri, 14 Apr 2023 07:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjDNLrH (ORCPT ); Fri, 14 Apr 2023 07:47:07 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A74483CD; Fri, 14 Apr 2023 04:47:06 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PyZQg3tQvz6DFQG; Fri, 14 Apr 2023 19:46:03 +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; Fri, 14 Apr 2023 12:47:03 +0100 Date: Fri, 14 Apr 2023 12:47:02 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , Subject: Re: [PATCH v3 1/6] cxl/pci: Add RCH downstream port AER and RAS register discovery Message-ID: <20230414124702.00007fc5@Huawei.com> In-Reply-To: <8d2690d8-9418-e2da-8834-6457a60a67cb@amd.com> References: <20230411180302.2678736-1-terry.bowman@amd.com> <20230411180302.2678736-2-terry.bowman@amd.com> <20230413163050.00006bfb@Huawei.com> <8d2690d8-9418-e2da-8834-6457a60a67cb@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: lhrpeml100001.china.huawei.com (7.191.160.183) 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_H2,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 > >> + endpoint = devm_cxl_add_port(host, &cxlmd->dev, cxlds->component_reg_phys, > >> parent_dport); > > As above, I'd prefer to see this refactor done in a precursor patch before the new > > stuff is added. I like reviewing noop patches as I don't have to think much (so > > can do it when I'm supposedly in a meeting ;) > > > > Ok. I'll add an earlier patch that introduces cxl_setup_rcrb() and first moves this > chunk into cxl_setup_rcrb(). The following patch will replace the cxl_setup_rcrb() > logic with the AER and RAS discovery. > > My understanding is the requested refactoring changes then splits this patch into > the 3 patches listed below (using git log latest first order): > - Add RCH downstream port AER and RAS register discovery > - Refactor RCD component discovery into separate function > - Refactor RCRB register mapping into separate function Spot on I think. Thanks, Jonathan