]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Make cpu_logical_map() take unsigned int
authorDavid Brazdil <dbrazdil@google.com>
Wed, 2 Dec 2020 18:41:03 +0000 (18:41 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 4 Dec 2020 08:44:24 +0000 (08:44 +0000)
commit3d2ef902e6d7dad8d9b03b1314ab1742970b716d
treed9e2d4c62b13524ab420c5ee1ae767cf4332c2c6
parent895a98f08570827b0ba5831acd2a4624b07defff
arm64: Make cpu_logical_map() take unsigned int

CPU index should never be negative. Change the signature of
(set_)cpu_logical_map to take an unsigned int.

This still works even if the users treat the CPU index as an int,
and will allow the hypervisor's implementation to check that the index
is valid with a single upper-bound check.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201202184122.26046-8-dbrazdil@google.com
arch/arm64/include/asm/smp.h
arch/arm64/kernel/setup.c