Message ID | 20230113041025.4188910-1-quic_bjorande@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp72943wrt; Thu, 12 Jan 2023 20:13:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXu+JZ8jSiYsHaXaQGrByrx4LU3QSywkH9E2sxDUKYKDAk6TS04qoFZLN+AkttX1+zuld6Tv X-Received: by 2002:a05:6a21:33a2:b0:b5:d242:d4de with SMTP id yy34-20020a056a2133a200b000b5d242d4demr24479788pzb.58.1673583195940; Thu, 12 Jan 2023 20:13:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673583195; cv=none; d=google.com; s=arc-20160816; b=u5cf1MbSmJ2Uwl8VtmEdk2YQ4w6wCVbi+K4aPy6iScLIq3+bzES2bwRnuoR1X7zeLq KyCt3k2F/kNbA/u9X/fikvkBgbXR2PfmDK2ZO1vjOCxyrYwrcvolBzAsvo+oTdqobclR SIQdjACyVsrJ6ns+Tx4ICh6pcZk/nTy23s8LkFcNLDa6PDRzRMtuDZuBN5w+TnXkC6zE XE4SBwpuC16rXpRdYU9C0eFPnW36c45AGOBeX/3ZeJzA/93QpqvWqPLmYJvUrMx4K2mK k1dtU0GTX+GGCUlTIqfU3n8/+b/ztelDTFhGoTfq4saNixdluHJ3gMJpR0g0OOYPnKGr vAFw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8ZciTXFFLkRoWa1kaSZDjJPCYPAzB7BjOASJWcNwcxM=; b=vj/j5uePEJ2kBqKBJWhYeP+Q+UKbAWAtOkEyzUg5/6p3G8rPZ1O2ZBepDjVd+h2cnA AOk5PTcK6eDPm9dNiLroLD+6h8OmDk3V9LEnjWlGX8dnQGt4PVBaXycftXinznXOB9Ut sQwervjln2oGHwmpm+tiAtKVo6BZzABXA+sG1v1rDdR6SuODz9Jovwoc5D7YFp9cKM26 fYqs7Lpz1FzYZdOo35/rKPJ93IJLGwwX5iCy45BlsqA+6EhQJjmCqrw/V0wwl5idBoSO ifd1YPWTf59TU3TIFWxfKr7u3+jB/TBC9jxJvR8q5CialM84sNvBbNdtKOAD0r735lqL aJVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FhCPWOZt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a655548000000b0047699804989si19507218pgr.64.2023.01.12.20.13.03; Thu, 12 Jan 2023 20:13:15 -0800 (PST) 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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FhCPWOZt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjAMEKn (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Thu, 12 Jan 2023 23:10:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232088AbjAMEKh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Jan 2023 23:10:37 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 813354D4B9; Thu, 12 Jan 2023 20:10:35 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30D410vi025096; Fri, 13 Jan 2023 04:10:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=8ZciTXFFLkRoWa1kaSZDjJPCYPAzB7BjOASJWcNwcxM=; b=FhCPWOZt8BA6rM1Ea1dSYnib7DkLTuwjPdmsLdNhZV/T717ZK4OwrySudWtT+UzdyXyH pU7JFioGyG66A/u8JwpNvfLnLc5Fo3QcqnaTfl+uy+9cbJ3WKtncaKVoi4+S/I2FdwdF 8DDUZHcYTn11jr8YPwg2s2f3Pb/uIgXYwtyFszGOhtQRCBg3von4tauxG/4aQjVZHCCT CkqRQGkX44ByyCULD1tttNT09upeT3XylEVHhIcLdMQa25L4gx7J4wKaPo1Fz5tQFDwS vyf0GQ+6ZbPPHHyoEk5oToeXGL5dUcS3OqsnJU+O0XxhHNaxA4ipg+DvYSoo5Me/QLjT HA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n2evhtbq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:10:32 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30D4AVi0000713 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:10:31 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 12 Jan 2023 20:10:31 -0800 From: Bjorn Andersson <quic_bjorande@quicinc.com> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org> CC: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Johan Hovold <johan@kernel.org> Subject: [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Date: Thu, 12 Jan 2023 20:10:25 -0800 Message-ID: <20230113041025.4188910-1-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: lw_fs6Wqcy-K2PMW0RAY9oijXBFY-LMN X-Proofpoint-ORIG-GUID: lw_fs6Wqcy-K2PMW0RAY9oijXBFY-LMN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_14,2023-01-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 clxscore=1011 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301130026 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754879173287697079?= X-GMAIL-MSGID: =?utf-8?q?1754879173287697079?= |
Series |
arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
|
|
Commit Message
Bjorn Andersson
Jan. 13, 2023, 4:10 a.m. UTC
Booting the CRD needs roughly 64MB CMA, rather than relying on people
adding boot parameters etc define a region for this, to remove the
allocation errors from e.g. NVME.
While fixing the CRD define the same region for the X13s.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
.../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
2 files changed, 18 insertions(+)
Comments
On 13.01.2023 05:10, Bjorn Andersson wrote: > Booting the CRD needs roughly 64MB CMA, rather than relying on people > adding boot parameters etc define a region for this, to remove the > allocation errors from e.g. NVME. > > While fixing the CRD define the same region for the X13s. > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- So, to reiterate, the NVMe needs ~64M of contiguous RAM for $reasons and without this patch, it is not guaranteed that it can always find such a block which causes issues and adding a CMA region resolves that, is that correct? Konrad > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++ > .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index b29c02307839..e30a37c73b90 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { > > regulator-boot-on; > }; > + > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > }; > > &apps_rsc { > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index 78e61a8184c5..5bfd1f0b2a24 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { > regulator-boot-on; > }; > > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > + > thermal-zones { > skin-temp-thermal { > polling-delay-passive = <250>;
On Thu, Jan 12, 2023 at 08:10:25PM -0800, Bjorn Andersson wrote: > Booting the CRD needs roughly 64MB CMA, rather than relying on people > adding boot parameters etc define a region for this, to remove the > allocation errors from e.g. NVME. > > While fixing the CRD define the same region for the X13s. > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s I'm not sure if I've seen this issue in the past, but booting with this applied isn't showing any obvious problems like described in the commit. It would be nice as Konrad said to be a little more explicit about what you were seeing without this, but that's my personal opinion. > --- > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++ > .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index b29c02307839..e30a37c73b90 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { > > regulator-boot-on; > }; > + > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > }; > > &apps_rsc { > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index 78e61a8184c5..5bfd1f0b2a24 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { > regulator-boot-on; > }; > > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > + > thermal-zones { > skin-temp-thermal { > polling-delay-passive = <250>; > -- > 2.37.3 >
On Thu, Jan 12, 2023 at 08:10:25PM -0800, Bjorn Andersson wrote: > Booting the CRD needs roughly 64MB CMA, rather than relying on people > adding boot parameters etc define a region for this, to remove the > allocation errors from e.g. NVME. > > While fixing the CRD define the same region for the X13s. > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Thanks, Mani > --- > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++ > .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index b29c02307839..e30a37c73b90 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { > > regulator-boot-on; > }; > + > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > }; > > &apps_rsc { > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index 78e61a8184c5..5bfd1f0b2a24 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { > regulator-boot-on; > }; > > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > + > thermal-zones { > skin-temp-thermal { > polling-delay-passive = <250>; > -- > 2.37.3 >
On Fri, Jan 13, 2023 at 03:17:05PM +0100, Konrad Dybcio wrote: > > > On 13.01.2023 05:10, Bjorn Andersson wrote: > > Booting the CRD needs roughly 64MB CMA, rather than relying on people > > adding boot parameters etc define a region for this, to remove the > > allocation errors from e.g. NVME. > > > > While fixing the CRD define the same region for the X13s. > > > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > > --- > So, to reiterate, the NVMe needs ~64M of contiguous RAM for > $reasons and without this patch, it is not guaranteed that > it can always find such a block which causes issues and > adding a CMA region resolves that, is that correct? > That's correct, $reasons being that NVMe complains about failures to allocate CMA memory. I'll post a v2 with this in the commit message. Thanks, Bjorn > Konrad > > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++ > > .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++ > > 2 files changed, 18 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > > index b29c02307839..e30a37c73b90 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > > @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { > > > > regulator-boot-on; > > }; > > + > > + reserved-memory { > > + linux,cma { > > + compatible = "shared-dma-pool"; > > + size = <0x0 0x8000000>; > > + reusable; > > + linux,cma-default; > > + }; > > + }; > > }; > > > > &apps_rsc { > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > index 78e61a8184c5..5bfd1f0b2a24 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { > > regulator-boot-on; > > }; > > > > + reserved-memory { > > + linux,cma { > > + compatible = "shared-dma-pool"; > > + size = <0x0 0x8000000>; > > + reusable; > > + linux,cma-default; > > + }; > > + }; > > + > > thermal-zones { > > skin-temp-thermal { > > polling-delay-passive = <250>;
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index b29c02307839..e30a37c73b90 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; + + reserved-memory { + linux,cma { + compatible = "shared-dma-pool"; + size = <0x0 0x8000000>; + reusable; + linux,cma-default; + }; + }; }; &apps_rsc { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 78e61a8184c5..5bfd1f0b2a24 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; + reserved-memory { + linux,cma { + compatible = "shared-dma-pool"; + size = <0x0 0x8000000>; + reusable; + linux,cma-default; + }; + }; + thermal-zones { skin-temp-thermal { polling-delay-passive = <250>;