lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1618560476-28908-2-git-send-email-taozha@codeaurora.org>
Date:   Fri, 16 Apr 2021 16:07:55 +0800
From:   Tao Zhang <taozha@...eaurora.org>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Tao Zhang <taozha@...eaurora.org>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Tingwei Zhang <tingwei@...eaurora.org>,
        Mao Jinlong <jinlmao@...eaurora.org>,
        Yuanfang Zhang <zhangyuanfang@...eaurora.org>
Subject: [PATCH v1 1/2] coresight: Add support for device names

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@...eaurora.org>
Signed-off-by: Tao Zhang <taozha@...eaurora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ