mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Translate as_alloc flags
Translate the as_alloc flags so that the common/as.c code no longer needs to include <uapi/linux/nvgpu.h>. This was an oversight from prior MM unification efforts which was caught by the userspace POSIX build on QNX. JIRA NVGPU-525 Change-Id: I6af6cb9904c2ae9edeb8dbb970846c31b56822bf Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1720918 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Sourab Gupta <sourabg@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7abf697204
commit
2203d03302
@@ -55,6 +55,16 @@ struct gk20a_ctrl_priv {
|
||||
struct nvgpu_clk_session *clk_session;
|
||||
};
|
||||
|
||||
static u32 gk20a_as_translate_as_alloc_flags(struct gk20a *g, u32 flags)
|
||||
{
|
||||
u32 core_flags = 0;
|
||||
|
||||
if (flags & NVGPU_GPU_IOCTL_ALLOC_AS_FLAGS_USERSPACE_MANAGED)
|
||||
core_flags |= NVGPU_AS_ALLOC_USERSPACE_MANAGED;
|
||||
|
||||
return core_flags;
|
||||
}
|
||||
|
||||
int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct nvgpu_os_linux *l;
|
||||
@@ -439,7 +449,9 @@ static int gk20a_ctrl_alloc_as(
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
err = gk20a_as_alloc_share(g, args->big_page_size, args->flags,
|
||||
err = gk20a_as_alloc_share(g, args->big_page_size,
|
||||
gk20a_as_translate_as_alloc_flags(g,
|
||||
args->flags),
|
||||
&as_share);
|
||||
if (err)
|
||||
goto clean_up_file;
|
||||
|
||||
Reference in New Issue
Block a user