of: move of_get_cpu_node implementation to DT core library
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Thu, 15 Aug 2013 13:01:40 +0000 (14:01 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 11 Dec 2013 22:33:08 +0000 (22:33 +0000)
commit6e2bb9193fc2161ae2a5cfd11590aa9c0ae8a80d
tree54c3de0359453073a8d9387bc889938c3681fd01
parent8bb495e3f02401ee6f76d1b1d77f3ac9f079e376
of: move of_get_cpu_node implementation to DT core library

This patch moves the generalized implementation of of_get_cpu_node from
PowerPC to DT core library, thereby adding support for retrieving cpu
node for a given logical cpu index on any architecture.

The CPU subsystem can now use this function to assign of_node in the
cpu device while registering CPUs.

It is recommended to use these helper function only in pre-SMP/early
initialisation stages to retrieve CPU device node pointers in logical
ordering. Once the cpu devices are registered, it can be retrieved easily
from cpu device of_node which avoids unnecessary parsing and matching.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
(cherry picked from commit 183912d352a242a276a7877852f107459a13aff9)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/powerpc/include/asm/prom.h
arch/powerpc/kernel/prom.c
drivers/of/base.c
include/linux/cpu.h
include/linux/of.h