forked from mirrors/linux
		
	mem-buf: Add accessor for current_vmid
Allow other modules to access this variable. Change-Id: I4eb92e6ea7bed0fb854a7aafe355f33a09120389 Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
This commit is contained in:
		
							parent
							
								
									a375851b6a
								
							
						
					
					
						commit
						12058013a7
					
				
					 2 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -82,6 +82,12 @@ struct mem_buf_vm *pdata_array[] = {
 | 
			
		|||
	NULL,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
int mem_buf_current_vmid(void)
 | 
			
		||||
{
 | 
			
		||||
	return current_vmid;
 | 
			
		||||
}
 | 
			
		||||
EXPORT_SYMBOL(mem_buf_current_vmid);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Opening this file acquires a refcount on vm->dev's kobject - see
 | 
			
		||||
 * chrdev_open(). So private data won't be free'd out from
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,6 +104,7 @@ int mem_buf_reclaim(struct dma_buf *dmabuf);
 | 
			
		|||
void *mem_buf_alloc(struct mem_buf_allocation_data *alloc_data);
 | 
			
		||||
void mem_buf_free(void *membuf);
 | 
			
		||||
struct gh_sgl_desc *mem_buf_get_sgl(void *membuf);
 | 
			
		||||
int mem_buf_current_vmid(void);
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
static inline void *mem_buf_alloc(struct mem_buf_allocation_data *alloc_data)
 | 
			
		||||
| 
						 | 
				
			
			@ -117,6 +118,10 @@ static inline struct gh_sgl_desc *mem_buf_get_sgl(void *membuf)
 | 
			
		|||
{
 | 
			
		||||
	return ERR_PTR(-EINVAL);
 | 
			
		||||
}
 | 
			
		||||
static inline int mem_buf_current_vmid(void)
 | 
			
		||||
{
 | 
			
		||||
	return ERR_PTR(-EINVAL);
 | 
			
		||||
}
 | 
			
		||||
#endif /* CONFIG_QCOM_MEM_BUF */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue