Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2814245lqz; Wed, 3 Apr 2024 09:16:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIgQ1BLM+0qe95Aa5+/s+2b0GGCvyqesWQhPrl1kdrtLF4moNuthxBbUYztX2mzovbadIErYD9+yuh/M2T0BbCwq+jfsJP+JCY1Ehr6w== X-Google-Smtp-Source: AGHT+IH9xAJgFmxDZt5SNsp1SZyKTKowL2Y7nf6Ti6xB2zDwjpKurnwcOmJbfSPsm07EN7jFj4lU X-Received: by 2002:a05:6a20:d80b:b0:1a3:bdd6:efef with SMTP id iv11-20020a056a20d80b00b001a3bdd6efefmr109118pzb.50.1712161008349; Wed, 03 Apr 2024 09:16:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712161008; cv=pass; d=google.com; s=arc-20160816; b=hiP4q00sqefkfL0M5rRk2o/TzuEl5dyp7p7G8+oefdrS98vLTlo2RK+AT8VHKTXYqN Mn7ESew4K92DfFD/MPFNMOu/c10EeVo2Bu4SaWO/YGM1Y4OPJuTzNPehNJrovSEwjH5v 0QwR+975Jucc62hT0H0igPhnMeHpxTM82cJanW9tCKqhAkJnslna+k9+68HYq5vuTKxh QFxtag1T3c4hSAEUUFMidyOTcOZKFvLu2PEgttW+gAE7qDoiwd930E6F7WN+RcoPHEKd COLUi/xG53HpybAdAtNDqq8vXept/gBtN3JW34gdKp4KT2Z9UqxDtKfaOZ6vSNp5Xs8o WjsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=MtGRMP+42HJSKQJVWVTzdpzm1TfHu/zDZrH0JXFXcFY=; fh=wYdDkmyE9zzznEKXyoSIKG18i2MeoZt1NOCaVuxda5w=; b=cFvyzbncaPdAXB/aIrRPpIsIN5WnXVLEB/ysnQ8xn/yJ3WSADXCnft7FZn/y20Rf7r eiW02xDWhFt3FTZSWDoUwRm6+BjC8BlVx94NmttiNEftZ0kFX+6tEC6+XC4H39L6zGIQ 5SQPULKxkHt4diGuoFxZCk7WR1M1kY7G7O/qMMmjBy8r27kKSvzZe9NdmFDXDHoHDGk8 hHjncMHeQyILFAzpuE2Xze39/zBwpJtn70jNTc2N0kEL2GIkIGv9aXlSXrRB3xXRei61 AKBlF3wdImSeAUev+2U5y6/tW2euhWcYakENjvMJ31nXsnwvg08sjGJc3zZvowYbecWC 9cdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-130117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k24-20020a63d858000000b005dc894ea130si13146797pgj.384.2024.04.03.09.16.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 09:16:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-130117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5F854B258BB for ; Wed, 3 Apr 2024 15:44:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63BF414A4F4; Wed, 3 Apr 2024 15:43:52 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1974614A4EC; Wed, 3 Apr 2024 15:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712159031; cv=none; b=sBvxPZQpE0KrTWYckjicU7eSt4LySqMoPIpmjbOaDMSwHyziq+eG4wgvwTLDtQd0T3elTlVAELgUBu0NE8mBl/33gZ2WE3SQXIjX69kHXemMBu19xRiPbzAYnE0DDlPfV4rGbRYZLhiYyxuprGBAm2RQ7Ikm5/8MqjNPBWOOzWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712159031; c=relaxed/simple; bh=EUdlrtYcP9SwWnsQ8olJN/RqljV2d9AFFIWAUVklaZA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lJE4qUBxEqmy3Sx+KyqFL98ZKBGeBA68uxCcfcVbToWImp5wUjwveqlOFHmQPxMSagqm6NJHhDF2cj6fYQM6+nF3Wc7jeBFkdq7CCy9kUY2WPB4ZQqS8DXpdYtplM3BejM+RC1Oh1QkGtq/GR9lqwaLiCG/sUFuo+Ib3CtDF2nA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V8psd4VBDz6G89M; Wed, 3 Apr 2024 23:42:29 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 6461B140516; Wed, 3 Apr 2024 23:43:46 +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_256_GCM_SHA384) id 15.1.2507.35; Wed, 3 Apr 2024 16:43:46 +0100 Date: Wed, 3 Apr 2024 16:43:45 +0100 From: Jonathan Cameron To: Huang Ying CC: Dan Williams , , Subject: Re: [PATCH] cxl/hdm: Add debug message for invalid interleave granularity Message-ID: <20240403164345.00002e3d@Huawei.com> In-Reply-To: <20240402061016.388408-1-ying.huang@intel.com> References: <20240402061016.388408-1-ying.huang@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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500005.china.huawei.com (7.191.163.240) To lhrpeml500005.china.huawei.com (7.191.163.240) On Tue, 2 Apr 2024 14:10:16 +0800 Huang Ying wrote: > There's no debug message for invalid interleave granularity. This > makes it hard to debug related bugs. So, this is added in this patch. > > Signed-off-by: "Huang, Ying" That is indeed odd given similar code around it. Reviewed-by: Jonathan Cameron > --- > drivers/cxl/core/hdm.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c > index 7d97790b893d..973a27543ed5 100644 > --- a/drivers/cxl/core/hdm.c > +++ b/drivers/cxl/core/hdm.c > @@ -888,8 +888,12 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld, > } > rc = eig_to_granularity(FIELD_GET(CXL_HDM_DECODER0_CTRL_IG_MASK, ctrl), > &cxld->interleave_granularity); > - if (rc) > + if (rc) { > + dev_warn(&port->dev, > + "decoder%d.%d: Invalid interleave granularity (ctrl: %#x)\n", > + port->id, cxld->id, ctrl); > return rc; > + } > > dev_dbg(&port->dev, "decoder%d.%d: range: %#llx-%#llx iw: %d ig: %d\n", > port->id, cxld->id, cxld->hpa_range.start, cxld->hpa_range.end,