gpu: nvgpu: Replace use of bitops.h and kernel.h

Remove use of linux/kernel.h and linux/compiler.h. We don't use
anything in those headers.

Also replace use of linux/bitops.h with new wrapper nvgpu/bitops.h.

JIRA NVGPU-13

Change-Id: Iefa6b4598d5a5e7fc386c0a7a554e778a87010d6
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1460777
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-04-11 11:39:21 -07:00
committed by mobile promotions
parent fb1f604f41
commit 7665421874
26 changed files with 34 additions and 37 deletions

View File

@@ -15,14 +15,13 @@
#include <linux/cdev.h>
#include <linux/file.h>
#include <linux/anon_inodes.h>
#include <linux/nvgpu.h>
#include <linux/bitops.h>
#include <linux/rculist.h>
#include <linux/llist.h>
#include <linux/uaccess.h>
#include <linux/poll.h>
#include <linux/atomic.h>
#include <nvgpu/bitops.h>
#include <nvgpu/lock.h>
#include <nvgpu/kmem.h>

View File

@@ -18,9 +18,9 @@
#include <linux/cdev.h>
#include <linux/file.h>
#include <linux/anon_inodes.h>
#include <linux/bitops.h>
#include <uapi/linux/nvgpu.h>
#include <nvgpu/bitops.h>
#include <nvgpu/kmem.h>
#include "ioctl_ctrl.h"

View File

@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/atomic.h>

View File

@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <nvgpu/bitops.h>
#include <nvgpu/allocator.h>
#include <nvgpu/kmem.h>

View File

@@ -14,8 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <nvgpu/allocator.h>
#include <nvgpu/kmem.h>

View File

@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <linux/atomic.h>
#include <nvgpu/allocator.h>

View File

@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <nvgpu/allocator.h>
#include "gk20a/gk20a.h"

View File

@@ -14,10 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/mm.h>
#include <nvgpu/bitops.h>
#include <nvgpu/allocator.h>
#include <nvgpu/page_allocator.h>
#include <nvgpu/kmem.h>

View File

@@ -16,6 +16,8 @@
#ifndef BUS_GK20A_H
#define BUS_GK20A_H
#include <nvgpu/types.h>
struct gk20a;
struct gpu_ops;
struct nvgpu_mem;

View File

@@ -16,10 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <linux/dma-buf.h>
#include <nvgpu/bitops.h>
#include <nvgpu/kmem.h>
#include <nvgpu/lock.h>
#include <nvgpu/dma.h>

View File

@@ -21,7 +21,6 @@
#include <linux/version.h>
#include <linux/device.h>
#include <linux/pm_runtime.h>
#include <linux/kernel.h>
#include <linux/fb.h>
#include <linux/gk20a.h>
#include <linux/clk/tegra.h>

View File

@@ -16,8 +16,6 @@
#ifndef __HAL_GPU__
#define __HAL_GPU__
#include <linux/kernel.h>
struct gk20a;
int gpu_init_hal(struct gk20a *g);

View File

@@ -18,8 +18,6 @@
#ifndef __HAL_GK20A__
#define __HAL_GK20A__
#include <linux/kernel.h>
struct gk20a;
int gk20a_init_hal(struct gk20a *g);

View File

@@ -1,9 +1,7 @@
/*
* drivers/video/tegra/host/gk20a/kind_gk20a.c
*
* GK20A memory kind management
*
* Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
* 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,
@@ -18,8 +16,6 @@
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <linux/bitops.h>
#include <linux/compiler.h>
#include "kind_gk20a.h"

View File

@@ -21,6 +21,7 @@
#ifndef __KIND_GK20A_H__
#define __KIND_GK20A_H__
#include <nvgpu/bitops.h>
void gk20a_init_uncompressed_kind_map(void);
void gk20a_init_kind_attr(void);

View File

@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <trace/events/gk20a.h>
#include <nvgpu/timers.h>
#include <nvgpu/log.h>

View File

@@ -14,7 +14,6 @@
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/hrtimer.h>

View File

@@ -15,7 +15,6 @@
*/
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>

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_BITOPS_H__
#define __NVGPU_BITOPS_H__
#ifdef __KERNEL__
#include <linux/bitops.h>
#endif
#endif

View File

@@ -17,6 +17,9 @@
#ifndef __NVGPU_DEBUGGING_H__
#define __NVGPU_DEBUGGING_H__
#include <nvgpu/types.h>
#include <nvgpu/bitops.h>
struct gk20a;
enum nvgpu_log_type {

View File

@@ -15,8 +15,6 @@
*/
#if defined(CONFIG_GK20A_CYCLE_STATS)
#include <linux/kernel.h>
#include <linux/nvhost.h>
#include <linux/tegra-ivc.h>
#include <linux/tegra_vgpu.h>

View File

@@ -11,8 +11,6 @@
* more details.
*/
#include <linux/kernel.h>
#include "gk20a/gk20a.h"
#include "vgpu_gr_gk20a.h"

View File

@@ -11,8 +11,6 @@
* more details.
*/
#include <linux/kernel.h>
#include "gk20a/gk20a.h"
#include "vgpu_gr_gm20b.h"

View File

@@ -12,7 +12,6 @@
*/
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/gk20a.h>
#include "vgpu/vgpu.h"

View File

@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
#include <linux/tegra_vgpu.h>
#include "gk20a/gk20a.h"

View File

@@ -19,6 +19,8 @@
#ifndef __TEGRA_VGPU_H
#define __TEGRA_VGPU_H
#include <nvgpu/types.h>
enum {
TEGRA_VGPU_MODULE_GPU = 0,
};