All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] *** SUBJECT HERE ***
@ 2021-04-16  8:07 Tao Zhang
  2021-04-16  8:07 ` [PATCH v1 1/2] coresight: Add support for device names Tao Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tao Zhang @ 2021-04-16  8:07 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang

*** BLURB HERE ***

Tao Zhang (2):
  coresight: Add support for device names
  dt-bindings: arm: add property for coresight component name

 Documentation/devicetree/bindings/arm/coresight.txt | 2 ++
 drivers/hwtracing/coresight/coresight-core.c        | 6 ++++++
 2 files changed, 8 insertions(+)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v1 1/2] coresight: Add support for device names
  2021-04-16  8:07 [PATCH 0/2] *** SUBJECT HERE *** Tao Zhang
@ 2021-04-16  8:07 ` Tao Zhang
  2021-04-16 11:19     ` Alexander Shishkin
  2021-04-16  8:07 ` [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name Tao Zhang
  2021-04-16  8:11   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 11+ messages in thread
From: Tao Zhang @ 2021-04-16  8:07 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang

Add support to read device names from device tree entries. Before
the previous process of allocating coresight device name, try to
read the coresight device name from device tree entries. If it is
read, the device name will be returned directly. If it is not read,
the original allocation name process will be followed.

Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
---
 drivers/hwtracing/coresight/coresight-core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 4ba801d..b79c726 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
 	int idx;
 	char *name = NULL;
 	struct fwnode_handle **list;
+	struct device_node *node = dev->of_node;
+
+	if (!node) {
+		if (!of_property_read_string(node, "coresight-name", &name))
+			return name;
+	}
 
 	mutex_lock(&coresight_mutex);
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name
  2021-04-16  8:07 [PATCH 0/2] *** SUBJECT HERE *** Tao Zhang
  2021-04-16  8:07 ` [PATCH v1 1/2] coresight: Add support for device names Tao Zhang
@ 2021-04-16  8:07 ` Tao Zhang
  2021-04-16 11:23     ` Alexander Shishkin
  2021-04-16  8:11   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 11+ messages in thread
From: Tao Zhang @ 2021-04-16  8:07 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang

Add property "coresight-name" for coresight component name. This
allows coresight driver to read device name from device entries.

Signed-off-by: Tao Zhang <taozha@codeaurora.org>
---
 Documentation/devicetree/bindings/arm/coresight.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt
index d711676..0e980ce 100644
--- a/Documentation/devicetree/bindings/arm/coresight.txt
+++ b/Documentation/devicetree/bindings/arm/coresight.txt
@@ -103,6 +103,8 @@ its hardware characteristcs.
 	  powers down the coresight component also powers down and loses its
 	  context. This property is currently only used for the ETM 4.x driver.
 
+	* coresight-name: the name of the coresight devices.
+
 * Optional properties for ETM/PTMs:
 
 	* arm,cp14: must be present if the system accesses ETM/PTM management
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* Re: [PATCH 0/2] *** SUBJECT HERE ***
  2021-04-16  8:07 [PATCH 0/2] *** SUBJECT HERE *** Tao Zhang
@ 2021-04-16  8:11   ` Greg Kroah-Hartman
  2021-04-16  8:07 ` [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name Tao Zhang
  2021-04-16  8:11   ` Greg Kroah-Hartman
  2 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-16  8:11 UTC (permalink / raw)
  To: Tao Zhang
  Cc: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Mike Leach, Leo Yan, coresight, linux-arm-kernel, linux-kernel,
	Tingwei Zhang, Mao Jinlong, Yuanfang Zhang

On Fri, Apr 16, 2021 at 04:07:54PM +0800, Tao Zhang wrote:
> *** BLURB HERE ***

Where is the blurb?

And your subject is not ok :(


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

* Re: [PATCH 0/2] *** SUBJECT HERE ***
@ 2021-04-16  8:11   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-16  8:11 UTC (permalink / raw)
  To: Tao Zhang
  Cc: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Mike Leach, Leo Yan, coresight, linux-arm-kernel, linux-kernel,
	Tingwei Zhang, Mao Jinlong, Yuanfang Zhang

On Fri, Apr 16, 2021 at 04:07:54PM +0800, Tao Zhang wrote:
> *** BLURB HERE ***

Where is the blurb?

And your subject is not ok :(


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] coresight: Add support for device names
  2021-04-16  8:07 ` [PATCH v1 1/2] coresight: Add support for device names Tao Zhang
@ 2021-04-16 11:19     ` Alexander Shishkin
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Shishkin @ 2021-04-16 11:19 UTC (permalink / raw)
  To: Tao Zhang, Mathieu Poirier, Suzuki K Poulose
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang, alexander.shishkin

Tao Zhang <taozha@codeaurora.org> writes:

> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 4ba801d..b79c726 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
>  	int idx;
>  	char *name = NULL;
>  	struct fwnode_handle **list;
> +	struct device_node *node = dev->of_node;
> +
> +	if (!node) {
> +		if (!of_property_read_string(node, "coresight-name", &name))

Ok, I'm not a device tree expert, but I'm pretty sure the above is a
nop.

Regards,
--
Alex

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

* Re: [PATCH v1 1/2] coresight: Add support for device names
@ 2021-04-16 11:19     ` Alexander Shishkin
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Shishkin @ 2021-04-16 11:19 UTC (permalink / raw)
  To: Tao Zhang, Mathieu Poirier, Suzuki K Poulose
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang, alexander.shishkin

Tao Zhang <taozha@codeaurora.org> writes:

> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 4ba801d..b79c726 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
>  	int idx;
>  	char *name = NULL;
>  	struct fwnode_handle **list;
> +	struct device_node *node = dev->of_node;
> +
> +	if (!node) {
> +		if (!of_property_read_string(node, "coresight-name", &name))

Ok, I'm not a device tree expert, but I'm pretty sure the above is a
nop.

Regards,
--
Alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name
  2021-04-16  8:07 ` [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name Tao Zhang
@ 2021-04-16 11:23     ` Alexander Shishkin
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Shishkin @ 2021-04-16 11:23 UTC (permalink / raw)
  To: Tao Zhang, Mathieu Poirier, Suzuki K Poulose
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang, alexander.shishkin

Tao Zhang <taozha@codeaurora.org> writes:

> Add property "coresight-name" for coresight component name. This
> allows coresight driver to read device name from device entries.
>
> Signed-off-by: Tao Zhang <taozha@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/arm/coresight.txt | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt
> index d711676..0e980ce 100644
> --- a/Documentation/devicetree/bindings/arm/coresight.txt
> +++ b/Documentation/devicetree/bindings/arm/coresight.txt
> @@ -103,6 +103,8 @@ its hardware characteristcs.
>  	  powers down the coresight component also powers down and loses its
>  	  context. This property is currently only used for the ETM 4.x driver.
>  
> +	* coresight-name: the name of the coresight devices.

Which devices? Also, is it a common practice to extend device tree
definitions based on arbitrary driver needs, or should there be some
sort of a discussion first?

Regards,
--
Alex

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

* Re: [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name
@ 2021-04-16 11:23     ` Alexander Shishkin
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Shishkin @ 2021-04-16 11:23 UTC (permalink / raw)
  To: Tao Zhang, Mathieu Poirier, Suzuki K Poulose
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang, alexander.shishkin

Tao Zhang <taozha@codeaurora.org> writes:

> Add property "coresight-name" for coresight component name. This
> allows coresight driver to read device name from device entries.
>
> Signed-off-by: Tao Zhang <taozha@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/arm/coresight.txt | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt
> index d711676..0e980ce 100644
> --- a/Documentation/devicetree/bindings/arm/coresight.txt
> +++ b/Documentation/devicetree/bindings/arm/coresight.txt
> @@ -103,6 +103,8 @@ its hardware characteristcs.
>  	  powers down the coresight component also powers down and loses its
>  	  context. This property is currently only used for the ETM 4.x driver.
>  
> +	* coresight-name: the name of the coresight devices.

Which devices? Also, is it a common practice to extend device tree
definitions based on arbitrary driver needs, or should there be some
sort of a discussion first?

Regards,
--
Alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] coresight: Add support for device names
  2021-04-16 11:19     ` Alexander Shishkin
  (?)
@ 2021-04-16 12:14     ` taozha
  -1 siblings, 0 replies; 11+ messages in thread
From: taozha @ 2021-04-16 12:14 UTC (permalink / raw)
  To: Alexander Shishkin
  Cc: Mathieu Poirier, Suzuki K Poulose, Mike Leach, Leo Yan,
	Greg Kroah-Hartman, coresight, linux-arm-kernel, linux-kernel,
	Tingwei Zhang, Mao Jinlong, Yuanfang Zhang

On 2021-04-16 19:19, Alexander Shishkin wrote:
> Tao Zhang <taozha@codeaurora.org> writes:
> 
>> diff --git a/drivers/hwtracing/coresight/coresight-core.c 
>> b/drivers/hwtracing/coresight/coresight-core.c
>> index 4ba801d..b79c726 100644
>> --- a/drivers/hwtracing/coresight/coresight-core.c
>> +++ b/drivers/hwtracing/coresight/coresight-core.c
>> @@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct 
>> coresight_dev_list *dict,
>>  	int idx;
>>  	char *name = NULL;
>>  	struct fwnode_handle **list;
>> +	struct device_node *node = dev->of_node;
>> +
>> +	if (!node) {
>> +		if (!of_property_read_string(node, "coresight-name", &name))
> 
> Ok, I'm not a device tree expert, but I'm pretty sure the above is a
> nop.
> 
> Regards,
> --
> Alex
You are right. The pointer check code here is wrong, I will correct it 
on the V2 version.

Tao

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

* [PATCH v1 1/2] coresight: Add support for device names
  2021-04-16  8:22 [PATCH v1 0/2] coresight: Add support for device names Tao Zhang
@ 2021-04-16  8:22 ` Tao Zhang
  0 siblings, 0 replies; 11+ messages in thread
From: Tao Zhang @ 2021-04-16  8:22 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: Tao Zhang, Mike Leach, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, Tingwei Zhang, Mao Jinlong,
	Yuanfang Zhang

Add support to read device names from device tree entries. Before
the previous process of allocating coresight device name, try to
read the coresight device name from device tree entries. If it is
read, the device name will be returned directly. If it is not read,
the original allocation name process will be followed.

Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
---
 drivers/hwtracing/coresight/coresight-core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 4ba801d..b79c726 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
 	int idx;
 	char *name = NULL;
 	struct fwnode_handle **list;
+	struct device_node *node = dev->of_node;
+
+	if (!node) {
+		if (!of_property_read_string(node, "coresight-name", &name))
+			return name;
+	}
 
 	mutex_lock(&coresight_mutex);
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

end of thread, other threads:[~2021-04-16 12:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16  8:07 [PATCH 0/2] *** SUBJECT HERE *** Tao Zhang
2021-04-16  8:07 ` [PATCH v1 1/2] coresight: Add support for device names Tao Zhang
2021-04-16 11:19   ` Alexander Shishkin
2021-04-16 11:19     ` Alexander Shishkin
2021-04-16 12:14     ` taozha
2021-04-16  8:07 ` [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name Tao Zhang
2021-04-16 11:23   ` Alexander Shishkin
2021-04-16 11:23     ` Alexander Shishkin
2021-04-16  8:11 ` [PATCH 0/2] *** SUBJECT HERE *** Greg Kroah-Hartman
2021-04-16  8:11   ` Greg Kroah-Hartman
2021-04-16  8:22 [PATCH v1 0/2] coresight: Add support for device names Tao Zhang
2021-04-16  8:22 ` [PATCH v1 1/2] " Tao Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.