Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1339804rdh; Mon, 25 Sep 2023 09:38:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/0vk3l+VOehbaRLCEuAGKiektxD1fltL6IPqtKijwbGJve6s4aDe9jI+mZhF+AgWkHDvk X-Received: by 2002:a54:4593:0:b0:3a1:e85f:33ee with SMTP id z19-20020a544593000000b003a1e85f33eemr7465714oib.56.1695659937686; Mon, 25 Sep 2023 09:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695659937; cv=none; d=google.com; s=arc-20160816; b=wbcGawWeQgLJ2QhdfwVz5gxJGKUUDRFXZQqhH8VnX6jJ5sIV16bXOCalpYdWD+thX+ jFJX0W1COm3Hn9kGDHycV1BrFFherE/tnqB1axRMtBKpMz0H5Ubfg+MOpdQAjL29pjTI 2ak0tGG79xtNuUqwhf2pYSYTDPOvCunxIqt67AXKWSSR76UvfTezeRYoeWAjX8vgVaOD rA7Me6qy6YWfZJSG0o9FNdf1bMTi/iXj8YkDAVs/u7sHb8aRN5QFXphjS3CsBu84k954 WB6JptPry68194m6XZABiUW503GRSGQPZwg+vzSQsfIwwv7bBMPIpnT9fSNqJXficdqo luNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LGghZheFgcUR7dMTyW2af1MMF9tD2msZKaFdfOnW2ak=; fh=l6oa0IbpiAHXPPxlbmPcSqXsGE00coiY/jxIofgObr8=; b=HZUbRXjP07roHMM+2hynNYQLcNfsPjJdHzEbswkL3tRI8yQpYlPP2j1C0oJWid+uk3 6w0+0r6edppxYMMHpbRbmOtACyEyGGb88GlIXxJoEmw/Yozc4/YQMtOPNPuK73fB6N5o ywLgJThtevcPhteF7d/XpnvoIdYgGgpzrOLHTFkxetmvZuSQo2mzlZE1WUSjCEc+6h3d /plX8cHA8lY5ZNabKukHQuhD3qJlYyEH5/kmA5KInt1Qa+kfcaCVaCf4EuRc4oRjAJ6P wUOvOzNBilDJldE9c4flO+mVTOBEOlPR6VFvhxOR/7APtQZPA4R31p21xyuBV9ZijxgB H/zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sLcW81cd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s196-20020a6377cd000000b00577723d24b0si10292039pgc.46.2023.09.25.09.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 09:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sLcW81cd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EAB92809268B; Mon, 25 Sep 2023 03:38:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbjIYKiG (ORCPT + 99 others); Mon, 25 Sep 2023 06:38:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbjIYKiD (ORCPT ); Mon, 25 Sep 2023 06:38:03 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BDA4B3 for ; Mon, 25 Sep 2023 03:37:56 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5310a63cf7bso7112543a12.1 for ; Mon, 25 Sep 2023 03:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695638274; x=1696243074; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LGghZheFgcUR7dMTyW2af1MMF9tD2msZKaFdfOnW2ak=; b=sLcW81cd/ojgWDKhXAyU8Jbg8Rg+b7Rj5PywDiQvG/iu4XNltDOMjNuv1Yj7G3cGL/ WhDH9MF52fFM1VKPaK4AMs1I6sqKbMgAnYHRwf4msFaXikT2L36gJYK7uOF1NaYELq+9 SVVRL3LfoZbVXx1mXP0pYGYHLSryT0ALHuo4VoHugci3qxdw5E7TiY/RT/s1UCwcbkp8 YsXyX9EVzbFMnScpK7NsaMZSOgeLhsFF+nqasFE4jQW9VmJfKEOVtNjzIziSMZoxiAjN AZ2sIRui+IVTZ45dvycqyHWu3QlTBAjrGdCtV76wgcQjooIMms0GVxv6aoP7Rm9X/oe3 cvYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695638274; x=1696243074; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LGghZheFgcUR7dMTyW2af1MMF9tD2msZKaFdfOnW2ak=; b=FneqGxDkMj2olBfPNQ62JBmXtpVwsSR7Np51kKUBZSfr8qeeCwYfWAFbPbo6MX5Nvl zvxCT9Rad4mqp4BH9bdv2UrLMUw2+zvynECINMZtLs7UkKuh1QkuZnL+ECKk36B+GOmW kcn3Tw9hKKmxB7eA2sTuSIIj8GB/dG+2NkGdYju06HpLduhsEv4SsjXlK2a6dqwt+hPF PebCh1tTdqi3xGaedU34rY+DE43FL/edgS4JqzPQpkdWtHizRZSQqvnP1c2c+nN9trXm n8bgtH0XCJmfXNM96B3O8LPQC+GgS4pVJ1HMU5FoN9XYE3x+Qo4jCJM9tTW1XyZs+5lP ArCQ== X-Gm-Message-State: AOJu0Yw1xgfuctGSn7c6NuAYYBWSuosvwpGj0UXH3zAVosELvD/dGutH QzwTGflK6pkuO46PU0tRo26JFQ== X-Received: by 2002:aa7:c481:0:b0:52c:b469:bafd with SMTP id m1-20020aa7c481000000b0052cb469bafdmr4504674edq.41.1695638274456; Mon, 25 Sep 2023 03:37:54 -0700 (PDT) Received: from linaro.org ([86.120.16.169]) by smtp.gmail.com with ESMTPSA id y11-20020aa7cccb000000b005331f6d4a30sm5325436edt.56.2023.09.25.03.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 03:37:54 -0700 (PDT) Date: Mon, 25 Sep 2023 13:37:52 +0300 From: Abel Vesa To: Konrad Dybcio Cc: Manivannan Sadhasivam , lpieralisi@kernel.org, kw@linux.com, andersson@kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: qcom: Add interconnect bandwidth for PCIe Gen4 Message-ID: References: <20230924160713.217086-1-manivannan.sadhasivam@linaro.org> <18635bed-b7e3-4acb-b176-cd9f87a35c7f@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18635bed-b7e3-4acb-b176-cd9f87a35c7f@linaro.org> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 25 Sep 2023 03:38:30 -0700 (PDT) On 23-09-25 12:34:53, Konrad Dybcio wrote: > On 25.09.2023 12:33, Abel Vesa wrote: > > On 23-09-25 10:57:47, Konrad Dybcio wrote: > >> On 24.09.2023 18:07, Manivannan Sadhasivam wrote: > >>> PCIe Gen4 supports the interconnect bandwidth of 1969 MBps. So let's add > >>> the bandwidth support in the driver. Otherwise, the default bandwidth of > >>> 985 MBps will be used. > >>> > >>> Signed-off-by: Manivannan Sadhasivam > >>> --- > >>> drivers/pci/controller/dwc/pcie-qcom.c | 7 +++++-- > >>> 1 file changed, 5 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > >>> index 297442c969b6..6853123f92c1 100644 > >>> --- a/drivers/pci/controller/dwc/pcie-qcom.c > >>> +++ b/drivers/pci/controller/dwc/pcie-qcom.c > >>> @@ -1384,11 +1384,14 @@ static void qcom_pcie_icc_update(struct qcom_pcie *pcie) > >>> case 2: > >>> bw = MBps_to_icc(500); > >>> break; > >>> + case 3: > >>> + bw = MBps_to_icc(985); > >>> + break; > >>> default: > >>> WARN_ON_ONCE(1); > >>> fallthrough; > >>> - case 3: > >>> - bw = MBps_to_icc(985); > >>> + case 4: > >>> + bw = MBps_to_icc(1969); > >>> break; > >> Are you adding case 4 under `default`? That looks.. bizzare.. > > > > That's intentional. You want it to use 1969MBps if there is a different > > gen value. AFAIU. > Gah right, then the commit message is wrong. Yep, should be: "Otherwise, the default bandwidth of 1969 MBps will be used." But maybe we should not default to that. Maybe we should still default to 985 MBps. > > Konrad