]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kernel: initialise cpu_logical_map from the DT
authorJavi Merino <javi.merino@arm.com>
Wed, 29 Aug 2012 08:47:19 +0000 (09:47 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 20 Mar 2013 17:26:24 +0000 (17:26 +0000)
commite3c4689695c50d610e309f35737cbf29999672c1
tree2af7dd584c30a3ce79cc912a4873bd743c6d08ca
parentbde4e2ac76c54d9d4775094836ee75d7f5d5c782
arm64: kernel: initialise cpu_logical_map from the DT

When booting the kernel, the cpu logical id map must be initialised
using device tree data passed by FW or through an embedded blob.

This patch parses the reg property in device tree "cpu" nodes,
retrieves the corresponding CPUs hardware identifiers (MPIDR) and
initialises the cpu logical map accordingly.

The device tree HW identifiers are considered valid if all CPU nodes
contain a "reg" property, there are no duplicate "reg" entries and the
DT defines a CPU node whose "reg" property defines affinity levels
that matches those of the boot CPU.

The primary CPU is assigned cpu logical number 0 to keep the current
convention valid.

Based on 508bf852e6e45194a839795ba8f92f83eb9daa0a (ARM: kernel: add
device tree init map function).

Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cputype.h
arch/arm64/include/asm/smp_plat.h [new file with mode: 0644]
arch/arm64/kernel/setup.c
arch/arm64/kernel/smp.c