From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC15DC05027 for ; Wed, 8 Feb 2023 12:44:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 296266B0071; Wed, 8 Feb 2023 07:44:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2466C6B0072; Wed, 8 Feb 2023 07:44:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 135A86B0073; Wed, 8 Feb 2023 07:44:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 076096B0071 for ; Wed, 8 Feb 2023 07:44:19 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D75D1160130 for ; Wed, 8 Feb 2023 12:44:18 +0000 (UTC) X-FDA: 80444092596.21.C87163C Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf09.hostedemail.com (Postfix) with ESMTP id 8858E140005 for ; Wed, 8 Feb 2023 12:44:16 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675860256; a=rsa-sha256; cv=none; b=GMc2Gw1SxXHRY6aTRP3LyvbyQLOnQ14oYnq3V1btKYkoBoL5+LbNqSO1tgzpeIP1AFblQU HRt5K2RXY0ElByR253AaiCsj0cnFmHwhT34fChOXaFvcb5zUK31I6/HjDTNAtjvTDAeepx mZw6F1itep3IuW3vsQ6tqemFnxNOxCI= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675860256; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x9JeMPZ52OdX3oQXK1asGmbwGElwSQ+A8zwGmJpBrPI=; b=zc5qDWlHGN3ghhV/n86OnpDlZi9+G3p3iM+B0kvzYkKL55sUC0OPPBUhh42XoYNU7YCPFb eSkFPs5R9DBaU1i/YaImIdgclUMwTc8lwECb9aNzd06gvj1se+9Zbpl2ohFzvCRQlcsFom fTUGGFtI97HMwI5UzWp1ihumFNedU8A= Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PBfm73Ht9z6J9mD; Wed, 8 Feb 2023 20:42:47 +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.17; Wed, 8 Feb 2023 12:44:10 +0000 Date: Wed, 8 Feb 2023 12:44:09 +0000 From: Jonathan Cameron To: Dan Williams CC: , , , , Subject: Re: [PATCH 10/18] cxl/region: Fix passthrough-decoder detection Message-ID: <20230208124409.0000658e@Huawei.com> In-Reply-To: <167564540422.847146.13816934143225777888.stgit@dwillia2-xfh.jf.intel.com> References: <167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com> <167564540422.847146.13816934143225777888.stgit@dwillia2-xfh.jf.intel.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: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Queue-Id: 8858E140005 X-Rspamd-Server: rspam01 X-Stat-Signature: kh3at9qrmu8u6ehicnqep9uek31qkny5 X-HE-Tag: 1675860256-516861 X-HE-Meta: U2FsdGVkX193tdJG6Kwigtf03nBoVS9hOoRKNvYK3Ut8cz9nMZ2OpPKCPwHZsgZAWnCfpJEwurgAMpRfHqLKjz5HtnALOuHnjk09w4e8e7dTefVioObh4hqmK2gESKI3DeAiZwkc7QUtcKdV7nobTeRzGiF4mDxbU6nsWCSXIrepBDC52IS4vlOdgt2HDexeJipVtBKlu55qawVNtLKIP5v3OSSnYmRXu5xE1LOPUqxzyLds2W+fFYVIBOaBmbh45kpYZ8/3Dgphy+i7OcwKhFvddV/7FQnPOsob81Azb9Ned6yCzUDqCK5Npw1S7SligppmSacFF6YEQQY9VT3GQaWQA0BlkpsTfL2H/Xogk2sWqia4vYA1VLk9x4MjW28lxZyBnKkaQtvic4w3hpzchKPCju8FRrFEASv7/sD78urBlZk0KhXcFjaQD0n84cA5nhSt17XYXF9ax6Z4KUeL9T5ZgibF6jsV/6Xy8Kp5zxPTCd1DYkDmDqAWTWNbhtAz+AwUyUCniCRKs04DmZRJOZDy0MOkPvoLWqDG1xAevPSgm1x6KTGhCkqhK2wHybuSFI1Vo+d0iWiT5pn0uNtwaMEz1ovlEWBTVqgsGXFNTfSM1C5DxPzRBsLgnZADRqKB2LeAUopFa4KK4yJO0FV/IxckSm4kV1JAGhgyhs0Twft1zCiyTG+PW7Wg3t8a8r4mBjZ5d75McOlS4AbPg6UZs7FCCeGkUrzUeKAU/13ZuzCCSjDLydKBOGzzI/hDG9yPwB79QxwiiKCwIN+OMDf1lD2whjw0LDQ69nYt4TA60j/TnCcL0DIk311CVF3iIYpF3AKT2xM2qt07glrOrpEPleb75ZauOgyrjUVvLUBLuq2h7wlkljn+xtXbig38CD8/2HaNiP4s2Ww9vyFQU0m0Br9o75rPphItcXkvxquVIn7Mb0yTR5ZZds1FGnQrb6Xs6uFr2d2cW9JB7JqjL4R BoQgpr8A oNqeGpaMcvPIakV/R6h8OwMV8aBKFwaOR8juPUIsxNQqIBjX+nWcOrMmhIyoxVO+lWSrSpLhY76T4cysNQsTEQgPKJwARpoxxNq/k6E7FqoyLiLmWBYCdo0uUFAPKTF1/ytg7Bzose5aTbxt8g6nnJC5LtZqeAFiyH9hCpbDurfc1RIJRlGY+Og2HwNlHt3jbfzHmbPjcVBeF4Z+vJbkiA1q0wXxtbLnzHOz+udUF3oG1ucgB+D7lSngxq6mOY8hSpENN4Q0B2TpyKtqHE2qQYU5H8RLASF2Gdv8CU4/ZqIE0RLc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, 05 Feb 2023 17:03:24 -0800 Dan Williams wrote: > A passthrough decoder is a decoder that maps only 1 target. It is a > special case because it does not impose any constraints on the > interleave-math as compared to a decoder with multiple targets. Extend > the passthrough case to multi-target-capable decoders that only have one > target selected. I.e. the current code was only considering passthrough > *ports* which are only a subset of the potential passthrough decoder > scenarios. > > Fixes: e4f6dfa9ef75 ("cxl/region: Fix 'distance' calculation with passthrough ports") > Cc: > Signed-off-by: Dan Williams > --- > drivers/cxl/core/region.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c > index c82d3b6f3d1f..34cf95217901 100644 > --- a/drivers/cxl/core/region.c > +++ b/drivers/cxl/core/region.c > @@ -1019,10 +1019,10 @@ static int cxl_port_setup_targets(struct cxl_port *port, > int i, distance; > > /* > - * Passthrough ports impose no distance requirements between > + * Passthrough decoders impose no distance requirements between > * peers I think we have a terminology inconsistency. My understanding was we were using passthrough decoders for the special case where there is no programmable hardware. In this case I think we are also considering the case where that hardware must be programmed etc, it's just that we don't care about interleave. I'd just explain what it is rather than trying to assign a term. Decoders that have a single target configured impose... > */ > - if (port->nr_dports == 1) > + if (cxl_rr->nr_targets == 1) > distance = 0; > else > distance = p->nr_targets / cxl_rr->nr_targets; > >