From 44d5fb76aa42f0d9cb9828ac05f014e8fee5ab94 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 11 Apr 2017 12:04:25 -0700 Subject: gpu: nvgpu: Add wrapper nvgpu/atomic.h Add wrapper header file nvgpu/atomic.h. It #includes on Linux. JIRA NVGPU-13 Change-Id: I6f2b3a04c964e7664b1f61b6073b643629bd99c5 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1460792 Reviewed-by: Alex Waterman Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade --- drivers/gpu/nvgpu/clk/clk_arb.c | 2 +- drivers/gpu/nvgpu/common/linux/kmem.c | 2 +- drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 3 +-- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 1 + drivers/gpu/nvgpu/gk20a/gk20a.h | 1 - drivers/gpu/nvgpu/gk20a/mc_gk20a.c | 2 ++ drivers/gpu/nvgpu/gm20b/fifo_gm20b.c | 1 + drivers/gpu/nvgpu/gp10b/mc_gp10b.c | 2 ++ drivers/gpu/nvgpu/include/nvgpu/atomic.h | 20 ++++++++++++++++++++ drivers/gpu/nvgpu/include/nvgpu/semaphore.h | 1 + drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 1 + 14 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/atomic.h diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 3625706c..38b7d88d 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c @@ -19,11 +19,11 @@ #include #include #include -#include #include #include #include +#include #include "gk20a/gk20a.h" #include "clk/clk_arb.h" diff --git a/drivers/gpu/nvgpu/common/linux/kmem.c b/drivers/gpu/nvgpu/common/linux/kmem.c index 87aeb184..a2e49e7a 100644 --- a/drivers/gpu/nvgpu/common/linux/kmem.c +++ b/drivers/gpu/nvgpu/common/linux/kmem.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -25,6 +24,7 @@ #include #include +#include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c index 93c870b5..dc72d8bf 100644 --- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#include - +#include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index c684be1f..88600f46 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "gk20a.h" #include "debug_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 6d0f0854..1867fb82 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "channel_sync_gk20a.h" #include "gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index b33845d1..845663ac 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c @@ -33,6 +33,7 @@ #include "gr_gk20a.h" #include +#include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index bdd068fe..08066604 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "gk20a.h" #include "debug_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 1cff8dd5..c8e2bd08 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -35,7 +35,6 @@ struct dbg_profiler_object_data; #include #include #include -#include #include #include "../../../arch/arm/mach-tegra/iomap.h" diff --git a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c index 18fd3648..32a6532f 100644 --- a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c @@ -19,6 +19,8 @@ #include "gk20a.h" #include "mc_gk20a.h" +#include + #include void mc_gk20a_nonstall_cb(struct work_struct *work) diff --git a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c index e3aa43d6..22ff3629 100644 --- a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c index 5842cb62..4a48d7fa 100644 --- a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c @@ -18,6 +18,8 @@ #include "mc_gp10b.h" +#include + #include void mc_gp10b_intr_enable(struct gk20a *g) diff --git a/drivers/gpu/nvgpu/include/nvgpu/atomic.h b/drivers/gpu/nvgpu/include/nvgpu/atomic.h new file mode 100644 index 00000000..700e29fe --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/atomic.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_ATOMIC_H__ +#define __NVGPU_ATOMIC_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif diff --git a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h index d9120b65..285fcdeb 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h +++ b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h @@ -20,6 +20,7 @@ #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/mm_gk20a.h" diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index e775abbb..5d1d1208 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -18,6 +18,7 @@ #include #include +#include #include "vgpu/vgpu.h" #include "gk20a/ctxsw_trace_gk20a.h" -- cgit v1.2.2