]> git.baikalelectronics.ru Git - kernel.git/commit
of: Make cpu node handling more portable.
authorDavid Miller <davem@davemloft.net>
Thu, 3 Oct 2013 21:24:51 +0000 (17:24 -0400)
committerGrant Likely <grant.likely@linaro.org>
Tue, 15 Oct 2013 19:09:10 +0000 (20:09 +0100)
commit8fc5500964ff097d531f945787f89c23dabd91e7
tree061b56dbd9e656730262445b373bacd399c0678e
parent660633cb2bc790dabd48da078546b5f92e12f423
of: Make cpu node handling more portable.

Use for_each_node_by_type() to iterate all cpu nodes in the
system.

Provide and overridable function arch_find_n_match_cpu_physical_id,
which sees if the given device node matches 'cpu' and if so sets
'*thread' when non-NULL to the cpu thread number within the core.

The default implementation behaves the same as the existing code.

Add a sparc64 implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
arch/sparc/kernel/prom_64.c
drivers/of/base.c
include/linux/cpu.h