Skip to contentSkip to conversation

Add QAD, Cti-trigger and Bootconfig support for Data Capture and Compare(DCC)

PATCH Superseded Souradeep Chowdhury 2 participants 5 messages Jan 24, 2023 – Jan 25, 2023

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add QAD, Cti-trigger and Bootconfig support for Data Capture and Compare(DCC)

This patch adds the Bootconfig, QAD and CTI-Trigger support for DCC.

1.Bootconfig

Bootconfig parser has been added to DCC driver so that the register addresses can be configured during boot-time. This is used to debug crashes that can happen during boot-time. The expected format of a bootconfig is as follows:-

dcc_config {
	link_list_<The list number to configure> {
		id = <The list number to configure>
		items =  <Address as same format as dcc separated by '_'>,
	}
}

Example:

dcc_config {
	link_list_6 {
		id = 6
		items = R_0x1781005c_1_apb,
			R_0x1782005c_1_apb
	}
	link_list_5 {
		id = 5
		items = R_0x1784005c_1_apb
	}
}

2.QAD

QAD can be enabled as a part of debugfs file under each individual list folder. QAD is used to specify the access control for DCC configurations, on enabling it the access control to dcc configuration space is restricted. On setting the QAD value, the list gets locked out for a particular component and cannot be used by the rest.

3.CTI-trigger

CTI trigger is used to enable the Cross trigger interface for DCC. On enabling CTI trigger the dcc software trigger can be done by writing to CTI trig-out. Also the hwtrigger debugfs file is created which needs to be disabled for enabling CTI-trigger. Hwtrigger needs to be disabled for components to be able to write to CTI-trig-out.

Souradeep Chowdhury (3):
soc: qcom: dcc: Add bootconfig support for DCC
soc: qcom: dcc: Add CTI-trigger support for DCC
soc: qcom: dcc: Add QAD support for DCC

 Documentation/ABI/testing/debugfs-driver-dcc |  24 +++
 drivers/soc/qcom/Kconfig                     |   1 +
 drivers/soc/qcom/dcc.c                       | 290 ++++++++++++++++++++++++++-
 3 files changed, 308 insertions(+), 7 deletions(-)

--
2.7.4

#1 lore raw

PATCH v2 1/3 soc: qcom: dcc: Add bootconfig support for DCC

Add bootconfig parser for DCC which is used to configure addresses in DCC during boot time. This is needed to debug crashes that can happen during boot-time. The expected format of a bootconfig file is as follows:-

dcc_config {
	link_list_<The list number to configure> {
		id = <The list number to configure>
		items =  <Address as same format as dcc separated by '_'>,
	}
}

Example:-

dcc_config {
	link_list_6 {
		id = 6
		items = R_0x1781005c_1_apb,
			R_0x1782005c_1_apb
	}
}
---
 drivers/soc/qcom/Kconfig |  1 +
 drivers/soc/qcom/dcc.c   | 74 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 72 insertions(+), 3 deletions(-)
drivers/soc/qcom/Kconfig +1 -0
index 21c4ce2..f913b72 100644
@@ -73,6 +73,7 @@ config QCOM_LLCC
 config QCOM_DCC
 	tristate "Qualcomm Technologies, Inc. Data Capture and Compare(DCC) engine driver"
 	depends on ARCH_QCOM || COMPILE_TEST
+	select BOOT_CONFIG
 	help
 	  This option enables driver for Data Capture and Compare engine. DCC
 	  driver provides interface to configure DCC block and read back
drivers/soc/qcom/dcc.c +71 -3

116 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH V2 1/3] soc: qcom: dcc: Add bootconfig support for DCC

I love your patch! Yet something to improve:

Hi Souradeep,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20230123]
[cannot apply to clk/clk-next soc/for-next linus/master v6.2-rc5 v6.2-rc4 v6.2-rc3 v6.2-rc5] [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/Souradeep-Chowdhury/soc-qcom-dcc-Add-bootconfig-support-for-DCC/20230124-115549
patch link:    https://lore.kernel.org/r/62d98c7d56e752afff5216cfcd42451edb82cb4d.1674531462.git.quic_schowdhu%40quicinc.com
patch subject: [PATCH V2 1/3] soc: qcom: dcc: Add bootconfig support for DCC
config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20230125/[email protected]/config)
compiler: ia64-linux-gcc (GCC) 12.1.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/752745566c275592d6d18692bc53886e6e955e94
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Souradeep-Chowdhury/soc-qcom-dcc-Add-bootconfig-support-for-DCC/20230124-115549 git checkout 752745566c275592d6d18692bc53886e6e955e94
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "xbc_node_get_child" [drivers/soc/qcom/dcc.ko] undefined!
>> ERROR: modpost: "xbc_node_get_next" [drivers/soc/qcom/dcc.ko] undefined!
>> ERROR: modpost: "xbc_node_find_value" [drivers/soc/qcom/dcc.ko] undefined!
>> ERROR: modpost: "xbc_node_get_data" [drivers/soc/qcom/dcc.ko] undefined!
>> ERROR: modpost: "xbc_node_find_subkey" [drivers/soc/qcom/dcc.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#3 lore raw

PATCH v2 2/3 soc: qcom: dcc: Add CTI-trigger support for DCC

In reply to Souradeep Chowdhury

CTI trigger is used to enable the Cross trigger interface for DCC. On enabling CTI trigger the dcc software trigger can be done by writing to CTI trig-out. Add the debugfs file ctitrigger which gives the user option to enable ctitrigger for a list. Also add hwtrigger debugfs file which needs to be disabled on enabling the CTI-trigger. Hwtrigger needs to be disabled for components to be able to write to cti-trigout.

---
 Documentation/ABI/testing/debugfs-driver-dcc |  16 +++
 drivers/soc/qcom/dcc.c                       | 148 ++++++++++++++++++++++++++-
 2 files changed, 160 insertions(+), 4 deletions(-)
Documentation/ABI/testing/debugfs-driver-dcc +16 -0
index 27ed591..6f5d965 100644
@@ -125,3 +125,19 @@ Description:
 		on manual or crash induced triggers. Lists must
 		be configured and enabled sequentially, e.g. list
 		2 can only be enabled when list 1 have so.
+
+What:           /sys/kernel/debug/dcc/.../[list-number]/ctitrigger
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+	        This debugfs interface is used for enabling the
+	        ctitrigger. Ctitrigger can be enabled by writing
+	        a '1' to the file.
+
+What:	        /sys/kernel/debug/dcc/.../[list-number]/hwtrigger
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+	        This debugfs interface is used for enabling the
+	        hwtrigger. Hwtrigger can be enabled by writing
+		a '1' to the file.
drivers/soc/qcom/dcc.c +144 -4

205 lines not on this page · raw message

Signature · 1 line
2.7.4
#4 lore raw

PATCH v2 3/3 soc: qcom: dcc: Add QAD support for DCC

In reply to Souradeep Chowdhury

Add QAD debugfs file for DCC which can be used to enable/disable the QAD for a list. QAD is used to specify the access control for DCC configurations, on enabling it the access control to dcc configuration space is restricted. On setting the QAD value, the list gets locked out for a particular component and cannot be used by the rest.

---
 Documentation/ABI/testing/debugfs-driver-dcc |  8 ++++
 drivers/soc/qcom/dcc.c                       | 68 ++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
Documentation/ABI/testing/debugfs-driver-dcc +8 -0
index 6f5d965..a3c4657 100644
@@ -141,3 +141,11 @@ Description:
 	        This debugfs interface is used for enabling the
 	        hwtrigger. Hwtrigger can be enabled by writing
 		a '1' to the file.
+
+What:           /sys/kernel/debug/dcc/.../[list-number]/QAD
+Date:           January 2023
+Contact:        Souradeep Chowdhury <[email protected]>
+Description:
+		This debugfs interface is used for enabling the
+		QAD. QAD can be enabled by writing a '1' to the
+		file.
drivers/soc/qcom/dcc.c +68 -0

110 lines not on this page · raw message

Signature · 1 line
2.7.4