From a6fd69993189436873bd5e6008a6a7433a3afe1d Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 18 Apr 2017 18:16:58 +0530 Subject: gpu: nvgpu: Add wrapper nvgpu/log2.h Add wrapper header file nvgpu/log2.h. It #includes in Linux. JIRA NVGPU-13 Change-Id: Ie434e62f7ef2dce7692b1c2c12b4ad6453f1534a Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1464719 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_as.c | 2 ++ drivers/gpu/nvgpu/common/mm/buddy_allocator.c | 1 + drivers/gpu/nvgpu/common/mm/page_allocator.c | 1 + drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 2 +- drivers/gpu/nvgpu/gp106/xve_gp106.h | 2 ++ drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | 1 + drivers/gpu/nvgpu/include/nvgpu/log2.h | 20 ++++++++++++++++++++ 8 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/log2.h diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index bedaea3d..d9316c7f 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c @@ -16,6 +16,8 @@ #include #include +#include + #include #include diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c index 59227e4e..36095710 100644 --- a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "gk20a/mm_gk20a.h" #include "gk20a/platform_gk20a.h" diff --git a/drivers/gpu/nvgpu/common/mm/page_allocator.c b/drivers/gpu/nvgpu/common/mm/page_allocator.c index 11d4ca73..6fbdbedd 100644 --- a/drivers/gpu/nvgpu/common/mm/page_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/page_allocator.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "buddy_allocator_priv.h" diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 519fa509..12bb3688 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "gk20a.h" #include "debug_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index e16b77b7..1db52c85 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -#include #include #include #include @@ -37,6 +36,7 @@ #include #include #include +#include #include "gk20a.h" #include "mm_gk20a.h" diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.h b/drivers/gpu/nvgpu/gp106/xve_gp106.h index 65c75bf0..2dbc1891 100644 --- a/drivers/gpu/nvgpu/gp106/xve_gp106.h +++ b/drivers/gpu/nvgpu/gp106/xve_gp106.h @@ -19,6 +19,8 @@ #include "gk20a/gk20a.h" +#include + int gp106_init_xve_ops(struct gpu_ops *gops); /* diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c index 019b2471..59e127b7 100644 --- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c @@ -15,6 +15,7 @@ #include #include +#include #include "fifo_gp10b.h" diff --git a/drivers/gpu/nvgpu/include/nvgpu/log2.h b/drivers/gpu/nvgpu/include/nvgpu/log2.h new file mode 100644 index 00000000..e08a01e4 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/log2.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 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_LOG2_H__ +#define __NVGPU_LOG2_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif /* __NVGPU_LOG2_H__ */ -- cgit v1.2.2