From patchwork Fri Apr 25 13:59:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 884882 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FC1076026 for ; Fri, 25 Apr 2025 14:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589620; cv=none; b=g/cWe50H+bTRz8xMx0VxeV745b2v4Dd9owVKobBbqCSCVbiChF6UHuOdH28m4i4fObDKRMFpQ7ykBBsRqXdkNyaeHO8wKYWer/qnNxrfp17WUP/INI71RLCjhbFoA08PMZCjXNrAl/iUFyUH5PkTcYdsUgRdsGx8VhfHKzbayD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589620; c=relaxed/simple; bh=niGpra8Jkq0c4F0+dPF9q2bhKVjcAH2yAfPH/XKp29M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Y/+jsyxohdIb7nlxyuueXhNbqEFqe5DWvmFEOJabKjmwMlgOScqUWo9InvyGdxPRq3/VLFS7kmyuTkFHqdwtQcfdkVaLoAJA6pMMOMCT3cmBFZtr5PDmtQacM7CJbTLD89IbVK0xGWUPWW07dkFGU0YFJzOeuPTsFHUVMa/iBhI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QGMB4lZI; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QGMB4lZI" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53P8TE21016172 for ; Fri, 25 Apr 2025 14:00:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=R8mXcE8GBrKkalZ3E2QfwH4IJLsCVriQeYb lZ4B4VhA=; b=QGMB4lZIv8kVafaaZ31L8xGrqVIc3yuKjdNR7PU1ZYX00rJnYZS nNg8zkVBc+cW/eeWsaGX/DWM7Ibhetj4lZXCucYsQ3YrGvCHH7nhXgZsYzoafoZb rq9i0Hl9gkOcwCUgIVoi65kshcLORX020sVeDGUnRUSmtS0n1QvOpugm1YSkkTbw vTcRC64VGx9HVQ+VqsXVaysp7o0Gvv62T3SF+g1vvWYPXFeQISO9QqK++eqWknE3 3hY3hM9qAR+dYrns312eM4avQrv1Y08zoOrBi9MZkohHEu84KBnajxm/BUSlJ8oT h/8Cd/sCa5oBoO1Z1U0UFqsoTJPRSDyK4og== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 466jh098th-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 25 Apr 2025 14:00:16 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-afd1e7f52f7so1488834a12.1 for ; Fri, 25 Apr 2025 07:00:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745589615; x=1746194415; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R8mXcE8GBrKkalZ3E2QfwH4IJLsCVriQeYblZ4B4VhA=; b=JgqUwtb37XQ4odrUuxM8BytJYPLNeQgWZplIquoRsEMiAxEo0x7w1oCN34GGsE1kmc XZAAzV5fR0t4nlYC8kvU+dXO6JB/3PC34lDPZvsUo7C4a97dgeoXqBXrj2b+knep63gm GeYczkSD7A1Wux39kgvWCTSCGRquUwRXwaHJ7ToVWGA3RHEgZbZHCJqxkzRTvLrLkUvi tSyndl75sb7fACxrZ+2q4wGMFyAoyHbWjufQncMk/Esin34L0AINmt16z2nKm5U92WQe zRhie1FemHTgEs/TeX7rSetZZVJcSJF6eaqKWym5t2NYoMcSN1FLKk/g+ieRZUjGrnO2 LePw== X-Gm-Message-State: AOJu0Yzbjo7whVxEqAqYgPuGO4jdjzCrsaDPoxiu049hACMrWsNJ6izj CIDhevKXkZuFQcnTPciFIaViCya01zSWdOzL+aeGdnWKRctAQ2l/yfLw7naEqjRlVev1HtIBiOM j16ft/uwxUURaMHQkIMHAwCVvTgFmnNrS0oMU2WlYs9YuXPI/ZsF6+3GKVigMcyRju8xgXNpa X-Gm-Gg: ASbGncsV32duFuAf5fkuaOGUUNPdo2Uv8a2+GtlVtKS1Ebibx3oaRqAL/4q283SGG6h bsGG+Uq9JCLdGWZDLJ1LKkKvryCYlgAcZdk7AoV9100vnSvl/EoHA/AxTmUDhESwC0l7Hg3aybb VS6Zs3XEm3i12i8B3vNiGTlOj1MHYOM6BU7mv284GlxZFBjWbnBIgBYG+8c4p3EQLkQPGjAH9sL DsrQh5XR6LtRmIEcZqsBeO6wD4XL/Bm3xwosVV/w48v7DOVZqdIcrKpL8GeDnIziVUGnsnXa/bX /UminXsMrac16xNw+B//0+vytuPYZCL/APVRlOY= X-Received: by 2002:a17:90b:4a46:b0:308:7a70:489a with SMTP id 98e67ed59e1d1-309f7eb2e1amr3532923a91.30.1745589613406; Fri, 25 Apr 2025 07:00:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNNIJYXro2LB2aA33RiU7904xrzr2j5MWTnNc/IjINAQLFzeh1hCAoOroDXwzC71r1iymLPw== X-Received: by 2002:a17:90b:4a46:b0:308:7a70:489a with SMTP id 98e67ed59e1d1-309f7eb2e1amr3532824a91.30.1745589612552; Fri, 25 Apr 2025 07:00:12 -0700 (PDT) Received: from hu-mojha-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-309ef03ca86sm3470432a91.3.2025.04.25.07.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Apr 2025 07:00:12 -0700 (PDT) From: Mukesh Ojha To: Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Mukesh Ojha Subject: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Date: Fri, 25 Apr 2025 19:29:44 +0530 Message-Id: <20250425135946.1087065-1-mukesh.ojha@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNDI1MDA5OSBTYWx0ZWRfXzBw1I7/aqI9c Psr7isnVTJXmwyiePVvOXeaMUGbsj7+M38Yqivt2wQLxCp3/i25OTeOnifr6sredmbxc1NBnluJ 8f9zj8d2tgdNllFglxjivuQy3SOnqoeD2LV2tDTv1oBvEQdDLcjlXeFRV7zs/3ALdTzHJXPdfeS Qo6hphkp3holtjvMoB9CtA/qECRhh+mi3nHZSTbYQBGFuo+DVN0CxdzV01BGFPt+tUYYWFNJOES TDZixft8IKCRIDcR00xEHHQLQaS7NMd0kqY7c4zY0dQSNCzoZQDb9HTe/2OInXQx+KhHafegdWz sYyzrtUFFBQ0Q9a8gGM2ObxGuitmp5nLUDt/yFKUDbnbltH0dm1psYcbUOB79jxZcIFW0dELNAi 2gYrCPLGPX117hJ3R3jDBRQiuITMRkFOczPGhDj4PNRRLmOHIEPiVlZGAMwfQtPPYTRHiFPW X-Proofpoint-GUID: 1u3zBYM_meWZdbErow55kpjIlYiiI26a X-Authority-Analysis: v=2.4 cv=ZuTtK87G c=1 sm=1 tr=0 ts=680b9570 cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=jD0WNwiO3up7LfJkFJoA:9 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-ORIG-GUID: 1u3zBYM_meWZdbErow55kpjIlYiiI26a X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-04-25_04,2025-04-24_02,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 impostorscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2504250099 Add support for socinfo version 20. Version 20 adds a new field package id and its zeroth bit contain information that can be can be used to tune temperature thresholds on devices which might be able to withstand higher temperatures. Zeroth bit value 1 means that its heat dissipation is better and more relaxed thermal scheme can be put in place and 0 means a more aggressive scheme may be needed. Signed-off-by: Mukesh Ojha --- Changes in v2: - Added debugfs entry and described more about the field in commit text. drivers/soc/qcom/socinfo.c | 5 +++++ include/linux/soc/qcom/socinfo.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 18d7f1be9093..5800ebf9ceea 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -153,6 +153,7 @@ struct socinfo_params { u32 num_func_clusters; u32 boot_cluster; u32 boot_core; + u32 raw_package_type; }; struct smem_image_version { @@ -607,6 +608,10 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, &qcom_socinfo->info.fmt); switch (qcom_socinfo->info.fmt) { + case SOCINFO_VERSION(0, 20): + qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type); + debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root, + &qcom_socinfo->info.raw_package_type); case SOCINFO_VERSION(0, 19): qcom_socinfo->info.num_func_clusters = __le32_to_cpu(info->num_func_clusters); qcom_socinfo->info.boot_cluster = __le32_to_cpu(info->boot_cluster); diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h index 608950443eee..c4dae173cc30 100644 --- a/include/linux/soc/qcom/socinfo.h +++ b/include/linux/soc/qcom/socinfo.h @@ -82,6 +82,8 @@ struct socinfo { __le32 num_func_clusters; __le32 boot_cluster; __le32 boot_core; + /* Version 20 */ + __le32 raw_package_type; }; /* Internal feature codes */ From patchwork Fri Apr 25 13:59:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 884580 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65AC9255E33 for ; Fri, 25 Apr 2025 14:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589622; cv=none; b=gwSGcFyojOYYoUUimrQsPsqVUga5tvHGB4htDDRf+QZSqmSkEai9ErqqGOXh2ZTf/o3h6nSqmaaqvxCzL16gEVRskItyWDaejVXMF8ZmCVJTBWSOISNt9B9eqcQIcbRS55eSgIFcV/uIN8kfuxcEhIguPh9jgoZ+y7yfpGYtC3E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589622; c=relaxed/simple; bh=iwm9OooUWQdoBUOf5u2EIIhp9kjTk0ngHqyqQegt/0g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dG8JqzooGxLft1lGD1D1dIl5sBPAD/nztPVJlPbOWY0YTjC35cmzRRnZo5eWxq19FZN1TcPpdKMJ2p4sjlahz8Spi5lckjlCxssTIXE7gDaESqTNYcLqNu7X9N13NuVE2CKq0C5Ld5P1/jxdupfacCra8hIDgylxhAHPST90Ooo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=DJV4SNRl; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="DJV4SNRl" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53P8TJHJ015569 for ; Fri, 25 Apr 2025 14:00:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=L56NDXjZ8mA lJ6/qvpUv5Mw3+Om9ZpLMh5fPpNpp9xM=; b=DJV4SNRlHymLA/7JOtbodkw+sbh rfHN2poVg/ulTyjYpj3l5rNG0YEvNPmiP6ZGbMkPaY5uCOD+VhZvz5u4bOYSmgyR r7GfBQ0ZIqHpmOVTSiVVtiN39LTRjgLYMlH6nkDBJtUsSQtU39n7d4GuV3/LXiIo nYwPPLvXZAr3C9WBZyDMfqBs5Mv8T6p4+hEDqxjs1eduf1vx7SKg20Yp7AffY+tH 5fEF3nPIVCwQvKf0ybqhtD3EQQOGFZbfHskXkXLRXL+IfCEopG/mgR48AeoyeDX7 SEkHm3pc4B6YxSvdNtj7+LYd1ru/HxzYbFIDxX4iPCTVVSDLh/ShjaoYnVw== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 466jh3h5cj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 25 Apr 2025 14:00:20 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-30872785c3cso3593685a91.1 for ; Fri, 25 Apr 2025 07:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745589620; x=1746194420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L56NDXjZ8mAlJ6/qvpUv5Mw3+Om9ZpLMh5fPpNpp9xM=; b=GbbWL8VKgtTxfrtLk/VqUSXf4eDHrD1LFmrYPiJPxxkGgT6TMWCW2wxSM0yhqbdQwV m5ip4IMaZ3a+ySorShi8T9/fQdGPzzsxlgXqnRN/JdOkNuorXsSMPA99RQty0viaILbG nPbofHHoUBO3gvTeNULNFMrCTcuJT3ZABtTil6IDSBvN6QwVT2oTFtxeLkW6/WdwqU9w fYyz0vB0D7lcapEz5JeeMC9YTSISzzDwfSHYlWvRIaZS0X0rinjPxxArD4bHYteCPa4X 1yd0O4vF+iwT5SZpvrWsshdMDuIy2gOGgUXfv3uyzBE4ZlCVNwQGXJBL4DsAloVsgUKF 5saQ== X-Gm-Message-State: AOJu0YzaKmgeo+WG/uM/kvnUcf7/0a9i0N/SXWsjguSgJG3CpEUZNGFB syuz4wR43+m4Z8y4/AqptHXy2ysYaxV3rofywGBLgJsXwXIv5xYwF2vZtWytg5D9YMbCyxOGTgM DDy8PVg+yrzQuCw5DtxWiqLgiQwf4kNtM58bfh9nc/rmsztUB7QN2bZoPrIev9sBP X-Gm-Gg: ASbGnctAHdakMVBVduc5C0UT5cFC+QtPZusxTxKgyDM9aBTm1G+Zsv1AyyS3bflfkXS ckCC269YS0AsDEw5jcElB1p7XvI3KjdpLr6VqxyRa7b0f79Rd+r2SB5N/WEl83WvCsnPIJfPUmn VXa4XuwfA5KO8kZxO1UNaKpivTRfW2cg3DZrdi1vOP23IdOVSraqzGEt3P6lz0QDbXRLULvd2Re qW+GSQNl1K0w0jjzlZcXBDSoaMkn54SXPeEpnvH9cTeaXmsD6p4+sD44v2F4Gn2LrkOo1+ZFND0 ADo3Z37oJW4JpuzhjysRQMFIhBqgCDx0qT1VnGI= X-Received: by 2002:a17:90b:2741:b0:2ee:c91a:acf7 with SMTP id 98e67ed59e1d1-309f7da6d24mr3888289a91.4.1745589619327; Fri, 25 Apr 2025 07:00:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFCSNNtmOBy+P5uUCdKDMn9Fo4idNZgKB+hc+w6SvdLeW3ph4TVq5Qbg8kdN818kgFjZdmfA== X-Received: by 2002:a17:90b:2741:b0:2ee:c91a:acf7 with SMTP id 98e67ed59e1d1-309f7da6d24mr3888205a91.4.1745589618573; Fri, 25 Apr 2025 07:00:18 -0700 (PDT) Received: from hu-mojha-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-309ef03ca86sm3470432a91.3.2025.04.25.07.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Apr 2025 07:00:18 -0700 (PDT) From: Mukesh Ojha To: Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Mukesh Ojha Subject: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Date: Fri, 25 Apr 2025 19:29:45 +0530 Message-Id: <20250425135946.1087065-2-mukesh.ojha@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250425135946.1087065-1-mukesh.ojha@oss.qualcomm.com> References: <20250425135946.1087065-1-mukesh.ojha@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ruGIfrqb7FlnTmipSVrTeIGLqnCiJFX2 X-Proofpoint-GUID: ruGIfrqb7FlnTmipSVrTeIGLqnCiJFX2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNDI1MDA5OSBTYWx0ZWRfXw/UADScXzEWW IQlXyKNddFG2Y6fpEkb3EDigL+JjoY07SmNYVkd4gvmAMsOID07r6soHUJLjxAdi/haAoU9ZoEG e4B6lY2g1lpRxjB3YgDqrjb8CqwxOatllR07DE3QfuVxNcqriRxgU98s7Agxy4wsqugFE31YyIY Whc3wU9miYmT3bXXwYN3hLSdwn/i8w6g3EUIaSHLxE7cY8w0F41P8wFTArJ6CT7BU3BRgK4bfQ9 HagZ7G4TrXdaL2DGpYKXELqY3Wol1gtfX6MKfj8K0IOAAQXOis1+8s+2wuU3k1HP+PWhv29zBOX 482ZNOVTXl06B/SAUmt2rUqE687zLFvAafj8QNdvALx5p1aOoWm3SDkLg7lstw+SMjAlld2yyj8 R97OjkqykiY/GspGLUvbc8H96Afr7e9GGrstGGPhspVB+TeoWua4/mrxFHZaXcBHs2YO9Pw9 X-Authority-Analysis: v=2.4 cv=Mepsu4/f c=1 sm=1 tr=0 ts=680b9574 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=KzwQcsJEF2YzTSYNgzkA:9 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-04-25_04,2025-04-24_02,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 impostorscore=0 clxscore=1015 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2504250099 Add the subpartfeature offset field to the socinfo structure which came for version 21 of socinfo structure. Subpart_feat_offset is subpart like camera, display, etc., and its internal feature available on a bin. Signed-off-by: Mukesh Ojha --- Changes in v2: - Added debugfs entry and described more about the field in commit. drivers/soc/qcom/socinfo.c | 6 ++++++ include/linux/soc/qcom/socinfo.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 5800ebf9ceea..bac1485f1b27 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -154,6 +154,7 @@ struct socinfo_params { u32 boot_cluster; u32 boot_core; u32 raw_package_type; + u32 nsubpart_feat_array_offset; }; struct smem_image_version { @@ -608,6 +609,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, &qcom_socinfo->info.fmt); switch (qcom_socinfo->info.fmt) { + case SOCINFO_VERSION(0, 21): + qcom_socinfo->info.nsubpart_feat_array_offset = + __le32_to_cpu(info->nsubpart_feat_array_offset); + debugfs_create_u32("nsubpart_feat_array_offset", 0444, qcom_socinfo->dbg_root, + &qcom_socinfo->info.nsubpart_feat_array_offset); case SOCINFO_VERSION(0, 20): qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type); debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root, diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h index c4dae173cc30..3666870b7988 100644 --- a/include/linux/soc/qcom/socinfo.h +++ b/include/linux/soc/qcom/socinfo.h @@ -84,6 +84,8 @@ struct socinfo { __le32 boot_core; /* Version 20 */ __le32 raw_package_type; + /* Version 21 */ + __le32 nsubpart_feat_array_offset; }; /* Internal feature codes */ From patchwork Fri Apr 25 13:59:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 884881 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47CC7256C64 for ; Fri, 25 Apr 2025 14:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589625; cv=none; b=ESJWpXibYmv+ZgqJEMHG7SQzux97KZVqI4wkatAWMnuaIAEsKWK1F9yUuLb3YzwYMfC+IFYY8C/NwZ/1AJ1lECEzOnHNUSPSh1uGiHTqzFn+6sDYik3CJF1H3/Zv5/Y8bittVisml+n7PV3sOb6BAtst66cYKZGvhaUM+6JgFz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745589625; c=relaxed/simple; bh=5MFwbZndW/3CCDlkJDKALnMkGV0Rc4IC08W7tOBbf4g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WDpnZvDJpJiy8EXYyIEq2/c1OSbOr3ncGZh5KhiM9FKQrQVJl8Q9kkBRwcTHRrYst3ljD/RzrXsMvu5bncZ8tdu4k52ukXQCIckVSQruiX7qz3F4d/EfYNrpwjK97fho77v2+0vcKsXzpI1PWf2rW3qCWGyMK+8hYuqwmoVdaFY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=d6YH9B08; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="d6YH9B08" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53P8TASR023873 for ; Fri, 25 Apr 2025 14:00:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=lZ7Ppv9foYm 9vXF3GOtDCITIngSjuhVT5D3uFuR78Nw=; b=d6YH9B08uGbJAZY5ErT+GFZDiCS Lst9F6QybF47xE8UjZPSQdjK4SygcOrleqRyaL/zt5AUMvpsI9qkyoxWa5/Ntuvw XBmAKrEhaBrr6duHrdkCTQP+CRmLvNrnpbyJb9UAhVIDI7MvywWOPthQVWLMUWDm RSPZquuTXz3B1cauEIuOLz+6K3ZJ4JjAKXE/HEKsK2n0Q3qaqhj1HZ/88de3dnYH OZKn7T2qpvffX4kzL23omCbyJXGFYs3X8IpvePlozI0HUdHxUcRIASx5vdqWxBKH B4bM4nFXSI4CrYmCIt+e1oopkcyZWpdP9oHMZBnJcVGXtdpPoytI29ueeZg== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 466jh1s842-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 25 Apr 2025 14:00:23 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2ff581215f7so1843809a91.3 for ; Fri, 25 Apr 2025 07:00:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745589623; x=1746194423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lZ7Ppv9foYm9vXF3GOtDCITIngSjuhVT5D3uFuR78Nw=; b=HeCt6NtCJwF/7jJFTMZXIRpqbZ/bbbkEK04W++J28CA3z89q4JOTMRCSfoKpyLJ1nT v9+fy3jgLi/zdy8rlct5mYevkVjjcdlenp2qGtdcb9IEPR2/irx0gdDuqBnGYDDFn3Yz VE5knr24FFlApe39t0F+6JuN8Y9rO6rGSkvbzyzx6D0kdgKam7E5xwYyJkVPj2v3y4+n Jd0P9lOG/qvHF5mydzX2JvddbE2kAB9b9D3j+/AVOw3ClMLepaae+U+F2sp3GA+8BahT 10xRHCXi8ObkIJKBpPAiQWHtuZcHWy0VeBw962zCBHgQh1mR8a6WfDQvUgRHMiRrl8gA /FIQ== X-Gm-Message-State: AOJu0YzOKtoJuz1ZnHSaGKhr0mxIYJP06pX0azRMEk4Ehfmbfs6Qhyd6 Gbu+faDdkixXKz5V+rryWhB921itt5XtHc99Er40J5ePUQHpdn+H1VcbyIXSSaYnT6awZ0C/5ZV G5q8/+X/UGatkb0gau9kArHUeVwvGjkEZ4HwxAmI/SfpgaS0IqflLTp24k3XpZ373 X-Gm-Gg: ASbGncsUTPB6i8fpFoea30EMS0ekO5iMSmgl4PQa02jCTDEOb8wv3WRdgyJcngJ4XgI xLfB2cJAzeViFBDtIhdlfEKVJvtc/ti4Swvgp/hFtrkdVOFApDZa3yKcaCi0RgvIUY5vVEjHdSe YYuNK/ALIn+0DH+tJ+a5EbQZcMSnVxT67uMQu65G4YaITgJIvRYqOlG3RuP4jDzZkCm90PgfhXr qQ8k4pjz/oDKq+ukSk8dqMTZ13BoIp19Z/I/z+ZiPXR+i0o3taLHSQtyrktTraJNCsQxEoCHa+4 O52p+YP7tQ/qMRk2Sy9axQPxJhJ9/+rkSWMdhvY= X-Received: by 2002:a17:90b:55c5:b0:2ee:ee5e:42fb with SMTP id 98e67ed59e1d1-309f7da69abmr4185402a91.13.1745589622388; Fri, 25 Apr 2025 07:00:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJdjsH5eGSWRC5CHHXI8KUgu9tmYVHFcrW/ZP2Qz/WipHz/oCCqZtGhc5G5NEObNdIm+8QZg== X-Received: by 2002:a17:90b:55c5:b0:2ee:ee5e:42fb with SMTP id 98e67ed59e1d1-309f7da69abmr4185324a91.13.1745589621668; Fri, 25 Apr 2025 07:00:21 -0700 (PDT) Received: from hu-mojha-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-309ef03ca86sm3470432a91.3.2025.04.25.07.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Apr 2025 07:00:21 -0700 (PDT) From: Mukesh Ojha To: Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Mukesh Ojha Subject: [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Date: Fri, 25 Apr 2025 19:29:46 +0530 Message-Id: <20250425135946.1087065-3-mukesh.ojha@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250425135946.1087065-1-mukesh.ojha@oss.qualcomm.com> References: <20250425135946.1087065-1-mukesh.ojha@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: YCwwNOfyprbWRNPIjDuGQYcLCUqUmNPv X-Proofpoint-ORIG-GUID: YCwwNOfyprbWRNPIjDuGQYcLCUqUmNPv X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNDI1MDA5OSBTYWx0ZWRfX6Z/KYZ/TSjB+ fXx3ImDYkz0WyvYs46SfNSBciNgNjElLZNm35rr5IdLL8qfiSeLDtn/Ge0zpOfb+Tawovz431q6 EMmF2UaUZt1xUA+gyYfPakZ7Q9/4Uh7ERjjLKzfTRk9UfSSs+sCZXE82XHJg3h5a9QjgGXtUXO0 NSeUxq0if7hFkKCOyhfJHOQHSVPavT9sEVAhmmmUSqxGtmh/2uNtK+iMs2MpQf8tjY0YYyJV0s+ n04pd+xlkGQCSGAO8DPDlyihEZEYtZK4ZOmS/m66U1N1hlHVWsFBYY7gZSdMWO/6MCxACelQc1a G0xbDOu5VHihXTNOADOefnjs2G/qdtTptj7dE/DmUFcSbtGX2f9NNAbPXOOQJ2Ua9N0rvGMbuaB IdtQOmG9ujAFRhl8xM06a+kSoGVuKDa2XWBxvOzAaBKaLujXC2s9WmdDjPYO0QmOXUgW5ks4 X-Authority-Analysis: v=2.4 cv=ZpjtK87G c=1 sm=1 tr=0 ts=680b9577 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=KzwQcsJEF2YzTSYNgzkA:9 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-04-25_04,2025-04-24_02,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 clxscore=1015 bulkscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 mlxscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2504250099 Add the ncluster_cores_array_offset field with socinfo structure revision 22 which specifies no of cores present in each cluster. Signed-off-by: Mukesh Ojha --- Changes in v2: - Added debugfs entry. drivers/soc/qcom/socinfo.c | 6 ++++++ include/linux/soc/qcom/socinfo.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index bac1485f1b27..13cf73744bd9 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -155,6 +155,7 @@ struct socinfo_params { u32 boot_core; u32 raw_package_type; u32 nsubpart_feat_array_offset; + u32 ncluster_cores_array_offset; }; struct smem_image_version { @@ -609,6 +610,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, &qcom_socinfo->info.fmt); switch (qcom_socinfo->info.fmt) { + case SOCINFO_VERSION(0, 22): + qcom_socinfo->info.ncluster_cores_array_offset = + __le32_to_cpu(info->ncluster_cores_array_offset); + debugfs_create_u32("ncluster_cores_array_offset", 0444, qcom_socinfo->dbg_root, + &qcom_socinfo->info.ncluster_cores_array_offset); case SOCINFO_VERSION(0, 21): qcom_socinfo->info.nsubpart_feat_array_offset = __le32_to_cpu(info->nsubpart_feat_array_offset); diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h index 3666870b7988..0c12090311aa 100644 --- a/include/linux/soc/qcom/socinfo.h +++ b/include/linux/soc/qcom/socinfo.h @@ -86,6 +86,8 @@ struct socinfo { __le32 raw_package_type; /* Version 21 */ __le32 nsubpart_feat_array_offset; + /* Version 22 */ + __le32 ncluster_cores_array_offset; }; /* Internal feature codes */