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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1453371
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-03-31 13:11:29 -07:00
committed by mobile promotions
parent 2119213467
commit f116320137
26 changed files with 22 additions and 36 deletions

View File

@@ -18,8 +18,6 @@
#ifndef _GK20A_CHANNEL_SYNC_H_ #ifndef _GK20A_CHANNEL_SYNC_H_
#define _GK20A_CHANNEL_SYNC_H_ #define _GK20A_CHANNEL_SYNC_H_
#include <linux/types.h>
struct gk20a_channel_sync; struct gk20a_channel_sync;
struct priv_cmd_entry; struct priv_cmd_entry;
struct channel_gk20a; struct channel_gk20a;

View File

@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <trace/events/gk20a.h> #include <trace/events/gk20a.h>
#include <linux/delay.h> #include <linux/delay.h>

View File

@@ -17,7 +17,6 @@
#ifndef _GK20A_FENCE_H_ #ifndef _GK20A_FENCE_H_
#define _GK20A_FENCE_H_ #define _GK20A_FENCE_H_
#include <linux/types.h>
#include <linux/kref.h> #include <linux/kref.h>
#include <linux/wait.h> #include <linux/wait.h>

View File

@@ -20,7 +20,6 @@
#ifndef __gk20a_gating_reglist_h__ #ifndef __gk20a_gating_reglist_h__
#define __gk20a_gating_reglist_h__ #define __gk20a_gating_reglist_h__
#include <linux/types.h>
#include "gk20a_gating_reglist.h" #include "gk20a_gating_reglist.h"
struct gating_desc { struct gating_desc {

View File

@@ -18,7 +18,6 @@
#include <linux/devfreq.h> #include <linux/devfreq.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/types.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <soc/tegra/chip-id.h> #include <soc/tegra/chip-id.h>

View File

@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <trace/events/gk20a.h> #include <trace/events/gk20a.h>

View File

@@ -18,7 +18,6 @@
#ifndef _GK20A_SYNC_H_ #ifndef _GK20A_SYNC_H_
#define _GK20A_SYNC_H_ #define _GK20A_SYNC_H_
#include <linux/types.h>
#include <linux/version.h> #include <linux/version.h>
struct sync_timeline; struct sync_timeline;

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/kind_gk20a.h" #include "gk20a/kind_gk20a.h"
#include "gk20a/fb_gk20a.h" #include "gk20a/fb_gk20a.h"

View File

@@ -20,7 +20,6 @@
#ifndef __gm20b_gating_reglist_h__ #ifndef __gm20b_gating_reglist_h__
#define __gm20b_gating_reglist_h__ #define __gm20b_gating_reglist_h__
#include <linux/types.h>
#include "gm20b_gating_reglist.h" #include "gm20b_gating_reglist.h"
struct gating_desc { struct gating_desc {

View File

@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/dbg_gpu_gk20a.h"
#include "gk20a/css_gr_gk20a.h" #include "gk20a/css_gr_gk20a.h"

View File

@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <trace/events/gk20a.h> #include <trace/events/gk20a.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/mc_gk20a.h" #include "gk20a/mc_gk20a.h"
#include "mc_gm20b.h" #include "mc_gm20b.h"

View File

@@ -11,7 +11,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <linux/delay.h> #include <linux/delay.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"

View File

@@ -16,7 +16,6 @@
#ifndef __gp106_gating_reglist_h__ #ifndef __gp106_gating_reglist_h__
#define __gp106_gating_reglist_h__ #define __gp106_gating_reglist_h__
#include <linux/types.h>
#include "gp106_gating_reglist.h" #include "gp106_gating_reglist.h"
struct gating_desc { struct gating_desc {

View File

@@ -13,11 +13,8 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <linux/printk.h> #include <linux/printk.h>
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/dbg_gpu_gk20a.h"
#include "gk20a/css_gr_gk20a.h" #include "gk20a/css_gr_gk20a.h"

View File

@@ -11,8 +11,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gm20b/ltc_gm20b.h" #include "gm20b/ltc_gm20b.h"
#include "gp10b/ltc_gp10b.h" #include "gp10b/ltc_gp10b.h"

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gm20b/fb_gm20b.h" #include "gm20b/fb_gm20b.h"
#include "gk20a/kind_gk20a.h" #include "gk20a/kind_gk20a.h"

View File

@@ -14,7 +14,6 @@
*/ */
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/types.h>
#include "fifo_gp10b.h" #include "fifo_gp10b.h"

View File

@@ -20,7 +20,6 @@
#ifndef __gp10b_gating_reglist_h__ #ifndef __gp10b_gating_reglist_h__
#define __gp10b_gating_reglist_h__ #define __gp10b_gating_reglist_h__
#include <linux/types.h>
#include "gp10b_gating_reglist.h" #include "gp10b_gating_reglist.h"
struct gating_desc { struct gating_desc {

View File

@@ -13,10 +13,8 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <linux/printk.h> #include <linux/printk.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/dbg_gpu_gk20a.h"

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include <dt-bindings/memory/tegra-swgroup.h> #include <dt-bindings/memory/tegra-swgroup.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"

View File

@@ -13,8 +13,6 @@
* more details. * more details.
*/ */
#include <linux/types.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/mc_gk20a.h" #include "gk20a/mc_gk20a.h"

View File

@@ -14,7 +14,7 @@
#ifndef NVGPU_BIOS_H #ifndef NVGPU_BIOS_H
#define NVGPU_BIOS_H #define NVGPU_BIOS_H
#include <linux/types.h> #include <nvgpu/types.h>
struct gk20a; struct gk20a;

View File

@@ -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 <linux/types.h>
#endif
#endif

View File

@@ -16,7 +16,7 @@
#ifndef _NVGPU_PLATFORM_TEGRA_H_ #ifndef _NVGPU_PLATFORM_TEGRA_H_
#define _NVGPU_PLATFORM_TEGRA_H_ #define _NVGPU_PLATFORM_TEGRA_H_
#include <linux/types.h> #include <nvgpu/types.h>
struct platform_device; struct platform_device;
struct gr_ctx_buffer_desc; struct gr_ctx_buffer_desc;