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: <0c04e952-0b11-4249-9588-85edd0859bfd@arm.com>
Date: Wed, 10 Sep 2025 17:28:33 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: Alireza Sanaee <alireza.sanaee@...wei.com>, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: coresight@...ts.linaro.org, dianders@...omium.org,
 james.clark@...aro.org, jonathan.cameron@...wei.com, krzk@...nel.org,
 linux-arm-kernel@...ts.infradead.org, linux-perf-users@...r.kernel.org,
 linuxarm@...wei.com, mark.rutland@....com, mike.leach@...aro.org,
 robh@...nel.org, ruanjinjie@...wei.com, saravanak@...gle.com
Subject: Re: [PATCH v4 4/6] coresight: cti: Use of_cpu_phandle_to_id for
 grabbing CPU id

On 05/09/2025 17:18, Alireza Sanaee wrote:
> Use the newly created API (of_cpu_phandle_to_id) to grab CPU ID.
> 
> Reviewed-by: Mike Leach <mike.leach@...aro.org>
> Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
> Signed-off-by: Alireza Sanaee <alireza.sanaee@...wei.com>
> ---
>   .../hwtracing/coresight/coresight-cti-platform.c    | 13 +------------
>   1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-cti-platform.c b/drivers/hwtracing/coresight/coresight-cti-platform.c
> index d0ae10bf6128..2629962dbe3e 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-platform.c
> @@ -41,18 +41,7 @@
>    */
>   static int of_cti_get_cpu_at_node(const struct device_node *node)
>   {
> -	int cpu;
> -	struct device_node *dn;
> -
> -	if (node == NULL)
> -		return -1;
> -
> -	dn = of_parse_phandle(node, "cpu", 0);
> -	/* CTI affinity defaults to no cpu */
> -	if (!dn)
> -		return -1;
> -	cpu = of_cpu_node_to_id(dn);
> -	of_node_put(dn);
> +	int cpu = of_cpu_phandle_to_id(node, NULL, 0);
>   
>   	/* No Affinity  if no cpu nodes are found */
>   	return (cpu < 0) ? -1 : cpu;

Assuming this is going in via DT tree:

Acked-by: Suzuki K Poulose <suzuki.poulose@....com>

Suzuki


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ