109 lines
4.7 KiB
Diff
109 lines
4.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: weideng <wei.a.deng@intel.com>
|
|
Date: Fri, 13 May 2016 10:36:16 +0800
|
|
Subject: [PATCH] Modify the static analysis errors for google's trusty driver
|
|
patches.
|
|
|
|
Totally 15 patches for Google's trusty driver are ported into kernel/glv.
|
|
This patch will fix all of the static analysis errors for the 15 patches
|
|
from google.
|
|
|
|
Change-Id: I38c604cc010f1e93fda6a06d1f9410ab578656df
|
|
Signed-off-by: weideng <wei.a.deng@intel.com>
|
|
---
|
|
drivers/trusty/trusty.c | 4 ++--
|
|
include/linux/trusty/smcall.h | 32 ++++++++++++++++----------------
|
|
2 files changed, 18 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/drivers/trusty/trusty.c b/drivers/trusty/trusty.c
|
|
index 2a7aeb4725c5..6fcd5481ac88 100644
|
|
--- a/drivers/trusty/trusty.c
|
|
+++ b/drivers/trusty/trusty.c
|
|
@@ -39,8 +39,8 @@ struct trusty_state {
|
|
#define SMC_ARG2 "x2"
|
|
#define SMC_ARG3 "x3"
|
|
#define SMC_ARCH_EXTENSION ""
|
|
-#define SMC_REGISTERS_TRASHED "x4","x5","x6","x7","x8","x9","x10","x11", \
|
|
- "x12","x13","x14","x15","x16","x17"
|
|
+#define SMC_REGISTERS_TRASHED "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", \
|
|
+ "x12", "x13", "x14", "x15", "x16", "x17"
|
|
#else
|
|
#define SMC_ARG0 "r0"
|
|
#define SMC_ARG1 "r1"
|
|
diff --git a/include/linux/trusty/smcall.h b/include/linux/trusty/smcall.h
|
|
index 2e43803d9333..1160890a3d90 100644
|
|
--- a/include/linux/trusty/smcall.h
|
|
+++ b/include/linux/trusty/smcall.h
|
|
@@ -55,8 +55,8 @@
|
|
#define SMC_ENTITY_SECURE_MONITOR 60 /* Trusted OS calls internal to secure monitor */
|
|
|
|
/* FC = Fast call, SC = Standard call */
|
|
-#define SMC_SC_RESTART_LAST SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 0)
|
|
-#define SMC_SC_LOCKED_NOP SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 1)
|
|
+#define SMC_SC_RESTART_LAST SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
|
|
+#define SMC_SC_LOCKED_NOP SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 1)
|
|
|
|
/**
|
|
* SMC_SC_RESTART_FIQ - Re-enter trusty after it was interrupted by an fiq
|
|
@@ -68,7 +68,7 @@
|
|
*
|
|
* Enable by selecting api version TRUSTY_API_VERSION_RESTART_FIQ (1) or later.
|
|
*/
|
|
-#define SMC_SC_RESTART_FIQ SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 2)
|
|
+#define SMC_SC_RESTART_FIQ SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 2)
|
|
|
|
/**
|
|
* SMC_SC_NOP - Enter trusty to run pending work.
|
|
@@ -80,27 +80,27 @@
|
|
*
|
|
* Enable by selecting api version TRUSTY_API_VERSION_SMP (2) or later.
|
|
*/
|
|
-#define SMC_SC_NOP SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 3)
|
|
+#define SMC_SC_NOP SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 3)
|
|
|
|
/*
|
|
* Return from secure os to non-secure os with return value in r1
|
|
*/
|
|
-#define SMC_SC_NS_RETURN SMC_STDCALL_NR (SMC_ENTITY_SECURE_MONITOR, 0)
|
|
+#define SMC_SC_NS_RETURN SMC_STDCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
|
|
|
|
-#define SMC_FC_RESERVED SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 0)
|
|
-#define SMC_FC_FIQ_EXIT SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 1)
|
|
-#define SMC_FC_REQUEST_FIQ SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 2)
|
|
-#define SMC_FC_GET_NEXT_IRQ SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 3)
|
|
-#define SMC_FC_FIQ_ENTER SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 4)
|
|
+#define SMC_FC_RESERVED SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 0)
|
|
+#define SMC_FC_FIQ_EXIT SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 1)
|
|
+#define SMC_FC_REQUEST_FIQ SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 2)
|
|
+#define SMC_FC_GET_NEXT_IRQ SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 3)
|
|
+#define SMC_FC_FIQ_ENTER SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 4)
|
|
|
|
#define SMC_FC64_SET_FIQ_HANDLER SMC_FASTCALL64_NR(SMC_ENTITY_SECURE_MONITOR, 5)
|
|
-#define SMC_FC64_GET_FIQ_REGS SMC_FASTCALL64_NR (SMC_ENTITY_SECURE_MONITOR, 6)
|
|
+#define SMC_FC64_GET_FIQ_REGS SMC_FASTCALL64_NR(SMC_ENTITY_SECURE_MONITOR, 6)
|
|
|
|
-#define SMC_FC_CPU_SUSPEND SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 7)
|
|
-#define SMC_FC_CPU_RESUME SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 8)
|
|
+#define SMC_FC_CPU_SUSPEND SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 7)
|
|
+#define SMC_FC_CPU_RESUME SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 8)
|
|
|
|
-#define SMC_FC_AARCH_SWITCH SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 9)
|
|
-#define SMC_FC_GET_VERSION_STR SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 10)
|
|
+#define SMC_FC_AARCH_SWITCH SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 9)
|
|
+#define SMC_FC_GET_VERSION_STR SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 10)
|
|
|
|
/**
|
|
* SMC_FC_API_VERSION - Find and select supported API version.
|
|
@@ -121,7 +121,7 @@
|
|
#define TRUSTY_API_VERSION_RESTART_FIQ (1)
|
|
#define TRUSTY_API_VERSION_SMP (2)
|
|
#define TRUSTY_API_VERSION_CURRENT (2)
|
|
-#define SMC_FC_API_VERSION SMC_FASTCALL_NR (SMC_ENTITY_SECURE_MONITOR, 11)
|
|
+#define SMC_FC_API_VERSION SMC_FASTCALL_NR(SMC_ENTITY_SECURE_MONITOR, 11)
|
|
|
|
/* TRUSTED_OS entity calls */
|
|
#define SMC_SC_VIRTIO_GET_DESCR SMC_STDCALL_NR(SMC_ENTITY_TRUSTED_OS, 20)
|
|
--
|
|
https://clearlinux.org
|
|
|