Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95d5d878 authored by Neeti Desai's avatar Neeti Desai Committed by Liam Mark
Browse files

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_QCOM_SECURE_BUFFER is not enabled.

Change-Id: Ia5ca0c52f971a67c7936c64b42cd2522aa1773fa
Signed-off-by: default avatarNeeti Desai <neetid@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 166b5ed4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 Google, Inc
 * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-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
@@ -16,12 +16,11 @@
#include <linux/highmem.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/msm_ion.h>
#include <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <soc/qcom/scm.h>

#include <soc/qcom/secure_buffer.h>

DEFINE_MUTEX(secure_buffer_mutex);

@@ -48,7 +47,6 @@ struct info_list {
	u64 list_size;
};


#define MEM_PROT_ASSIGN_ID		0x16
#define MEM_PROTECT_LOCK_ID2		0x0A
#define MEM_PROTECT_LOCK_ID2_FLAT	0x11
@@ -163,7 +161,7 @@ static int secure_buffer_change_table(struct sg_table *table, int lock)
	return ret;
}

int msm_ion_secure_table(struct sg_table *table)
int msm_secure_table(struct sg_table *table)
{
	int ret;

@@ -175,7 +173,7 @@ int msm_ion_secure_table(struct sg_table *table)

}

int msm_ion_unsecure_table(struct sg_table *table)
int msm_unsecure_table(struct sg_table *table)
{
	int ret;

+47 −0
Original line number Diff line number Diff line
/*
 * 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 __QCOM_SECURE_BUFFER_H__
#define __QCOM_SECURE_BUFFER_H__


#ifdef CONFIG_QCOM_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