]> 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)
commit9b65257b71d295fce2b0833cf6b239c414c6adda
tree009a67f0d3341aeb601496101dbdaf5ee8f1bf35
parentf3e6efa221dd83b2c982af3914deb8491fa8fc95
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