]> git.baikalelectronics.ru Git - kernel.git/commit
smccc: Use separate variables for args and results
authorAndrew Scull <ascull@google.com>
Tue, 15 Sep 2020 10:46:40 +0000 (11:46 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 15 Sep 2020 17:39:04 +0000 (18:39 +0100)
commita364de9393086d5019f21a6eef99901636b0ef50
tree009a67f0d3341aeb601496101dbdaf5ee8f1bf35
parent3e043c0e9ba23c5198fd7971a1033c879d35c238
smccc: Use separate variables for args and results

Using the same register-bound variable for both arguments and results
means these values share a type. That type must allow the arguments to
be assigned to it and must also be assignable to the unsigned long
fields of struct arm_smccc_res.

This restriction on types causes compiler warnings when the argument
cannot be implicitly assigned to an unsigned long, for example the
pointers that are used in the KVM hyp interface.

By separating the arguments and results into their own variables, the
type constraint is lifted allowing the arguments to avoid the need for
any type conversion.

Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20200915104643.2543892-17-ascull@google.com
include/linux/arm-smccc.h