linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RESEND] of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered
@ 2017-08-14 16:18 Sudeep Holla
  2017-08-17 15:49 ` Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Sudeep Holla @ 2017-08-14 16:18 UTC (permalink / raw)
  To: devicetree; +Cc: Sudeep Holla, linux-kernel, Rob Herring, Frank Rowand

Instead of the callsites choosing between of_cpu_device_node_get if the
CPUs are registered as of_node is populated by then and of_get_cpu_node
when the CPUs are not yet registered as CPU of_nodes are not yet stashed
thereby needing to parse the device tree, we can call of_get_cpu_node
in case the CPUs are not yet registered in of_cpu_device_node_get.

This will allow to use of_cpu_device_node_get anywhere hiding the
details from the caller.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 include/linux/of_device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Rob,

You have already acked this patch, but I wanted you to pick up this via
your tree and hence I am resending it. I tried pinging on that thread
but I can understand that it's lost in your mailbox :)

Regards,
Sudeep

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index b4ad8b4f8506..611502524425 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -50,7 +50,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
 	struct device *cpu_dev;
 	cpu_dev = get_cpu_device(cpu);
 	if (!cpu_dev)
-		return NULL;
+		return of_get_cpu_node(cpu, NULL);
 	return of_node_get(cpu_dev->of_node);
 }

--
2.7.4

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

* Re: [PATCH][RESEND] of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered
  2017-08-14 16:18 [PATCH][RESEND] of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered Sudeep Holla
@ 2017-08-17 15:49 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2017-08-17 15:49 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: Sudeep Holla, linux-kernel, Rob Herring, Frank Rowand

Hi Rob,

On 14/08/17 17:18, Sudeep Holla wrote:
> Instead of the callsites choosing between of_cpu_device_node_get if the
> CPUs are registered as of_node is populated by then and of_get_cpu_node
> when the CPUs are not yet registered as CPU of_nodes are not yet stashed
> thereby needing to parse the device tree, we can call of_get_cpu_node
> in case the CPUs are not yet registered in of_cpu_device_node_get.
> 
> This will allow to use of_cpu_device_node_get anywhere hiding the
> details from the caller.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  include/linux/of_device.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi Rob,
> 
> You have already acked this patch, but I wanted you to pick up this via
> your tree and hence I am resending it. I tried pinging on that thread
> but I can understand that it's lost in your mailbox :)
> 

Gentle ping!

-- 
Regards,
Sudeep

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

end of thread, other threads:[~2017-08-17 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14 16:18 [PATCH][RESEND] of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered Sudeep Holla
2017-08-17 15:49 ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).