mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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:
committed by
mobile promotions
parent
fb1f604f41
commit
7665421874
@@ -15,14 +15,13 @@
|
|||||||
#include <linux/cdev.h>
|
#include <linux/cdev.h>
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/anon_inodes.h>
|
#include <linux/anon_inodes.h>
|
||||||
#include <linux/nvgpu.h>
|
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <linux/rculist.h>
|
#include <linux/rculist.h>
|
||||||
#include <linux/llist.h>
|
#include <linux/llist.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/poll.h>
|
#include <linux/poll.h>
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
#include <nvgpu/lock.h>
|
#include <nvgpu/lock.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
#include <linux/cdev.h>
|
#include <linux/cdev.h>
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/anon_inodes.h>
|
#include <linux/anon_inodes.h>
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <uapi/linux/nvgpu.h>
|
#include <uapi/linux/nvgpu.h>
|
||||||
|
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
|
|
||||||
#include "ioctl_ctrl.h"
|
#include "ioctl_ctrl.h"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
|||||||
@@ -14,9 +14,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <nvgpu/bitops.h>
|
||||||
#include <linux/bitops.h>
|
|
||||||
|
|
||||||
#include <nvgpu/allocator.h>
|
#include <nvgpu/allocator.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#include <nvgpu/allocator.h>
|
#include <nvgpu/allocator.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
#include <nvgpu/allocator.h>
|
#include <nvgpu/allocator.h>
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#include <nvgpu/allocator.h>
|
#include <nvgpu/allocator.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
|
|||||||
@@ -14,10 +14,9 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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 <linux/mm.h>
|
||||||
|
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
#include <nvgpu/allocator.h>
|
#include <nvgpu/allocator.h>
|
||||||
#include <nvgpu/page_allocator.h>
|
#include <nvgpu/page_allocator.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#ifndef BUS_GK20A_H
|
#ifndef BUS_GK20A_H
|
||||||
#define BUS_GK20A_H
|
#define BUS_GK20A_H
|
||||||
|
|
||||||
|
#include <nvgpu/types.h>
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
struct gpu_ops;
|
struct gpu_ops;
|
||||||
struct nvgpu_mem;
|
struct nvgpu_mem;
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/dma-buf.h>
|
#include <linux/dma-buf.h>
|
||||||
|
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
#include <nvgpu/lock.h>
|
#include <nvgpu/lock.h>
|
||||||
#include <nvgpu/dma.h>
|
#include <nvgpu/dma.h>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
#include <linux/gk20a.h>
|
#include <linux/gk20a.h>
|
||||||
#include <linux/clk/tegra.h>
|
#include <linux/clk/tegra.h>
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
#ifndef __HAL_GPU__
|
#ifndef __HAL_GPU__
|
||||||
#define __HAL_GPU__
|
#define __HAL_GPU__
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
|
||||||
int gpu_init_hal(struct gk20a *g);
|
int gpu_init_hal(struct gk20a *g);
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
#ifndef __HAL_GK20A__
|
#ifndef __HAL_GK20A__
|
||||||
#define __HAL_GK20A__
|
#define __HAL_GK20A__
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
|
||||||
int gk20a_init_hal(struct gk20a *g);
|
int gk20a_init_hal(struct gk20a *g);
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* drivers/video/tegra/host/gk20a/kind_gk20a.c
|
|
||||||
*
|
|
||||||
* GK20A memory kind management
|
* 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
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* 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.,
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <linux/compiler.h>
|
|
||||||
|
|
||||||
#include "kind_gk20a.h"
|
#include "kind_gk20a.h"
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#ifndef __KIND_GK20A_H__
|
#ifndef __KIND_GK20A_H__
|
||||||
#define __KIND_GK20A_H__
|
#define __KIND_GK20A_H__
|
||||||
|
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
|
|
||||||
void gk20a_init_uncompressed_kind_map(void);
|
void gk20a_init_uncompressed_kind_map(void);
|
||||||
void gk20a_init_kind_attr(void);
|
void gk20a_init_kind_attr(void);
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#include <trace/events/gk20a.h>
|
#include <trace/events/gk20a.h>
|
||||||
#include <nvgpu/timers.h>
|
#include <nvgpu/timers.h>
|
||||||
#include <nvgpu/log.h>
|
#include <nvgpu/log.h>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/hrtimer.h>
|
#include <linux/hrtimer.h>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
|
|
||||||
|
|||||||
20
drivers/gpu/nvgpu/include/nvgpu/bitops.h
Normal file
20
drivers/gpu/nvgpu/include/nvgpu/bitops.h
Normal 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
|
||||||
@@ -17,6 +17,9 @@
|
|||||||
#ifndef __NVGPU_DEBUGGING_H__
|
#ifndef __NVGPU_DEBUGGING_H__
|
||||||
#define __NVGPU_DEBUGGING_H__
|
#define __NVGPU_DEBUGGING_H__
|
||||||
|
|
||||||
|
#include <nvgpu/types.h>
|
||||||
|
#include <nvgpu/bitops.h>
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
|
||||||
enum nvgpu_log_type {
|
enum nvgpu_log_type {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#if defined(CONFIG_GK20A_CYCLE_STATS)
|
#if defined(CONFIG_GK20A_CYCLE_STATS)
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/nvhost.h>
|
|
||||||
#include <linux/tegra-ivc.h>
|
#include <linux/tegra-ivc.h>
|
||||||
#include <linux/tegra_vgpu.h>
|
#include <linux/tegra_vgpu.h>
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
* more details.
|
* more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "vgpu_gr_gk20a.h"
|
#include "vgpu_gr_gk20a.h"
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
* more details.
|
* more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "vgpu_gr_gm20b.h"
|
#include "vgpu_gr_gm20b.h"
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/gk20a.h>
|
#include <linux/gk20a.h>
|
||||||
|
|
||||||
#include "vgpu/vgpu.h"
|
#include "vgpu/vgpu.h"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/tegra_vgpu.h>
|
#include <linux/tegra_vgpu.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef __TEGRA_VGPU_H
|
#ifndef __TEGRA_VGPU_H
|
||||||
#define __TEGRA_VGPU_H
|
#define __TEGRA_VGPU_H
|
||||||
|
|
||||||
|
#include <nvgpu/types.h>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TEGRA_VGPU_MODULE_GPU = 0,
|
TEGRA_VGPU_MODULE_GPU = 0,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user