From 1e355ca52e2b3ac5f4e433e1bb115f6fd8499954 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 23 Mar 2017 12:49:58 -0700 Subject: gpu: nvgpu: Split as code to as IOCTL and common Split as_gk20a.c into two parts: common/linux/ioctl_as.c deals with as related devnodes and ioctls. This file contains all the Linux specific parts of as_gk20a.c. common/as.c deals with general as_gk20a maintenance and is Linux independent. JIRA NVGPU-16 Change-Id: I2d8541e0bd6ce159dc6e4de8e819dfcff0fa8f80 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1330803 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/as.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/as.h (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/as.h b/drivers/gpu/nvgpu/include/nvgpu/as.h new file mode 100644 index 00000000..0e784396 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/as.h @@ -0,0 +1,36 @@ +/* + * GK20A Address Spaces + * + * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope 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 __NVGPU_AS_H__ +#define __NVGPU_AS_H__ + +struct vm_gk20a; + +struct gk20a_as_share { + struct gk20a_as *as; + int id; + struct vm_gk20a *vm; +}; + +struct gk20a_as { + int last_share_id; /* dummy allocator for now */ +}; + +int gk20a_as_release_share(struct gk20a_as_share *as_share); + +/* if big_page_size == 0, the default big page size is used */ +int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size, + u32 flags, struct gk20a_as_share **out); + +#endif -- cgit v1.2.2