Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp899389rwl; Fri, 7 Apr 2023 07:07:58 -0700 (PDT) X-Google-Smtp-Source: AKy350YiTfNoTiyxW2KMRVp152A+spPm6ecetgbcZgSF3CIsBLJag5cRsf8TjKRpBO9Xrt8j6Qph X-Received: by 2002:a17:903:27cf:b0:19e:73df:b0e9 with SMTP id km15-20020a17090327cf00b0019e73dfb0e9mr2595618plb.21.1680876478274; Fri, 07 Apr 2023 07:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680876478; cv=none; d=google.com; s=arc-20160816; b=Hq7gEy2uaps0fFsbdrGgTWS3kKKfP+DFYBw722qNy1wEgpGYMiWNzH+3hoUsPfD9BY 2p0Csp/7mKwOmehW2M6MJ8uoNXEivRb4nV6D4lV6POmMhDutgfPlAcSxQZJALrCEdFFk EjooRMhc4PvIwr4Wv1ph1aR9KlPcs5Ln0AbGf/aH4AmOmX7w9RP59hv8O/FxshQvG41Q qVqTeIv8ktuR9WibIoaAKQ4kWY3w6VSz99U6Y0cgCNtURV5eKJvQI3euCNi1xSRgOTfe k2eWgoI3tUSkFrhoASaY1e38t8kzf3jnOHGLaJCjh9eMlvnSDuCAr5O0g2F3quwpJIM7 RWGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=dgzja32tSZAozj9BTnV0hjMIc33oPjZpYMlOPC+EW3w=; b=j/8K05opTuCPFKQNwp+VIOjldN8SKJgEwHWJ0E4akjCgae/r2hcJcBC1NE9iZgNlGM PqZtWNtPvbfWO1s/ROB4NN7m3srgd3gQ0c/APIBu0Ue49dpImwzsUvFGHKT4/7senGc2 3HBUMzX7xDyiLf9wuT7hW7NQ8izP0sGpBHsegKnbNUx5wPZxbSWgGsgWSs6dncwTWFFq R+DFLXViMGfX0ZIM+gEYg/mz94LJ8ZSR8Zct/Fb+6peVLyqNFQvc2Qu8zNTcox2vO2Jk WurZ+y9zGVp+LEviAilBJpnWavVrTAEE2/JyZa+6RnfSlClUuLyXlbJoKtHn+yVNe8kH x1Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=h30meFpC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a635846000000b00503059b8b2fsi3637306pgm.220.2023.04.07.07.07.23; Fri, 07 Apr 2023 07:07:58 -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=h30meFpC; 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 S233479AbjDGOGx (ORCPT + 99 others); Fri, 7 Apr 2023 10:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233146AbjDGOGv (ORCPT ); Fri, 7 Apr 2023 10:06:51 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03CCE5B92; Fri, 7 Apr 2023 07:06:46 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 337DO2nN022516; Fri, 7 Apr 2023 14:06:33 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-type; s=qcppdkim1; bh=dgzja32tSZAozj9BTnV0hjMIc33oPjZpYMlOPC+EW3w=; b=h30meFpCInX4qEpoZB8pDr+iE6fa0w+SjccVj/dqNDQs7gotP7vArzLi8dqLSuDebPGh RHxuqcGiQdcaM8i2LK+8k3YwLAimSSDKLOrwDN8+09+YrMwJcwGHJtWn0dU3olTtRIKV RtQ7RGAe2migZ3xDMREutH2+C6lCjaKSQr1x16IYRVqJlgsPotmmSueAHUQzjxhJ+eJu 0IIe19VCe4WkYiD1HanZz9VdPkPIk3RucbMfq0UGiW6CAtQPc6FKcS3f8Y5J7DsA5O7w YQ88kJCFTGyzNOfslSWs/jybnBnEwBAZwXUE+sG0m3++rmMkUCW/SIpALDBmq6tZr9uY +g== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pt8t59anp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Apr 2023 14:06:33 +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 337E6WfV019689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Apr 2023 14:06:32 GMT Received: from blr-ubuntu-525.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.986.42; Fri, 7 Apr 2023 07:06:28 -0700 From: Souradeep Chowdhury To: Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Bjorn Andersson , Rob Herring CC: , , , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V2 0/3] soc: qcom: boot_stats: Add driver support for boot_stats Date: Fri, 7 Apr 2023 19:34:34 +0530 Message-ID: X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: K4HGntmr4X5Vov_0mgNBH3T664OGby-I X-Proofpoint-GUID: K4HGntmr4X5Vov_0mgNBH3T664OGby-I X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-07_08,2023-04-06_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 clxscore=1011 phishscore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 malwarescore=0 mlxscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304070129 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 etc. in the IMEM region. This information is captured in a specific format by this driver by mapping a structure to the IMEM memory region and then accessing the members of the structure to print the information. This information is useful in verifying if existing boot KPIs have regressed or not. A sample log in SM8450(waipio) device is as follows:- KPI: Pre ABL Time = 3s KPI: ABL Time = 14s KPI: Kernel MPM timestamp = 890206 The Module Power Manager(MPM) sleep counter starts ticking at the PBL stage and the timestamp generated by the sleep counter is logged by the Qualcomm proprietary bootloader(ABL) at two points-> First when it starts execution which is logged here as "Pre ABL Time" and the second when it is about to load the kernel logged as "ABL Time". Both these values are read up by the driver from IMEM region and printed as above. The current sleep counter timestamp is also logged by the driver. Changes in V2 *Implemented comments on version 1 of the patch *Changed the boot_stats driver to module_platform_driver *Dropped the DT binding for mpm sleep counter Souradeep Chowdhury (3): dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM soc: qcom: boot_stat: Add Driver Support for Boot Stats MAINTAINERS: Add the entry for boot_stats driver support .../devicetree/bindings/sram/qcom,imem.yaml | 21 +++++ MAINTAINERS | 6 ++ drivers/soc/qcom/Kconfig | 7 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/boot_stats.c | 95 ++++++++++++++++++++++ 5 files changed, 130 insertions(+) create mode 100644 drivers/soc/qcom/boot_stats.c -- 2.7.4