]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: psci: support unsigned return values
authorMark Rutland <mark.rutland@arm.com>
Mon, 20 Apr 2015 13:51:00 +0000 (14:51 +0100)
committerMark Rutland <mark.rutland@arm.com>
Wed, 27 May 2015 12:22:02 +0000 (13:22 +0100)
commit2e344e0e661c2267cf7139ae645cffeb23ef22b3
treef497d099c7422369f8eee6e32fb4a8aefec0a2d1
parentd782d52333068c1a98368b58e73009db1060aec9
arm64: psci: support unsigned return values

PSCI_VERSION and MIGRATE_INFO_TYPE_UP_CPU return unsigned values, with
the latter returning a 64-bit value. However, the PSCI invocation
functions have prototypes returning int.

This patch upgrades the invocation functions to return unsigned long,
with a new typedef to keep things legible. As PSCI_VERSION cannot return
a negative value, the erroneous check against PSCI_RET_NOT_SUPPORTED is
also removed. The unrelated psci_initcall_t typedef is moved closer to
its first user, to avoid confusion with the invocation functions.

In preparation for sharing the code with ARM, unsigned long is used in
preference of u64. In the SMC32 calling convention, the relevant fields
will be 32 bits wide.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/psci.c