From f116320137b0eb835bcbf704d34fc8f7880595d2 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 31 Mar 2017 13:11:29 -0700 Subject: gpu: nvgpu: Add wrapper for linux/types.h Add wrapper header nvgpu/types.h. It checks if build is for Linux kernel and pulls in linux/types.h. Delete also all #includes for linux/types.h which are not strictly necessary, and change the remaining ones to use the new wrapper. JIRA NVGPU-13 Change-Id: I1ddfef0b0b9d840e3e41a62f69c7cb9148d2d5fa Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1453371 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | 2 -- drivers/gpu/nvgpu/gk20a/fb_gk20a.c | 1 - drivers/gpu/nvgpu/gk20a/fence_gk20a.h | 1 - drivers/gpu/nvgpu/gk20a/gk20a_gating_reglist.c | 1 - drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 1 - drivers/gpu/nvgpu/gk20a/mc_gk20a.c | 1 - drivers/gpu/nvgpu/gk20a/sync_gk20a.h | 1 - drivers/gpu/nvgpu/gm20b/fb_gm20b.c | 2 -- drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c | 1 - drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 1 - drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 -- drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 1 - drivers/gpu/nvgpu/gm20b/mc_gm20b.c | 2 -- drivers/gpu/nvgpu/gp106/fb_gp106.c | 1 - drivers/gpu/nvgpu/gp106/gp106_gating_reglist.c | 1 - drivers/gpu/nvgpu/gp106/hal_gp106.c | 3 --- drivers/gpu/nvgpu/gp106/ltc_gp106.c | 2 -- drivers/gpu/nvgpu/gp10b/fb_gp10b.c | 2 -- drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | 1 - drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c | 1 - drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 2 -- drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 2 -- drivers/gpu/nvgpu/gp10b/mc_gp10b.c | 2 -- drivers/gpu/nvgpu/include/nvgpu/bios.h | 2 +- drivers/gpu/nvgpu/include/nvgpu/types.h | 20 ++++++++++++++++++++ drivers/gpu/nvgpu/platform_tegra.h | 2 +- 26 files changed, 22 insertions(+), 36 deletions(-) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/types.h diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h index c3136023..8b1f85a1 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h @@ -18,8 +18,6 @@ #ifndef _GK20A_CHANNEL_SYNC_H_ #define _GK20A_CHANNEL_SYNC_H_ -#include - struct gk20a_channel_sync; struct priv_cmd_entry; struct channel_gk20a; diff --git a/drivers/gpu/nvgpu/gk20a/fb_gk20a.c b/drivers/gpu/nvgpu/gk20a/fb_gk20a.c index 28dfee01..44f0ac4c 100644 --- a/drivers/gpu/nvgpu/gk20a/fb_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fb_gk20a.c @@ -13,7 +13,6 @@ * more details. */ -#include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h index 9d9fde85..fccf0c27 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h @@ -17,7 +17,6 @@ #ifndef _GK20A_FENCE_H_ #define _GK20A_FENCE_H_ -#include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_gating_reglist.c b/drivers/gpu/nvgpu/gk20a/gk20a_gating_reglist.c index dc1c0afb..e218ce94 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_gating_reglist.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_gating_reglist.c @@ -20,7 +20,6 @@ #ifndef __gk20a_gating_reglist_h__ #define __gk20a_gating_reglist_h__ -#include #include "gk20a_gating_reglist.h" struct gating_desc { diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index aabe673a..5c1350d3 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c index de90355d..18fd3648 100644 --- a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c @@ -13,7 +13,6 @@ * more details. */ -#include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h index 5dcdfe15..33112bb3 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h @@ -18,7 +18,6 @@ #ifndef _GK20A_SYNC_H_ #define _GK20A_SYNC_H_ -#include #include struct sync_timeline; diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c index b50cb2d1..9c5b730b 100644 --- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gk20a/kind_gk20a.h" #include "gk20a/fb_gk20a.h" diff --git a/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c b/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c index 3cd4e968..00e7cce0 100644 --- a/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c +++ b/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c @@ -20,7 +20,6 @@ #ifndef __gm20b_gating_reglist_h__ #define __gm20b_gating_reglist_h__ -#include #include "gm20b_gating_reglist.h" struct gating_desc { diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index a43fcdab..7d9e47d6 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -13,7 +13,6 @@ * more details. */ -#include #include #include #include diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 5e19a5ae..bfae27c0 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/css_gr_gk20a.h" diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index a2c46600..491112fc 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c @@ -13,7 +13,6 @@ * more details. */ -#include #include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/gm20b/mc_gm20b.c b/drivers/gpu/nvgpu/gm20b/mc_gm20b.c index 7d0d052d..05504e82 100644 --- a/drivers/gpu/nvgpu/gm20b/mc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/mc_gm20b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gk20a/mc_gk20a.h" #include "mc_gm20b.h" diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.c b/drivers/gpu/nvgpu/gp106/fb_gp106.c index 81c52677..b2e264cd 100644 --- a/drivers/gpu/nvgpu/gp106/fb_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fb_gp106.c @@ -11,7 +11,6 @@ * more details. */ -#include #include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/gp106/gp106_gating_reglist.c b/drivers/gpu/nvgpu/gp106/gp106_gating_reglist.c index 0b6b8beb..5f85f0bf 100644 --- a/drivers/gpu/nvgpu/gp106/gp106_gating_reglist.c +++ b/drivers/gpu/nvgpu/gp106/gp106_gating_reglist.c @@ -16,7 +16,6 @@ #ifndef __gp106_gating_reglist_h__ #define __gp106_gating_reglist_h__ -#include #include "gp106_gating_reglist.h" struct gating_desc { diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 80ec8525..e8ea2e8d 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -13,11 +13,8 @@ * more details. */ -#include #include -#include - #include "gk20a/gk20a.h" #include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/css_gr_gk20a.h" diff --git a/drivers/gpu/nvgpu/gp106/ltc_gp106.c b/drivers/gpu/nvgpu/gp106/ltc_gp106.c index b162ddb3..755e4b05 100644 --- a/drivers/gpu/nvgpu/gp106/ltc_gp106.c +++ b/drivers/gpu/nvgpu/gp106/ltc_gp106.c @@ -11,8 +11,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gm20b/ltc_gm20b.h" #include "gp10b/ltc_gp10b.h" diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c index db4716f3..aa6b543a 100644 --- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gm20b/fb_gm20b.h" #include "gk20a/kind_gk20a.h" diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c index 6f576e3f..6f1a0298 100644 --- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c @@ -14,7 +14,6 @@ */ #include -#include #include "fifo_gp10b.h" diff --git a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c index 563819de..afb933e9 100644 --- a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c +++ b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c @@ -20,7 +20,6 @@ #ifndef __gp10b_gating_reglist_h__ #define __gp10b_gating_reglist_h__ -#include #include "gp10b_gating_reglist.h" struct gating_desc { diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index fc1168f5..95fdccea 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -13,10 +13,8 @@ * more details. */ -#include #include #include -#include #include "gk20a/gk20a.h" #include "gk20a/dbg_gpu_gk20a.h" diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index 9a11d90b..e1aa34a9 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c index 4a8dc4c1..5842cb62 100644 --- a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c @@ -13,8 +13,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "gk20a/mc_gk20a.h" diff --git a/drivers/gpu/nvgpu/include/nvgpu/bios.h b/drivers/gpu/nvgpu/include/nvgpu/bios.h index 6fbf068c..edd4e08c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/bios.h +++ b/drivers/gpu/nvgpu/include/nvgpu/bios.h @@ -14,7 +14,7 @@ #ifndef NVGPU_BIOS_H #define NVGPU_BIOS_H -#include +#include struct gk20a; diff --git a/drivers/gpu/nvgpu/include/nvgpu/types.h b/drivers/gpu/nvgpu/include/nvgpu/types.h new file mode 100644 index 00000000..4bfdddb7 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/types.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_TYPES_H__ +#define __NVGPU_TYPES_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif diff --git a/drivers/gpu/nvgpu/platform_tegra.h b/drivers/gpu/nvgpu/platform_tegra.h index 815ac657..63aed5a7 100644 --- a/drivers/gpu/nvgpu/platform_tegra.h +++ b/drivers/gpu/nvgpu/platform_tegra.h @@ -16,7 +16,7 @@ #ifndef _NVGPU_PLATFORM_TEGRA_H_ #define _NVGPU_PLATFORM_TEGRA_H_ -#include +#include struct platform_device; struct gr_ctx_buffer_desc; -- cgit v1.2.2