Message ID | 20230117184630.2775905-1-quic_bjorande@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1957197wrn; Tue, 17 Jan 2023 12:06:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTPlzhIt7dzR9jEB2bIMwITnVkitYqOQJwK7/rQHqT7V+EUhkEr+ZshxyYEnAqUHWNCXAR X-Received: by 2002:a05:6402:294c:b0:49e:28b6:4cf5 with SMTP id ed12-20020a056402294c00b0049e28b64cf5mr4428469edb.12.1673985966697; Tue, 17 Jan 2023 12:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673985966; cv=none; d=google.com; s=arc-20160816; b=QqKw43hc8Ah4ulnAKmC+O+H3trokq8h89Ma4JRCaa1RWHGNQlnZ2VzYfBveqE9NFTx tPrEhHKdMLo9AWCGm6WJbFDY8EChQQiItM1g7mfGQgs8moakXq7kvorIRwqGM8JjX9u0 72CgH1loxSEeUVzeAa72klluxX72jiSRlHchq3mh/q1A5MYBudwav6qTFcRsyLm/OeD4 stqNKh8oIBXmfaf8c9w6BvovD2fUBJjDYFkHXPTiZV52dLeR3lbgQev6XV9zLYbGdEAE DM+xi4ZzPZA33O9bviEZw9fDElYgU9AwB6q5xshZy3iLaLTzE40f4IqVmyenKD5dIiH4 fJag== 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=iVEJ8ngNMnmubogwgqBceWjbGwsJF2hG5TCwZ0pb0v4=; b=B+J6LqwX1H8cnp2YGNZNlv6N28KQtd8W+NfksxkJmJnY/bsbbv/8gW8CqmQ9It7aGt jBGicqs4cKUZKwNPVLEs2C0oikSF8XjDlY/X0aT93X87nbIocQYiJpAV3lHmN4YyMq5Z UXDWkkZi3G7joIFkd4Y+RfKr28c9NA9zDqqAOfgr+8S885lVnk3U0RMjK/F97k4/cMol 6626fQyYmTtCKxysgbZ4cH8S4oU46D8yglQfgbRq1FiBavk+fZj2+ROxltlvloVA9PtP uPkUBj12Vadjb8RS06xq7VGe8vbucY9oE2CzR9y5YkaAhHPo2pn4oRBUu8g5rEH5m1C5 FJAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="zMHWsay/"; 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 c15-20020a0564021f8f00b0048ecc09a43csi2688249edc.343.2023.01.17.12.05.42; Tue, 17 Jan 2023 12:06:06 -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=qcdkim header.b="zMHWsay/"; 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 S232165AbjAQT6X (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Tue, 17 Jan 2023 14:58:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbjAQTtO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Jan 2023 14:49:14 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8F497497D; Tue, 17 Jan 2023 10:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1673981206; x=1705517206; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iVEJ8ngNMnmubogwgqBceWjbGwsJF2hG5TCwZ0pb0v4=; b=zMHWsay/2eF4eSkIO16Xwuexf+5hK9BGElAD8JeDU8qUAfKUZGmIt4JY Fn8cNpyCM31IItTcP3boCxAJzjGbaNqPZl/W1lDoX7h5le+dQUFPKgWUl oVYy+n9qqu0hUf2WvY3qahNUSWh8bjqwftNfyxmflBrDtiBY+KKR0iL7t g=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 17 Jan 2023 10:46:36 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.45.79.139]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 10:46:36 -0800 Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 17 Jan 2023 10:46:36 -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>, Andrew Halaney <ahalaney@redhat.com>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Date: Tue, 17 Jan 2023 10:46:30 -0800 Message-ID: <20230117184630.2775905-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: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1755301509051745247?= X-GMAIL-MSGID: =?utf-8?q?1755301509051745247?= |
Series |
[v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
|
|
Commit Message
Bjorn Andersson
Jan. 17, 2023, 6:46 p.m. UTC
While booting the CRD, a series of CMA allocation errors can be seen in the kernel log: cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 Growing the CMA region and querying /proc/meminfo indicates that a newly booted system (currently) uses 64MB CMA. Define a memory region sufficiently large for the current use cases, to avoid forcing users to add this themselves, through command line parameters etc. While fixing the CRD define the same region for the X13s. Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> --- Changes since v1: - Updated commit message 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 17.01.2023 19:46, Bjorn Andersson wrote: > While booting the CRD, a series of CMA allocation errors can be seen in > the kernel log: > > cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 > > Growing the CMA region and querying /proc/meminfo indicates that a newly > booted system (currently) uses 64MB CMA. > > Define a memory region sufficiently large for the current use cases, to > avoid forcing users to add this themselves, through command line > parameters etc. > > While fixing the CRD define the same region for the X13s. > > Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > > Changes since v1: > - Updated commit message > > 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 4e92dc28e2ce..6f686377dc3e 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 55ecbee19a58..8d485e0000cf 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 Tue, 17 Jan 2023 10:46:30 -0800, Bjorn Andersson wrote: > While booting the CRD, a series of CMA allocation errors can be seen in > the kernel log: > > cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 > > Growing the CMA region and querying /proc/meminfo indicates that a newly > booted system (currently) uses 64MB CMA. > > [...] Applied, thanks! [1/1] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s commit: 5f84c7c35d49e6d92b720db19d421951f1ff8599 Best regards,
On Tue, Jan 17, 2023 at 10:46:30AM -0800, Bjorn Andersson wrote: > While booting the CRD, a series of CMA allocation errors can be seen in > the kernel log: > > cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 > > Growing the CMA region and querying /proc/meminfo indicates that a newly > booted system (currently) uses 64MB CMA. The NVMe driver buffers alone always take up 64 MB and in total roughly 92 MB is used on the CRD after boot here. Perhaps you're missing some driver in you config (e.g. modem or wifi?). On the X13s I even have 105 MB allocated after boot. That's why I increased the CMA region to 128 MB in my out-of-tree config, which is also what you are doing here but in the devicetree. > Define a memory region sufficiently large for the current use cases, to > avoid forcing users to add this themselves, through command line > parameters etc. > > While fixing the CRD define the same region for the X13s. > > Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- > > Changes since v1: > - Updated commit message > + > + reserved-memory { > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x0 0x8000000>; > + reusable; > + linux,cma-default; > + }; > + }; > }; Johan
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 4e92dc28e2ce..6f686377dc3e 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 55ecbee19a58..8d485e0000cf 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>;