diff options
| author | Anthony Zhou <anzhou@nvidia.com> | 2016-07-04 04:31:30 -0400 |
|---|---|---|
| committer | Stephen Wolfe <swolfe@nvidia.com> | 2018-07-27 17:12:44 -0400 |
| commit | da468442a086845539fd5cebcf3f831aec69cd3a (patch) | |
| tree | 1076a3d57fcf94527655609d41d698f14135c4a6 /include/linux | |
| parent | e580ee51495f5e3c96796315ecd605a5e610debd (diff) | |
trusty: Add return check for IPA to PA
Check the return value of hyp_ipa_translate, if it is not 0,
report error and return.
Bug 200044390
Change-Id: Ic28a18164e162d5a399b4227f42f04cc97cedbce
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Reviewed-on: http://git-master/r/1241638
(cherry picked from commit 4e06cd93edec2d67c62d6fc9408e2690afbfc9fd)
Reviewed-on: https://git-master.nvidia.com/r/1488435
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Stephen Wolfe <swolfe@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/trusty/trusty.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h index a203e6943..41623faa9 100644 --- a/include/linux/trusty/trusty.h +++ b/include/linux/trusty/trusty.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/trusty/sm_err.h> | 19 | #include <linux/trusty/sm_err.h> |
| 20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
| 21 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
| 22 | #include <linux/tegra-soc.h> | ||
| 22 | 23 | ||
| 23 | enum { | 24 | enum { |
| 24 | TRUSTY_DEV_UNINIT = -1, | 25 | TRUSTY_DEV_UNINIT = -1, |
| @@ -33,9 +34,7 @@ s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2); | |||
| 33 | #ifdef CONFIG_64BIT | 34 | #ifdef CONFIG_64BIT |
| 34 | s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2); | 35 | s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2); |
| 35 | #endif | 36 | #endif |
| 36 | #ifdef CONFIG_TEGRA_VIRTUALIZATION | ||
| 37 | int hyp_ipa_translate(uint64_t *ipa); | 37 | int hyp_ipa_translate(uint64_t *ipa); |
| 38 | #endif | ||
| 39 | #else | 38 | #else |
| 40 | static inline s32 trusty_std_call32(struct device *dev, u32 smcnr, | 39 | static inline s32 trusty_std_call32(struct device *dev, u32 smcnr, |
| 41 | u32 a0, u32 a1, u32 a2) | 40 | u32 a0, u32 a1, u32 a2) |
