linux/arch/arm64
Lorenzo Pieralisi 819a88263d ARM64: kernel: make cpu_ops hooks DT agnostic
ARM64 CPU operations such as cpu_init and cpu_init_idle take
a struct device_node pointer as a parameter, which corresponds to
the device tree node of the logical cpu on which the operation
has to be applied.

With the advent of ACPI on arm64, where MADT static table entries
are used to initialize cpus, the device tree node parameter
in cpu_ops hooks become useless when booting with ACPI, since
in that case cpu device tree nodes are not present and can not be
used for cpu initialization.

The current cpu_init hook requires a struct device_node pointer
parameter because it is called while parsing the device tree to
initialize CPUs, when the cpu_logical_map (that is used to match
a cpu node reg property to a device tree node) for a given logical
cpu id is not set up yet. This means that the cpu_init hook cannot
rely on the of_get_cpu_node function to retrieve the device tree
node corresponding to the logical cpu id passed in as parameter,
so the cpu device tree node must be passed in as a parameter to fix
this catch-22 dependency cycle.

This patch reshuffles the cpu_logical_map initialization code so
that the cpu_init cpu_ops hook can safely use the of_get_cpu_node
function to retrieve the cpu device tree node, removing the need for
the device tree node pointer parameter.

In the process, the patch removes device tree node parameters
from all cpu_ops hooks, in preparation for SMP DT/ACPI cpus
initialization consolidation.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Mark Rutland <mark.rutland@arm.com> [DT]
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-05-19 16:09:29 +01:00
..
boot ARM64: juno: add sp810 support and fix sp804 clock frequency 2015-05-12 16:39:28 +02:00
configs ARM: SoC 64-bit changes for v4.1 2015-04-22 09:23:58 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-05-11 11:05:13 -07:00
include ARM64: kernel: make cpu_ops hooks DT agnostic 2015-05-19 16:09:29 +01:00
kernel ARM64: kernel: make cpu_ops hooks DT agnostic 2015-05-19 16:09:29 +01:00
kvm arm64 updates for 4.1: 2015-04-16 13:58:29 -05:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: mm: Fix build error with CONFIG_SPARSEMEM_VMEMMAP disabled 2015-05-05 12:22:17 +01:00
net arm64: bpf: fix signedness bug in loading 64-bit immediate 2015-05-08 16:15:07 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig ARM64: Enable CONFIG_GENERIC_IRQ_SHOW_LEVEL 2015-04-27 11:39:05 +01:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Makefile arm64: Adjust EFI libstub object include logic 2015-03-17 16:59:47 +00:00