]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8616/1: dt: Respect property size when parsing CPUs
authorRobin Murphy <robin.murphy@arm.com>
Mon, 26 Sep 2016 15:50:55 +0000 (16:50 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 29 Sep 2016 15:57:43 +0000 (16:57 +0100)
commit7b40bd086598f233c5a2791af1db66bc9f22ea03
tree9bd09872a666fa24a3b698765d15a0d44b495314
parent5d95ef1510a450907ef6dcf9a846fdc2f686bd83
ARM: 8616/1: dt: Respect property size when parsing CPUs

Whilst MPIDR values themselves are less than 32 bits, it is still
perfectly valid for a DT to have #address-cells > 1 in the CPUs node,
resulting in the "reg" property having leading zero cell(s). In that
situation, the big-endian nature of the data conspires with the current
behaviour of only reading the first cell to cause the kernel to think
all CPUs have ID 0, and become resoundingly unhappy as a consequence.

Take the full property length into account when parsing CPUs so as to
be correct under any circumstances.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/devtree.c