Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
@ 2025-04-25 13:59 Mukesh Ojha
  2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Mukesh Ojha @ 2025-04-25 13:59 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Mukesh Ojha

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 <mukesh.ojha@oss.qualcomm.com>
---
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 */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
@ 2025-04-25 13:59 ` Mukesh Ojha
  2025-04-25 17:28   ` Dmitry Baryshkov
  2025-04-25 13:59 ` [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Mukesh Ojha
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Mukesh Ojha @ 2025-04-25 13:59 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Mukesh Ojha

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 <mukesh.ojha@oss.qualcomm.com>
---
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 */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
  2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
@ 2025-04-25 13:59 ` Mukesh Ojha
  2025-04-25 17:29   ` Dmitry Baryshkov
  2025-04-25 17:29 ` [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Dmitry Baryshkov
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Mukesh Ojha @ 2025-04-25 13:59 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Mukesh Ojha

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 <mukesh.ojha@oss.qualcomm.com>
---
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 */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
@ 2025-04-25 17:28   ` Dmitry Baryshkov
  2025-05-08 15:37     ` Mukesh Ojha
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-04-25 17:28 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
> 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 <mukesh.ojha@oss.qualcomm.com>
> ---
> 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);

An offset into what? If this provides additional data, then the data
should be visible in the debugfs. Not sure, what's the point in dumping
the offset here.

>  	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 */
> -- 
> 2.34.1
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22
  2025-04-25 13:59 ` [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Mukesh Ojha
@ 2025-04-25 17:29   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-04-25 17:29 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Fri, Apr 25, 2025 at 07:29:46PM +0530, Mukesh Ojha wrote:
> 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 <mukesh.ojha@oss.qualcomm.com>
> ---
> 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;

Same comment as the one for the previous patch.

>  };
>  
>  struct smem_image_version {

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
  2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
  2025-04-25 13:59 ` [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Mukesh Ojha
@ 2025-04-25 17:29 ` Dmitry Baryshkov
  2025-04-25 19:18 ` Konrad Dybcio
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-04-25 17:29 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Fri, Apr 25, 2025 at 07:29:44PM +0530, Mukesh Ojha wrote:
> 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 <mukesh.ojha@oss.qualcomm.com>
> ---
> Changes in v2:
>  - Added debugfs entry and described more about the field in commit
>    text.
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
                   ` (2 preceding siblings ...)
  2025-04-25 17:29 ` [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Dmitry Baryshkov
@ 2025-04-25 19:18 ` Konrad Dybcio
  2025-04-26 16:28 ` kernel test robot
  2025-04-26 17:30 ` kernel test robot
  5 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2025-04-25 19:18 UTC (permalink / raw)
  To: Mukesh Ojha, Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel

On 4/25/25 3:59 PM, Mukesh Ojha wrote:
> 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 <mukesh.ojha@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
                   ` (3 preceding siblings ...)
  2025-04-25 19:18 ` Konrad Dybcio
@ 2025-04-26 16:28 ` kernel test robot
  2025-04-26 17:30 ` kernel test robot
  5 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2025-04-26 16:28 UTC (permalink / raw)
  To: Mukesh Ojha, Bjorn Andersson, Konrad Dybcio
  Cc: oe-kbuild-all, linux-arm-msm, linux-kernel, Mukesh Ojha

Hi Mukesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.15-rc3 next-20250424]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mukesh-Ojha/soc-qcom-socinfo-Add-support-for-new-fields-in-revision-21/20250425-220213
base:   linus/master
patch link:    https://lore.kernel.org/r/20250425135946.1087065-1-mukesh.ojha%40oss.qualcomm.com
patch subject: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20250427/202504270011.Jftyvklb-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250427/202504270011.Jftyvklb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504270011.Jftyvklb-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/soc/qcom/socinfo.c: In function 'socinfo_debugfs_init':
>> drivers/soc/qcom/socinfo.c:613:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
     613 |                 debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     614 |                                    &qcom_socinfo->info.raw_package_type);
         |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/soc/qcom/socinfo.c:615:9: note: here
     615 |         case SOCINFO_VERSION(0, 19):
         |         ^~~~


vim +613 drivers/soc/qcom/socinfo.c

   592	
   593	static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
   594					 struct socinfo *info, size_t info_size)
   595	{
   596		struct smem_image_version *versions;
   597		struct dentry *dentry;
   598		size_t size;
   599		int i;
   600		unsigned int num_pmics;
   601		unsigned int pmic_array_offset;
   602	
   603		qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL);
   604	
   605		qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt);
   606	
   607		debugfs_create_x32("info_fmt", 0444, qcom_socinfo->dbg_root,
   608				   &qcom_socinfo->info.fmt);
   609	
   610		switch (qcom_socinfo->info.fmt) {
   611		case SOCINFO_VERSION(0, 20):
   612			qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type);
 > 613			debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root,
   614					   &qcom_socinfo->info.raw_package_type);
   615		case SOCINFO_VERSION(0, 19):
   616			qcom_socinfo->info.num_func_clusters = __le32_to_cpu(info->num_func_clusters);
   617			qcom_socinfo->info.boot_cluster = __le32_to_cpu(info->boot_cluster);
   618			qcom_socinfo->info.boot_core = __le32_to_cpu(info->boot_core);
   619	
   620			debugfs_create_u32("num_func_clusters", 0444, qcom_socinfo->dbg_root,
   621					   &qcom_socinfo->info.num_func_clusters);
   622			debugfs_create_u32("boot_cluster", 0444, qcom_socinfo->dbg_root,
   623					   &qcom_socinfo->info.boot_cluster);
   624			debugfs_create_u32("boot_core", 0444, qcom_socinfo->dbg_root,
   625					   &qcom_socinfo->info.boot_core);
   626			fallthrough;
   627		case SOCINFO_VERSION(0, 18):
   628		case SOCINFO_VERSION(0, 17):
   629			qcom_socinfo->info.oem_variant = __le32_to_cpu(info->oem_variant);
   630			debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
   631					   &qcom_socinfo->info.oem_variant);
   632			fallthrough;
   633		case SOCINFO_VERSION(0, 16):
   634			qcom_socinfo->info.feature_code = __le32_to_cpu(info->feature_code);
   635			qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);
   636	
   637			debugfs_create_u32("feature_code", 0444, qcom_socinfo->dbg_root,
   638					   &qcom_socinfo->info.feature_code);
   639			debugfs_create_u32("pcode", 0444, qcom_socinfo->dbg_root,
   640					   &qcom_socinfo->info.pcode);
   641			fallthrough;
   642		case SOCINFO_VERSION(0, 15):
   643			qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported);
   644	
   645			debugfs_create_u32("nmodem_supported", 0444, qcom_socinfo->dbg_root,
   646					   &qcom_socinfo->info.nmodem_supported);
   647			fallthrough;
   648		case SOCINFO_VERSION(0, 14):
   649			qcom_socinfo->info.num_clusters = __le32_to_cpu(info->num_clusters);
   650			qcom_socinfo->info.ncluster_array_offset = __le32_to_cpu(info->ncluster_array_offset);
   651			qcom_socinfo->info.num_subset_parts = __le32_to_cpu(info->num_subset_parts);
   652			qcom_socinfo->info.nsubset_parts_array_offset =
   653				__le32_to_cpu(info->nsubset_parts_array_offset);
   654	
   655			debugfs_create_u32("num_clusters", 0444, qcom_socinfo->dbg_root,
   656					   &qcom_socinfo->info.num_clusters);
   657			debugfs_create_u32("ncluster_array_offset", 0444, qcom_socinfo->dbg_root,
   658					   &qcom_socinfo->info.ncluster_array_offset);
   659			debugfs_create_u32("num_subset_parts", 0444, qcom_socinfo->dbg_root,
   660					   &qcom_socinfo->info.num_subset_parts);
   661			debugfs_create_u32("nsubset_parts_array_offset", 0444, qcom_socinfo->dbg_root,
   662					   &qcom_socinfo->info.nsubset_parts_array_offset);
   663			fallthrough;
   664		case SOCINFO_VERSION(0, 13):
   665			qcom_socinfo->info.nproduct_id = __le32_to_cpu(info->nproduct_id);
   666	
   667			debugfs_create_u32("nproduct_id", 0444, qcom_socinfo->dbg_root,
   668					   &qcom_socinfo->info.nproduct_id);
   669			DEBUGFS_ADD(info, chip_id);
   670			fallthrough;
   671		case SOCINFO_VERSION(0, 12):
   672			qcom_socinfo->info.chip_family =
   673				__le32_to_cpu(info->chip_family);
   674			qcom_socinfo->info.raw_device_family =
   675				__le32_to_cpu(info->raw_device_family);
   676			qcom_socinfo->info.raw_device_num =
   677				__le32_to_cpu(info->raw_device_num);
   678	
   679			debugfs_create_x32("chip_family", 0444, qcom_socinfo->dbg_root,
   680					   &qcom_socinfo->info.chip_family);
   681			debugfs_create_x32("raw_device_family", 0444,
   682					   qcom_socinfo->dbg_root,
   683					   &qcom_socinfo->info.raw_device_family);
   684			debugfs_create_x32("raw_device_number", 0444,
   685					   qcom_socinfo->dbg_root,
   686					   &qcom_socinfo->info.raw_device_num);
   687			fallthrough;
   688		case SOCINFO_VERSION(0, 11):
   689			num_pmics = le32_to_cpu(info->num_pmics);
   690			pmic_array_offset = le32_to_cpu(info->pmic_array_offset);
   691			if (pmic_array_offset + 2 * num_pmics * sizeof(u32) <= info_size)
   692				DEBUGFS_ADD(info, pmic_model_array);
   693			fallthrough;
   694		case SOCINFO_VERSION(0, 10):
   695		case SOCINFO_VERSION(0, 9):
   696			qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id);
   697	
   698			debugfs_create_u32("foundry_id", 0444, qcom_socinfo->dbg_root,
   699					   &qcom_socinfo->info.foundry_id);
   700			fallthrough;
   701		case SOCINFO_VERSION(0, 8):
   702		case SOCINFO_VERSION(0, 7):
   703			DEBUGFS_ADD(info, pmic_model);
   704			DEBUGFS_ADD(info, pmic_die_rev);
   705			fallthrough;
   706		case SOCINFO_VERSION(0, 6):
   707			qcom_socinfo->info.hw_plat_subtype =
   708				__le32_to_cpu(info->hw_plat_subtype);
   709	
   710			debugfs_create_u32("hardware_platform_subtype", 0444,
   711					   qcom_socinfo->dbg_root,
   712					   &qcom_socinfo->info.hw_plat_subtype);
   713			fallthrough;
   714		case SOCINFO_VERSION(0, 5):
   715			qcom_socinfo->info.accessory_chip =
   716				__le32_to_cpu(info->accessory_chip);
   717	
   718			debugfs_create_u32("accessory_chip", 0444,
   719					   qcom_socinfo->dbg_root,
   720					   &qcom_socinfo->info.accessory_chip);
   721			fallthrough;
   722		case SOCINFO_VERSION(0, 4):
   723			qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver);
   724	
   725			debugfs_create_u32("platform_version", 0444,
   726					   qcom_socinfo->dbg_root,
   727					   &qcom_socinfo->info.plat_ver);
   728			fallthrough;
   729		case SOCINFO_VERSION(0, 3):
   730			qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat);
   731	
   732			debugfs_create_u32("hardware_platform", 0444,
   733					   qcom_socinfo->dbg_root,
   734					   &qcom_socinfo->info.hw_plat);
   735			fallthrough;
   736		case SOCINFO_VERSION(0, 2):
   737			qcom_socinfo->info.raw_ver  = __le32_to_cpu(info->raw_ver);
   738	
   739			debugfs_create_u32("raw_version", 0444, qcom_socinfo->dbg_root,
   740					   &qcom_socinfo->info.raw_ver);
   741			fallthrough;
   742		case SOCINFO_VERSION(0, 1):
   743			DEBUGFS_ADD(info, build_id);
   744			break;
   745		}
   746	
   747		versions = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_IMAGE_VERSION_TABLE,
   748					 &size);
   749	
   750		for (i = 0; i < ARRAY_SIZE(socinfo_image_names); i++) {
   751			if (!socinfo_image_names[i])
   752				continue;
   753	
   754			dentry = debugfs_create_dir(socinfo_image_names[i],
   755						    qcom_socinfo->dbg_root);
   756			debugfs_create_file("name", 0444, dentry, &versions[i],
   757					    &qcom_image_name_ops);
   758			debugfs_create_file("variant", 0444, dentry, &versions[i],
   759					    &qcom_image_variant_ops);
   760			debugfs_create_file("oem", 0444, dentry, &versions[i],
   761					    &qcom_image_oem_ops);
   762		}
   763	}
   764	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
  2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
                   ` (4 preceding siblings ...)
  2025-04-26 16:28 ` kernel test robot
@ 2025-04-26 17:30 ` kernel test robot
  5 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2025-04-26 17:30 UTC (permalink / raw)
  To: Mukesh Ojha, Bjorn Andersson, Konrad Dybcio
  Cc: llvm, oe-kbuild-all, linux-arm-msm, linux-kernel, Mukesh Ojha

Hi Mukesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.15-rc3 next-20250424]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Mukesh-Ojha/soc-qcom-socinfo-Add-support-for-new-fields-in-revision-21/20250425-220213
base:   linus/master
patch link:    https://lore.kernel.org/r/20250425135946.1087065-1-mukesh.ojha%40oss.qualcomm.com
patch subject: [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250427/202504270129.LBGxvK4p-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250427/202504270129.LBGxvK4p-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504270129.LBGxvK4p-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/soc/qcom/socinfo.c:615:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     615 |         case SOCINFO_VERSION(0, 19):
         |         ^
   drivers/soc/qcom/socinfo.c:615:2: note: insert '__attribute__((fallthrough));' to silence this warning
     615 |         case SOCINFO_VERSION(0, 19):
         |         ^
         |         __attribute__((fallthrough)); 
   drivers/soc/qcom/socinfo.c:615:2: note: insert 'break;' to avoid fall-through
     615 |         case SOCINFO_VERSION(0, 19):
         |         ^
         |         break; 
   1 warning generated.


vim +615 drivers/soc/qcom/socinfo.c

cd23d1405be666a Vaishali Thakkar    2019-07-24  592  
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  593  static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
734c78e7febf879 Dmitry Baryshkov    2020-12-22  594  				 struct socinfo *info, size_t info_size)
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  595  {
cd23d1405be666a Vaishali Thakkar    2019-07-24  596  	struct smem_image_version *versions;
cd23d1405be666a Vaishali Thakkar    2019-07-24  597  	struct dentry *dentry;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  598  	size_t size;
cd23d1405be666a Vaishali Thakkar    2019-07-24  599  	int i;
734c78e7febf879 Dmitry Baryshkov    2020-12-22  600  	unsigned int num_pmics;
734c78e7febf879 Dmitry Baryshkov    2020-12-22  601  	unsigned int pmic_array_offset;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  602  
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  603  	qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  604  
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  605  	qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  606  
8333b2c26c2f38e Stephen Boyd        2020-12-15  607  	debugfs_create_x32("info_fmt", 0444, qcom_socinfo->dbg_root,
50f85d16200eee1 Dmitry Baryshkov    2020-05-25  608  			   &qcom_socinfo->info.fmt);
50f85d16200eee1 Dmitry Baryshkov    2020-05-25  609  
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  610  	switch (qcom_socinfo->info.fmt) {
d9ccd28132cc435 Mukesh Ojha         2025-04-25  611  	case SOCINFO_VERSION(0, 20):
d9ccd28132cc435 Mukesh Ojha         2025-04-25  612  		qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type);
d9ccd28132cc435 Mukesh Ojha         2025-04-25  613  		debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root,
d9ccd28132cc435 Mukesh Ojha         2025-04-25  614  				   &qcom_socinfo->info.raw_package_type);
d9c2a255cfe026c Naman Jain          2023-06-06 @615  	case SOCINFO_VERSION(0, 19):
d9c2a255cfe026c Naman Jain          2023-06-06  616  		qcom_socinfo->info.num_func_clusters = __le32_to_cpu(info->num_func_clusters);
d9c2a255cfe026c Naman Jain          2023-06-06  617  		qcom_socinfo->info.boot_cluster = __le32_to_cpu(info->boot_cluster);
d9c2a255cfe026c Naman Jain          2023-06-06  618  		qcom_socinfo->info.boot_core = __le32_to_cpu(info->boot_core);
d9c2a255cfe026c Naman Jain          2023-06-06  619  
d9c2a255cfe026c Naman Jain          2023-06-06  620  		debugfs_create_u32("num_func_clusters", 0444, qcom_socinfo->dbg_root,
d9c2a255cfe026c Naman Jain          2023-06-06  621  				   &qcom_socinfo->info.num_func_clusters);
d9c2a255cfe026c Naman Jain          2023-06-06  622  		debugfs_create_u32("boot_cluster", 0444, qcom_socinfo->dbg_root,
d9c2a255cfe026c Naman Jain          2023-06-06  623  				   &qcom_socinfo->info.boot_cluster);
d9c2a255cfe026c Naman Jain          2023-06-06  624  		debugfs_create_u32("boot_core", 0444, qcom_socinfo->dbg_root,
d9c2a255cfe026c Naman Jain          2023-06-06  625  				   &qcom_socinfo->info.boot_core);
d9c2a255cfe026c Naman Jain          2023-06-06  626  		fallthrough;
158826c73d48097 Naman Jain          2023-06-06  627  	case SOCINFO_VERSION(0, 18):
6bdab60d5cbd799 Naman Jain          2023-01-27  628  	case SOCINFO_VERSION(0, 17):
6bdab60d5cbd799 Naman Jain          2023-01-27  629  		qcom_socinfo->info.oem_variant = __le32_to_cpu(info->oem_variant);
6bdab60d5cbd799 Naman Jain          2023-01-27  630  		debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
6bdab60d5cbd799 Naman Jain          2023-01-27  631  				   &qcom_socinfo->info.oem_variant);
6bdab60d5cbd799 Naman Jain          2023-01-27  632  		fallthrough;
f02a537357a61e7 Naman Jain          2022-11-25  633  	case SOCINFO_VERSION(0, 16):
f02a537357a61e7 Naman Jain          2022-11-25  634  		qcom_socinfo->info.feature_code = __le32_to_cpu(info->feature_code);
f02a537357a61e7 Naman Jain          2022-11-25  635  		qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);
f02a537357a61e7 Naman Jain          2022-11-25  636  
f02a537357a61e7 Naman Jain          2022-11-25  637  		debugfs_create_u32("feature_code", 0444, qcom_socinfo->dbg_root,
f02a537357a61e7 Naman Jain          2022-11-25  638  				   &qcom_socinfo->info.feature_code);
f02a537357a61e7 Naman Jain          2022-11-25  639  		debugfs_create_u32("pcode", 0444, qcom_socinfo->dbg_root,
f02a537357a61e7 Naman Jain          2022-11-25  640  				   &qcom_socinfo->info.pcode);
f02a537357a61e7 Naman Jain          2022-11-25  641  		fallthrough;
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  642  	case SOCINFO_VERSION(0, 15):
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  643  		qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported);
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  644  
8333b2c26c2f38e Stephen Boyd        2020-12-15  645  		debugfs_create_u32("nmodem_supported", 0444, qcom_socinfo->dbg_root,
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  646  				   &qcom_socinfo->info.nmodem_supported);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  647  		fallthrough;
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  648  	case SOCINFO_VERSION(0, 14):
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  649  		qcom_socinfo->info.num_clusters = __le32_to_cpu(info->num_clusters);
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  650  		qcom_socinfo->info.ncluster_array_offset = __le32_to_cpu(info->ncluster_array_offset);
d9c2a255cfe026c Naman Jain          2023-06-06  651  		qcom_socinfo->info.num_subset_parts = __le32_to_cpu(info->num_subset_parts);
d9c2a255cfe026c Naman Jain          2023-06-06  652  		qcom_socinfo->info.nsubset_parts_array_offset =
d9c2a255cfe026c Naman Jain          2023-06-06  653  			__le32_to_cpu(info->nsubset_parts_array_offset);
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  654  
8333b2c26c2f38e Stephen Boyd        2020-12-15  655  		debugfs_create_u32("num_clusters", 0444, qcom_socinfo->dbg_root,
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  656  				   &qcom_socinfo->info.num_clusters);
8333b2c26c2f38e Stephen Boyd        2020-12-15  657  		debugfs_create_u32("ncluster_array_offset", 0444, qcom_socinfo->dbg_root,
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  658  				   &qcom_socinfo->info.ncluster_array_offset);
d9c2a255cfe026c Naman Jain          2023-06-06  659  		debugfs_create_u32("num_subset_parts", 0444, qcom_socinfo->dbg_root,
d9c2a255cfe026c Naman Jain          2023-06-06  660  				   &qcom_socinfo->info.num_subset_parts);
d9c2a255cfe026c Naman Jain          2023-06-06  661  		debugfs_create_u32("nsubset_parts_array_offset", 0444, qcom_socinfo->dbg_root,
d9c2a255cfe026c Naman Jain          2023-06-06  662  				   &qcom_socinfo->info.nsubset_parts_array_offset);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  663  		fallthrough;
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  664  	case SOCINFO_VERSION(0, 13):
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  665  		qcom_socinfo->info.nproduct_id = __le32_to_cpu(info->nproduct_id);
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  666  
8333b2c26c2f38e Stephen Boyd        2020-12-15  667  		debugfs_create_u32("nproduct_id", 0444, qcom_socinfo->dbg_root,
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  668  				   &qcom_socinfo->info.nproduct_id);
0f12fe7f1e660ac Dmitry Baryshkov    2020-05-25  669  		DEBUGFS_ADD(info, chip_id);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  670  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  671  	case SOCINFO_VERSION(0, 12):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  672  		qcom_socinfo->info.chip_family =
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  673  			__le32_to_cpu(info->chip_family);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  674  		qcom_socinfo->info.raw_device_family =
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  675  			__le32_to_cpu(info->raw_device_family);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  676  		qcom_socinfo->info.raw_device_num =
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  677  			__le32_to_cpu(info->raw_device_num);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  678  
8333b2c26c2f38e Stephen Boyd        2020-12-15  679  		debugfs_create_x32("chip_family", 0444, qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  680  				   &qcom_socinfo->info.chip_family);
8333b2c26c2f38e Stephen Boyd        2020-12-15  681  		debugfs_create_x32("raw_device_family", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  682  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  683  				   &qcom_socinfo->info.raw_device_family);
8333b2c26c2f38e Stephen Boyd        2020-12-15  684  		debugfs_create_x32("raw_device_number", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  685  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  686  				   &qcom_socinfo->info.raw_device_num);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  687  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  688  	case SOCINFO_VERSION(0, 11):
734c78e7febf879 Dmitry Baryshkov    2020-12-22  689  		num_pmics = le32_to_cpu(info->num_pmics);
734c78e7febf879 Dmitry Baryshkov    2020-12-22  690  		pmic_array_offset = le32_to_cpu(info->pmic_array_offset);
734c78e7febf879 Dmitry Baryshkov    2020-12-22  691  		if (pmic_array_offset + 2 * num_pmics * sizeof(u32) <= info_size)
734c78e7febf879 Dmitry Baryshkov    2020-12-22  692  			DEBUGFS_ADD(info, pmic_model_array);
734c78e7febf879 Dmitry Baryshkov    2020-12-22  693  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  694  	case SOCINFO_VERSION(0, 10):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  695  	case SOCINFO_VERSION(0, 9):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  696  		qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  697  
8333b2c26c2f38e Stephen Boyd        2020-12-15  698  		debugfs_create_u32("foundry_id", 0444, qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  699  				   &qcom_socinfo->info.foundry_id);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  700  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  701  	case SOCINFO_VERSION(0, 8):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  702  	case SOCINFO_VERSION(0, 7):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  703  		DEBUGFS_ADD(info, pmic_model);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  704  		DEBUGFS_ADD(info, pmic_die_rev);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  705  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  706  	case SOCINFO_VERSION(0, 6):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  707  		qcom_socinfo->info.hw_plat_subtype =
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  708  			__le32_to_cpu(info->hw_plat_subtype);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  709  
8333b2c26c2f38e Stephen Boyd        2020-12-15  710  		debugfs_create_u32("hardware_platform_subtype", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  711  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  712  				   &qcom_socinfo->info.hw_plat_subtype);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  713  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  714  	case SOCINFO_VERSION(0, 5):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  715  		qcom_socinfo->info.accessory_chip =
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  716  			__le32_to_cpu(info->accessory_chip);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  717  
8333b2c26c2f38e Stephen Boyd        2020-12-15  718  		debugfs_create_u32("accessory_chip", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  719  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  720  				   &qcom_socinfo->info.accessory_chip);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  721  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  722  	case SOCINFO_VERSION(0, 4):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  723  		qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  724  
8333b2c26c2f38e Stephen Boyd        2020-12-15  725  		debugfs_create_u32("platform_version", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  726  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  727  				   &qcom_socinfo->info.plat_ver);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  728  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  729  	case SOCINFO_VERSION(0, 3):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  730  		qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  731  
8333b2c26c2f38e Stephen Boyd        2020-12-15  732  		debugfs_create_u32("hardware_platform", 0444,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  733  				   qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  734  				   &qcom_socinfo->info.hw_plat);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  735  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  736  	case SOCINFO_VERSION(0, 2):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  737  		qcom_socinfo->info.raw_ver  = __le32_to_cpu(info->raw_ver);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  738  
8333b2c26c2f38e Stephen Boyd        2020-12-15  739  		debugfs_create_u32("raw_version", 0444, qcom_socinfo->dbg_root,
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  740  				   &qcom_socinfo->info.raw_ver);
df561f6688fef77 Gustavo A. R. Silva 2020-08-23  741  		fallthrough;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  742  	case SOCINFO_VERSION(0, 1):
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  743  		DEBUGFS_ADD(info, build_id);
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  744  		break;
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  745  	}
cd23d1405be666a Vaishali Thakkar    2019-07-24  746  
cd23d1405be666a Vaishali Thakkar    2019-07-24  747  	versions = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_IMAGE_VERSION_TABLE,
cd23d1405be666a Vaishali Thakkar    2019-07-24  748  				 &size);
cd23d1405be666a Vaishali Thakkar    2019-07-24  749  
cd23d1405be666a Vaishali Thakkar    2019-07-24  750  	for (i = 0; i < ARRAY_SIZE(socinfo_image_names); i++) {
cd23d1405be666a Vaishali Thakkar    2019-07-24  751  		if (!socinfo_image_names[i])
cd23d1405be666a Vaishali Thakkar    2019-07-24  752  			continue;
cd23d1405be666a Vaishali Thakkar    2019-07-24  753  
cd23d1405be666a Vaishali Thakkar    2019-07-24  754  		dentry = debugfs_create_dir(socinfo_image_names[i],
cd23d1405be666a Vaishali Thakkar    2019-07-24  755  					    qcom_socinfo->dbg_root);
8333b2c26c2f38e Stephen Boyd        2020-12-15  756  		debugfs_create_file("name", 0444, dentry, &versions[i],
cd23d1405be666a Vaishali Thakkar    2019-07-24  757  				    &qcom_image_name_ops);
8333b2c26c2f38e Stephen Boyd        2020-12-15  758  		debugfs_create_file("variant", 0444, dentry, &versions[i],
cd23d1405be666a Vaishali Thakkar    2019-07-24  759  				    &qcom_image_variant_ops);
8333b2c26c2f38e Stephen Boyd        2020-12-15  760  		debugfs_create_file("oem", 0444, dentry, &versions[i],
cd23d1405be666a Vaishali Thakkar    2019-07-24  761  				    &qcom_image_oem_ops);
cd23d1405be666a Vaishali Thakkar    2019-07-24  762  	}
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  763  }
9c84c1e78634bd7 Vaishali Thakkar    2019-07-24  764  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-04-25 17:28   ` Dmitry Baryshkov
@ 2025-05-08 15:37     ` Mukesh Ojha
  2025-05-08 15:56       ` Dmitry Baryshkov
  0 siblings, 1 reply; 15+ messages in thread
From: Mukesh Ojha @ 2025-05-08 15:37 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
> On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
> > 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 <mukesh.ojha@oss.qualcomm.com>
> > ---
> > 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);
> 
> An offset into what? If this provides additional data, then the data
> should be visible in the debugfs. Not sure, what's the point in dumping
> the offset here.

offset into info(struct socinfo) object.

I agree to you and I said the same in first version this is just offset
and does not provide any debug info we would look from userspace.  For
parity with other fields I did it for all newly added fields.
I have dropped it in latest patch.

-Mukesh


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-05-08 15:37     ` Mukesh Ojha
@ 2025-05-08 15:56       ` Dmitry Baryshkov
  2025-05-08 16:48         ` Mukesh Ojha
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-05-08 15:56 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Thu, May 08, 2025 at 09:07:03PM +0530, Mukesh Ojha wrote:
> On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
> > On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
> > > 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 <mukesh.ojha@oss.qualcomm.com>
> > > ---
> > > 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);
> > 
> > An offset into what? If this provides additional data, then the data
> > should be visible in the debugfs. Not sure, what's the point in dumping
> > the offset here.
> 
> offset into info(struct socinfo) object.
> 
> I agree to you and I said the same in first version this is just offset
> and does not provide any debug info we would look from userspace.  For
> parity with other fields I did it for all newly added fields.
> I have dropped it in latest patch.

I'd rather see the decoded structure that is being pointed by this
offset.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-05-08 15:56       ` Dmitry Baryshkov
@ 2025-05-08 16:48         ` Mukesh Ojha
  2025-05-08 18:01           ` Konrad Dybcio
  0 siblings, 1 reply; 15+ messages in thread
From: Mukesh Ojha @ 2025-05-08 16:48 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On Thu, May 08, 2025 at 06:56:47PM +0300, Dmitry Baryshkov wrote:
> On Thu, May 08, 2025 at 09:07:03PM +0530, Mukesh Ojha wrote:
> > On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
> > > On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
> > > > 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 <mukesh.ojha@oss.qualcomm.com>
> > > > ---
> > > > 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);
> > > 
> > > An offset into what? If this provides additional data, then the data
> > > should be visible in the debugfs. Not sure, what's the point in dumping
> > > the offset here.
> > 
> > offset into info(struct socinfo) object.
> > 
> > I agree to you and I said the same in first version this is just offset
> > and does not provide any debug info we would look from userspace.  For
> > parity with other fields I did it for all newly added fields.
> > I have dropped it in latest patch.
> 
> I'd rather see the decoded structure that is being pointed by this
> offset.

You mean info + info->nsubpart_feat_array_offset ? 

There is more to it which I don't want to mention as they are not
upstreamed yet and unrelated to this change.

data = info + (offset + (part * sizeof(u32)));

e.g., Here, part is a enum represents camera, display etc., and data
represents their feature presents. Since, part is not upstream yet I
don't feel we should expose this information to debugfs. We could always
add them in debugfs when such things are standardized and upstreamed.

-Mukesh
> 
> -- 
> With best wishes
> Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-05-08 16:48         ` Mukesh Ojha
@ 2025-05-08 18:01           ` Konrad Dybcio
  2025-05-09 10:06             ` Mukesh Ojha
  0 siblings, 1 reply; 15+ messages in thread
From: Konrad Dybcio @ 2025-05-08 18:01 UTC (permalink / raw)
  To: Mukesh Ojha, Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel

On 5/8/25 6:48 PM, Mukesh Ojha wrote:
> On Thu, May 08, 2025 at 06:56:47PM +0300, Dmitry Baryshkov wrote:
>> On Thu, May 08, 2025 at 09:07:03PM +0530, Mukesh Ojha wrote:
>>> On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
>>>> On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
>>>>> 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 <mukesh.ojha@oss.qualcomm.com>
>>>>> ---
>>>>> 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);
>>>>
>>>> An offset into what? If this provides additional data, then the data
>>>> should be visible in the debugfs. Not sure, what's the point in dumping
>>>> the offset here.
>>>
>>> offset into info(struct socinfo) object.
>>>
>>> I agree to you and I said the same in first version this is just offset
>>> and does not provide any debug info we would look from userspace.  For
>>> parity with other fields I did it for all newly added fields.
>>> I have dropped it in latest patch.
>>
>> I'd rather see the decoded structure that is being pointed by this
>> offset.
> 
> You mean info + info->nsubpart_feat_array_offset ? 
> 
> There is more to it which I don't want to mention as they are not
> upstreamed yet and unrelated to this change.
> 
> data = info + (offset + (part * sizeof(u32)));
> 
> e.g., Here, part is a enum represents camera, display etc., and data
> represents their feature presents. Since, part is not upstream yet I
> don't feel we should expose this information to debugfs. We could always
> add them in debugfs when such things are standardized and upstreamed.

That's what Dmitry's saying - just add support for them

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-05-08 18:01           ` Konrad Dybcio
@ 2025-05-09 10:06             ` Mukesh Ojha
  2025-05-09 22:46               ` Konrad Dybcio
  0 siblings, 1 reply; 15+ messages in thread
From: Mukesh Ojha @ 2025-05-09 10:06 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
	linux-kernel

On Thu, May 08, 2025 at 08:01:44PM +0200, Konrad Dybcio wrote:
> On 5/8/25 6:48 PM, Mukesh Ojha wrote:
> > On Thu, May 08, 2025 at 06:56:47PM +0300, Dmitry Baryshkov wrote:
> >> On Thu, May 08, 2025 at 09:07:03PM +0530, Mukesh Ojha wrote:
> >>> On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
> >>>> On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
> >>>>> 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 <mukesh.ojha@oss.qualcomm.com>
> >>>>> ---
> >>>>> 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);
> >>>>
> >>>> An offset into what? If this provides additional data, then the data
> >>>> should be visible in the debugfs. Not sure, what's the point in dumping
> >>>> the offset here.
> >>>
> >>> offset into info(struct socinfo) object.
> >>>
> >>> I agree to you and I said the same in first version this is just offset
> >>> and does not provide any debug info we would look from userspace.  For
> >>> parity with other fields I did it for all newly added fields.
> >>> I have dropped it in latest patch.
> >>
> >> I'd rather see the decoded structure that is being pointed by this
> >> offset.
> > 
> > You mean info + info->nsubpart_feat_array_offset ? 
> > 
> > There is more to it which I don't want to mention as they are not
> > upstreamed yet and unrelated to this change.
> > 
> > data = info + (offset + (part * sizeof(u32)));
> > 
> > e.g., Here, part is a enum represents camera, display etc., and data
> > represents their feature presents. Since, part is not upstream yet I
> > don't feel we should expose this information to debugfs. We could always
> > add them in debugfs when such things are standardized and upstreamed.
> 
> That's what Dmitry's saying - just add support for them

We definitely add support for this in the future.  In the meantime, does
the absence of the support prevent this socinfo field from being merged?
Without it, there could be inconsistencies between the boot firmware and
Linux for the SM8750 platform.

-Mukesh

> 
> Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
  2025-05-09 10:06             ` Mukesh Ojha
@ 2025-05-09 22:46               ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2025-05-09 22:46 UTC (permalink / raw)
  To: Mukesh Ojha, Konrad Dybcio
  Cc: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
	linux-kernel

On 5/9/25 12:06 PM, Mukesh Ojha wrote:
> On Thu, May 08, 2025 at 08:01:44PM +0200, Konrad Dybcio wrote:
>> On 5/8/25 6:48 PM, Mukesh Ojha wrote:
>>> On Thu, May 08, 2025 at 06:56:47PM +0300, Dmitry Baryshkov wrote:
>>>> On Thu, May 08, 2025 at 09:07:03PM +0530, Mukesh Ojha wrote:
>>>>> On Fri, Apr 25, 2025 at 08:28:51PM +0300, Dmitry Baryshkov wrote:
>>>>>> On Fri, Apr 25, 2025 at 07:29:45PM +0530, Mukesh Ojha wrote:
>>>>>>> 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 <mukesh.ojha@oss.qualcomm.com>
>>>>>>> ---
>>>>>>> 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);
>>>>>>
>>>>>> An offset into what? If this provides additional data, then the data
>>>>>> should be visible in the debugfs. Not sure, what's the point in dumping
>>>>>> the offset here.
>>>>>
>>>>> offset into info(struct socinfo) object.
>>>>>
>>>>> I agree to you and I said the same in first version this is just offset
>>>>> and does not provide any debug info we would look from userspace.  For
>>>>> parity with other fields I did it for all newly added fields.
>>>>> I have dropped it in latest patch.
>>>>
>>>> I'd rather see the decoded structure that is being pointed by this
>>>> offset.
>>>
>>> You mean info + info->nsubpart_feat_array_offset ? 
>>>
>>> There is more to it which I don't want to mention as they are not
>>> upstreamed yet and unrelated to this change.
>>>
>>> data = info + (offset + (part * sizeof(u32)));
>>>
>>> e.g., Here, part is a enum represents camera, display etc., and data
>>> represents their feature presents. Since, part is not upstream yet I
>>> don't feel we should expose this information to debugfs. We could always
>>> add them in debugfs when such things are standardized and upstreamed.
>>
>> That's what Dmitry's saying - just add support for them
> 
> We definitely add support for this in the future.  In the meantime, does
> the absence of the support prevent this socinfo field from being merged?
> Without it, there could be inconsistencies between the boot firmware and
> Linux for the SM8750 platform.

Why delay adding a couple struct definitions into the "future"? I feel
like we spent more time on this thread that describing them would take

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-05-09 22:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 13:59 [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Mukesh Ojha
2025-04-25 13:59 ` [PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21 Mukesh Ojha
2025-04-25 17:28   ` Dmitry Baryshkov
2025-05-08 15:37     ` Mukesh Ojha
2025-05-08 15:56       ` Dmitry Baryshkov
2025-05-08 16:48         ` Mukesh Ojha
2025-05-08 18:01           ` Konrad Dybcio
2025-05-09 10:06             ` Mukesh Ojha
2025-05-09 22:46               ` Konrad Dybcio
2025-04-25 13:59 ` [PATCH v2 3/3] soc: qcom: socinfo: Add support for new fields in revision 22 Mukesh Ojha
2025-04-25 17:29   ` Dmitry Baryshkov
2025-04-25 17:29 ` [PATCH v2 1/3] soc: qcom: socinfo: Add support for new fields in revision 20 Dmitry Baryshkov
2025-04-25 19:18 ` Konrad Dybcio
2025-04-26 16:28 ` kernel test robot
2025-04-26 17:30 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox