Message ID | b3105990e021a71039f621e6c4e70ab05fb348fa.1688533340.git.quic_schowdhu@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1650192vqx; Tue, 4 Jul 2023 22:50:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Kl1rtHkRWzApXcSsfq3JvR8xjlnh0OGXNF2kfQ+dI/e5XtqJVsddgJPqkk+DuQTuxcN/2 X-Received: by 2002:a05:6870:75ca:b0:1aa:30e3:6a5e with SMTP id de10-20020a05687075ca00b001aa30e36a5emr18826815oab.22.1688536218272; Tue, 04 Jul 2023 22:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688536218; cv=none; d=google.com; s=arc-20160816; b=WAnuSsrlpR6tAjKBuPT5hxteT37XEkiRPin0ccdqWef142jQ5yS90FfR7nIQGa5/5N ilaDgGzPzRTkYOseEIqnasxBpZqszJhW6TVj2QHZTwasjWWhtl9P+OUSJw+n4vBYIYSO PA9HGfQjPjicapPMju+fMj87atNj7xfMM2gh87RiI5hRlGfZD1q/3A9grxGgu9D779SA 5luAjTeSkonrY81jlrlJnBzLaQ6OnbY4nXSHJuAjpAZYuZ+EdVANHYP8NdjbxTIGaSCu RLc71L6qLr9OgT1cXl0LeqJ46SdivbFVBulZN3lSseb3ldshkz/TzgLtZ+v1ipR0tfL9 1g/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pylOfRWfH248mlqc1U0JPUDCsmfMI/NoUbc91IZ6M8Y=; fh=jC45Mg5WXDXLXBnv56DxbXtmLsAdfnrQ890ArfI/DI0=; b=vIJzJF+7721TaWZl//tv5reCGIVQG2GfpKreOv44j2YajTxeJK04qOLwUhK3Ch4TWf GVRgbEw2pm023UQSoQunHheT9STZiMUWcCmVQKtReKaslrUWdFNhroKQw8AUfa3zKARE UIpcbCq/JeI235sHYSwVpXBp63Riw6B6vl69zQBVts98Aqai/Nqgctc+fWZs77V4leT0 Mqj9EHM6WR57HuQ0UbDzqRzr6ipWhGXss1Z3okyfr33oYfcFuQvEeevj3aEZpLimVjuZ 5bGsa8UKtIQDXW2KWLgJ9Y1CoEfdK9561KANG9CmTFiINjxi2Qnr2gk9oG4Q7BfOr5cP V+ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dfPagyoK; 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 nu4-20020a17090b1b0400b0025669d0176asi1046203pjb.134.2023.07.04.22.50.01; Tue, 04 Jul 2023 22:50:18 -0700 (PDT) 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=dfPagyoK; 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 S231331AbjGEFdZ (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 01:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjGEFdX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 01:33:23 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10361E3; Tue, 4 Jul 2023 22:33:21 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3655AJrW022700; Wed, 5 Jul 2023 05:33:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=pylOfRWfH248mlqc1U0JPUDCsmfMI/NoUbc91IZ6M8Y=; b=dfPagyoKkQVdsIGmniW/sTWEaSQB8WVp+R8oqpFcH7EuGjgR8aryqEwJTdlI4bPMhhPL hefkbLDkzj1aC0rdnMCkHTkvBrxB0i4KXrzlKaULNbDBekOvmvZZQ+mzJXvYMhTvk+8h FHPwz6MTvXwiAKgkwszfnFTx90/TNWU8dj+Nqf6TB369zlA+QCYM2CFsGOiJVARcf7JG Z8zMch47j/KHUrlsEkIRp2IiICajNfp98OhvgodrRepo8bGtu2BKXbBszW345vcBBxCv m5Q948zy9/a3zy35YrwccsFbzWQ/nObfyRh6awiqOTosOx2JqJgeG5snkgWWaPd5q1mv QQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rm8v9jxrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jul 2023 05:33:06 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3655X52h013701 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 5 Jul 2023 05:33:05 GMT Received: from hu-schowdhu-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.7; Tue, 4 Jul 2023 22:33:01 -0700 From: Souradeep Chowdhury <quic_schowdhu@quicinc.com> To: Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Rob Herring <robh+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>, Sibi Sankar <quic_sibis@quicinc.com>, Rajendra Nayak <quic_rjendra@quicinc.com>, Souradeep Chowdhury <quic_schowdhu@quicinc.com> Subject: [PATCH V7 1/2] dt-bindings: firmware: bootstats: Add the dtschema Date: Wed, 5 Jul 2023 11:02:31 +0530 Message-ID: <b3105990e021a71039f621e6c4e70ab05fb348fa.1688533340.git.quic_schowdhu@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <cover.1688533340.git.quic_schowdhu@quicinc.com> References: <cover.1688533340.git.quic_schowdhu@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: md7FFK7CBCdVAN8pRFrjBIamFuZUnvbN X-Proofpoint-GUID: md7FFK7CBCdVAN8pRFrjBIamFuZUnvbN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-04_16,2023-07-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 mlxlogscore=794 bulkscore=0 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307050050 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1770558553523221162?= X-GMAIL-MSGID: =?utf-8?q?1770558553523221162?= |
Series |
firmware: Add support for boot_stats
|
|
Commit Message
Souradeep Chowdhury
July 5, 2023, 5:32 a.m. UTC
Add the device tree bindings for boot stats. This has 2 properties
pre-abl-time and abl-time which records the timestamps for boot
stats.
Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Link: https://lore.kernel.org/linux-arm-kernel/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/
---
.../bindings/firmware/qcom,bootstats.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml
Comments
On 05/07/2023 07:32, Souradeep Chowdhury wrote: > Add the device tree bindings for boot stats. This has 2 properties > pre-abl-time and abl-time which records the timestamps for boot > stats. > > Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com> > Link: https://lore.kernel.org/linux-arm-kernel/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/ > --- > .../bindings/firmware/qcom,bootstats.yaml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml > > diff --git a/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml > new file mode 100644 > index 000000000000..22e697524058 > --- /dev/null > +++ b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml > @@ -0,0 +1,38 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/firmware/qcom,bootstats.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Boot Stats This explains nothing... > + > +maintainers: > + - Souradeep Chowdhury <quic_schowdhu@quicinc.com> > + > +description: | Drop | > + Qualcomm's proprietary Android boot-loaders capture boot time Wrong indentation. > + stats, like the time when the bootloader started execution and > + at what point the bootloader handed over control to the kernel. > + This is captured in the unit of ms in devicetree property. > + > +properties: > + pre-abl-time: > + description: The property to store the starting point of abl in ms. String instead of ms? No, this is the craziest idea I saw recently. Use -ms suffix. > + $ref: /schemas/types.yaml#/definitions/string-array > + > + abl-time: > + description: The property to store the duration of abl in ms. > + $ref: /schemas/types.yaml#/definitions/string-array I have no clue what this entire binding is about. Nothing can bind to it, no usage explained. Properties are not used to "store the duration". This does not look like suitable for DT, drop entire binding. > + > +required: > + - pre-abl-time > + - abl-time > + > +additionalProperties: false > + > +examples: > + - | > + bootstats { > + pre-abl-time="17627"; > + abl-time="26748"; Missing spaces. Open existing DTS and look at existing coding style. Best regards, Krzysztof
On 7/5/2023 11:47 AM, Krzysztof Kozlowski wrote: > On 05/07/2023 07:32, Souradeep Chowdhury wrote: >> Add the device tree bindings for boot stats. This has 2 properties >> pre-abl-time and abl-time which records the timestamps for boot >> stats. >> >> Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com> >> Link: https://lore.kernel.org/linux-arm-kernel/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/ >> --- >> .../bindings/firmware/qcom,bootstats.yaml | 38 +++++++++++++++++++ >> 1 file changed, 38 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml >> >> diff --git a/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml >> new file mode 100644 >> index 000000000000..22e697524058 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml >> @@ -0,0 +1,38 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/firmware/qcom,bootstats.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Boot Stats > > This explains nothing... Ack > >> + >> +maintainers: >> + - Souradeep Chowdhury <quic_schowdhu@quicinc.com> >> + >> +description: | > > Drop | Ack > >> + Qualcomm's proprietary Android boot-loaders capture boot time > > Wrong indentation. Ack > >> + stats, like the time when the bootloader started execution and >> + at what point the bootloader handed over control to the kernel. >> + This is captured in the unit of ms in devicetree property. >> + >> +properties: >> + pre-abl-time: >> + description: The property to store the starting point of abl in ms. > > String instead of ms? No, this is the craziest idea I saw recently. Use > -ms suffix. > >> + $ref: /schemas/types.yaml#/definitions/string-array >> + >> + abl-time: >> + description: The property to store the duration of abl in ms. >> + $ref: /schemas/types.yaml#/definitions/string-array > > I have no clue what this entire binding is about. Nothing can bind to > it, no usage explained. Properties are not used to "store the duration". > This does not look like suitable for DT, drop entire binding. This binding was created as per the suggestion on version 6 of the patch by Arnd. The idea was that these 2 devicetree properties will be used to populate the bootstat values from the bootloader and exposed to the user via /sys/firmware/devicetree/ directly. Details in the link below:- https://lore.kernel.org/lkml/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/T/#mbdc9ad95fcbb5ad7b56c6996a3933899b42d982c Can you suggest any alternative way to represent this as a binding? > >> + >> +required: >> + - pre-abl-time >> + - abl-time >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + bootstats { >> + pre-abl-time="17627"; >> + abl-time="26748"; > > Missing spaces. Open existing DTS and look at existing coding style. Ack > > Best regards, > Krzysztof >
On 05/07/2023 10:33, Souradeep Chowdhury wrote: >>> + $ref: /schemas/types.yaml#/definitions/string-array >>> + >>> + abl-time: >>> + description: The property to store the duration of abl in ms. >>> + $ref: /schemas/types.yaml#/definitions/string-array >> >> I have no clue what this entire binding is about. Nothing can bind to >> it, no usage explained. Properties are not used to "store the duration". >> This does not look like suitable for DT, drop entire binding. > > This binding was created as per the suggestion on version 6 of the patch > by Arnd. The idea was that these 2 devicetree properties will be used to > populate the bootstat values from the bootloader and exposed to the user > via /sys/firmware/devicetree/ directly. > > Details in the link below:- > > https://lore.kernel.org/lkml/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/T/#mbdc9ad95fcbb5ad7b56c6996a3933899b42d982c > > Can you suggest any alternative way to represent this as a binding? Then you should clearly state in the binding how this is going to be used and who is going to populate it. Not only in the binding but also in commit msg which currently has 0 rationale and answers to "why". Your commit msg explained only "what", which is usually obvious and much less important. Your commit should stand on its own and should clearly explain why we need this feature at all, what problem it solves. And before you claim that there is some discussion under link or some cover letter - these do not matter. Commit and bindings matter. What's more, I don't think that Arnd's advice is correct here - DT is suppose to describe hardware or firmware. These properties are coming from firmware but they are not describing any firmware or hardware characteristics. Instead they are debugging of current boot status. I will leave the decision on that for Rob, however anyway binding is very vague and incorrect, so I would expect he will come with the same concerns regardless whether it is suitable to DT or is not. Best regards, Krzysztof
On Wed, Jul 05, 2023 at 11:34:35AM +0200, Krzysztof Kozlowski wrote: > On 05/07/2023 10:33, Souradeep Chowdhury wrote: > >>> + $ref: /schemas/types.yaml#/definitions/string-array > >>> + > >>> + abl-time: > >>> + description: The property to store the duration of abl in ms. > >>> + $ref: /schemas/types.yaml#/definitions/string-array > >> > >> I have no clue what this entire binding is about. Nothing can bind to > >> it, no usage explained. Properties are not used to "store the duration". > >> This does not look like suitable for DT, drop entire binding. > > > > This binding was created as per the suggestion on version 6 of the patch > > by Arnd. The idea was that these 2 devicetree properties will be used to > > populate the bootstat values from the bootloader and exposed to the user > > via /sys/firmware/devicetree/ directly. > > > > Details in the link below:- > > > > https://lore.kernel.org/lkml/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/T/#mbdc9ad95fcbb5ad7b56c6996a3933899b42d982c > > > > Can you suggest any alternative way to represent this as a binding? > > Then you should clearly state in the binding how this is going to be > used and who is going to populate it. Not only in the binding but also > in commit msg which currently has 0 rationale and answers to "why". Your > commit msg explained only "what", which is usually obvious and much less > important. Your commit should stand on its own and should clearly > explain why we need this feature at all, what problem it solves. > > And before you claim that there is some discussion under link or some > cover letter - these do not matter. Commit and bindings matter. > > What's more, I don't think that Arnd's advice is correct here - DT is > suppose to describe hardware or firmware. These properties are coming > from firmware but they are not describing any firmware or hardware > characteristics. Instead they are debugging of current boot status. > > I will leave the decision on that for Rob, however anyway binding is > very vague and incorrect, so I would expect he will come with the same > concerns regardless whether it is suitable to DT or is not. My main concern here is not so much having this info in DT, but whether it's just the start of various properties. Either because there's already more data and these are just the 2 things you care about now, or because once we enable this it's an invitation to add more properties. Boot timing information seems like something multiple platforms might want and only having 2 stages isn't extensible. Rob
On 05/07/2023 22:30, Rob Herring wrote: > On Wed, Jul 05, 2023 at 11:34:35AM +0200, Krzysztof Kozlowski wrote: >> On 05/07/2023 10:33, Souradeep Chowdhury wrote: >>>>> + $ref: /schemas/types.yaml#/definitions/string-array >>>>> + >>>>> + abl-time: >>>>> + description: The property to store the duration of abl in ms. >>>>> + $ref: /schemas/types.yaml#/definitions/string-array >>>> >>>> I have no clue what this entire binding is about. Nothing can bind to >>>> it, no usage explained. Properties are not used to "store the duration". >>>> This does not look like suitable for DT, drop entire binding. >>> >>> This binding was created as per the suggestion on version 6 of the patch >>> by Arnd. The idea was that these 2 devicetree properties will be used to >>> populate the bootstat values from the bootloader and exposed to the user >>> via /sys/firmware/devicetree/ directly. >>> >>> Details in the link below:- >>> >>> https://lore.kernel.org/lkml/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/T/#mbdc9ad95fcbb5ad7b56c6996a3933899b42d982c >>> >>> Can you suggest any alternative way to represent this as a binding? >> >> Then you should clearly state in the binding how this is going to be >> used and who is going to populate it. Not only in the binding but also >> in commit msg which currently has 0 rationale and answers to "why". Your >> commit msg explained only "what", which is usually obvious and much less >> important. Your commit should stand on its own and should clearly >> explain why we need this feature at all, what problem it solves. >> >> And before you claim that there is some discussion under link or some >> cover letter - these do not matter. Commit and bindings matter. >> >> What's more, I don't think that Arnd's advice is correct here - DT is >> suppose to describe hardware or firmware. These properties are coming >> from firmware but they are not describing any firmware or hardware >> characteristics. Instead they are debugging of current boot status. >> >> I will leave the decision on that for Rob, however anyway binding is >> very vague and incorrect, so I would expect he will come with the same >> concerns regardless whether it is suitable to DT or is not. > > My main concern here is not so much having this info in DT, but whether > it's just the start of various properties. Either because there's already > more data and these are just the 2 things you care about now, or because > once we enable this it's an invitation to add more properties. > > Boot timing information seems like something multiple platforms might > want and only having 2 stages isn't extensible. I preferred the previous implementation idea, where the Linux driver will parse firmware data, instead of bootloader doing something for us. Not to mention that that approach would allow us to get boot time stats on older platforms, without waiting (indefinitely) for the platform vendor to update the bootloader. > > Rob
On 7/6/2023 2:44 AM, Dmitry Baryshkov wrote: > On 05/07/2023 22:30, Rob Herring wrote: >> On Wed, Jul 05, 2023 at 11:34:35AM +0200, Krzysztof Kozlowski wrote: >>> On 05/07/2023 10:33, Souradeep Chowdhury wrote: >>>>>> + $ref: /schemas/types.yaml#/definitions/string-array >>>>>> + >>>>>> + abl-time: >>>>>> + description: The property to store the duration of abl in ms. >>>>>> + $ref: /schemas/types.yaml#/definitions/string-array >>>>> >>>>> I have no clue what this entire binding is about. Nothing can bind to >>>>> it, no usage explained. Properties are not used to "store the >>>>> duration". >>>>> This does not look like suitable for DT, drop entire binding. >>>> >>>> This binding was created as per the suggestion on version 6 of the >>>> patch >>>> by Arnd. The idea was that these 2 devicetree properties will be >>>> used to >>>> populate the bootstat values from the bootloader and exposed to the >>>> user >>>> via /sys/firmware/devicetree/ directly. >>>> >>>> Details in the link below:- >>>> >>>> https://lore.kernel.org/lkml/7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com/T/#mbdc9ad95fcbb5ad7b56c6996a3933899b42d982c >>>> >>>> Can you suggest any alternative way to represent this as a binding? >>> >>> Then you should clearly state in the binding how this is going to be >>> used and who is going to populate it. Not only in the binding but also >>> in commit msg which currently has 0 rationale and answers to "why". Your >>> commit msg explained only "what", which is usually obvious and much less >>> important. Your commit should stand on its own and should clearly >>> explain why we need this feature at all, what problem it solves. >>> >>> And before you claim that there is some discussion under link or some >>> cover letter - these do not matter. Commit and bindings matter. >>> >>> What's more, I don't think that Arnd's advice is correct here - DT is >>> suppose to describe hardware or firmware. These properties are coming >>> from firmware but they are not describing any firmware or hardware >>> characteristics. Instead they are debugging of current boot status. >>> >>> I will leave the decision on that for Rob, however anyway binding is >>> very vague and incorrect, so I would expect he will come with the same >>> concerns regardless whether it is suitable to DT or is not. >> >> My main concern here is not so much having this info in DT, but whether >> it's just the start of various properties. Either because there's already >> more data and these are just the 2 things you care about now, or because >> once we enable this it's an invitation to add more properties. >> >> Boot timing information seems like something multiple platforms might >> want and only having 2 stages isn't extensible. > > I preferred the previous implementation idea, where the Linux driver > will parse firmware data, instead of bootloader doing something for us. > > Not to mention that that approach would allow us to get boot time stats > on older platforms, without waiting (indefinitely) for the platform > vendor to update the bootloader. > >> >> Rob Hi Rob/Krzysztof/Arnd, We will work on describing the bindings better but can you first give us clarity on whether this is something that should be represented on the devicetree and what should be the final approach we need to take for boot_stats? Thanks, Souradeep >
diff --git a/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml new file mode 100644 index 000000000000..22e697524058 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/qcom,bootstats.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/qcom,bootstats.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Boot Stats + +maintainers: + - Souradeep Chowdhury <quic_schowdhu@quicinc.com> + +description: | + Qualcomm's proprietary Android boot-loaders capture boot time + stats, like the time when the bootloader started execution and + at what point the bootloader handed over control to the kernel. + This is captured in the unit of ms in devicetree property. + +properties: + pre-abl-time: + description: The property to store the starting point of abl in ms. + $ref: /schemas/types.yaml#/definitions/string-array + + abl-time: + description: The property to store the duration of abl in ms. + $ref: /schemas/types.yaml#/definitions/string-array + +required: + - pre-abl-time + - abl-time + +additionalProperties: false + +examples: + - | + bootstats { + pre-abl-time="17627"; + abl-time="26748"; + };