summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNeeti Desai <neetid@codeaurora.org>2015-03-17 18:20:35 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:04:32 -0700
commitaa786020dea1f0d4cf7d33f7d04851ffd649a149 (patch)
treec4ccc7b5bf39666442571474eb7fcd88b91f915b /include
parent44c62ba19941f46f20ff81081edd81c96def4fb9 (diff)
msm: move types and declarations to header file
Move all function declarations and types to the header file to make the macros and definitions available even when the CONFIG_MSM_SECURE_BUFFER is not enabled. Rename rid of the msm_ion_secure_table and msm_ion_unsecure_table to something more generic. Change-Id: Ia5ca0c52f971a67c7936c64b42cd2522aa1773fa Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/soc/qcom/secure_buffer.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/soc/qcom/secure_buffer.h b/include/soc/qcom/secure_buffer.h
new file mode 100644
index 000000000000..8d168fdc1f3d
--- /dev/null
+++ b/include/soc/qcom/secure_buffer.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MSM_SECURE_BUFFER_H__
+#define __MSM_SECURE_BUFFER_H__
+
+
+#ifdef CONFIG_MSM_SECURE_BUFFER
+int msm_secure_table(struct sg_table *table);
+int msm_unsecure_table(struct sg_table *table);
+int msm_ion_hyp_assign_call(struct sg_table *table,
+ u32 *source_vm_list, u32 source_list_size,
+ u32 *dest_vm_list, u32 dest_list_size);
+bool msm_secure_v2_is_supported(void);
+
+#else
+static inline int msm_secure_table(struct sg_table *table)
+{
+ return -EINVAL;
+}
+static inline int msm_unsecure_table(struct sg_table *table)
+{
+ return -EINVAL;
+}
+static inline int hyp_assign_call(struct sg_table *table,
+ u32 *source_vm_list, u32 source_list_size,
+ u32 *dest_vm_list, u32 dest_list_size);
+{
+ return -EINVAL;
+}
+static inline bool msm_secure_v2_is_supported(void)
+{
+ return false;
+}
+#endif
+#endif