summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2018-09-19 02:16:27 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-25 03:20:25 -0400
commit421e64aad73c419495253c62b131677cf25c4924 (patch)
tree9489510265517a8cd8e9b86642fbd47d81cc2038
parent032860d8de01ac3a3357a4758e7ee81bd418c48f (diff)
gpu: nvgpu: move header location of gk20a.h
Update header path of gk20a.h in files present in common/ to <nvgpu/gk20a.h> Jira NVGPU-597 Change-Id: I3431dae93ada9bd561454c89a0b99c5292ab4a8d Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1832024 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/as.c3
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gm20b.c2
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gp10b.c2
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gv100.c2
-rw-r--r--drivers/gpu/nvgpu/common/ce2.c2
-rw-r--r--drivers/gpu/nvgpu/common/ecc.c2
-rw-r--r--drivers/gpu/nvgpu/common/enabled.c3
-rw-r--r--drivers/gpu/nvgpu/common/falcon/falcon.c3
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gm20b.c3
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gp106.c7
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gp10b.c4
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gv100.c3
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gv11b.c2
-rw-r--r--drivers/gpu/nvgpu/common/fifo/channel.c2
-rw-r--r--drivers/gpu/nvgpu/common/fifo/submit.c2
-rw-r--r--drivers/gpu/nvgpu/common/fuse/fuse_gm20b.c3
-rw-r--r--drivers/gpu/nvgpu/common/fuse/fuse_gp106.c3
-rw-r--r--drivers/gpu/nvgpu/common/fuse/fuse_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/common/io_common.c3
-rw-r--r--drivers/gpu/nvgpu/common/ltc/ltc.c2
-rw-r--r--drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c3
-rw-r--r--drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c2
-rw-r--r--drivers/gpu/nvgpu/common/mc/mc.c3
-rw-r--r--drivers/gpu/nvgpu/common/mc/mc_gm20b.c2
-rw-r--r--drivers/gpu/nvgpu/common/mc/mc_gp10b.c2
-rw-r--r--drivers/gpu/nvgpu/common/mc/mc_gv100.c3
-rw-r--r--drivers/gpu/nvgpu/common/mc/mc_gv11b.c3
-rw-r--r--drivers/gpu/nvgpu/common/mm/comptags.c3
-rw-r--r--drivers/gpu/nvgpu/common/mm/gmmu.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/mm.c3
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_mem.c4
-rw-r--r--drivers/gpu/nvgpu/common/mm/pd_cache.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/vidmem.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/vm.c3
-rw-r--r--drivers/gpu/nvgpu/common/mm/vm_area.c2
-rw-r--r--drivers/gpu/nvgpu/common/nvlink.c2
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu.c3
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_debug.c5
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_fw.c3
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_ipc.c3
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c3
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_pg.c3
-rw-r--r--drivers/gpu/nvgpu/common/pramin.c3
-rw-r--r--drivers/gpu/nvgpu/common/priv_ring/priv_ring_gm20b.c3
-rw-r--r--drivers/gpu/nvgpu/common/priv_ring/priv_ring_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/common/ptimer/ptimer.c3
-rw-r--r--drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/common/semaphore.c2
-rw-r--r--drivers/gpu/nvgpu/common/sim.c3
-rw-r--r--drivers/gpu/nvgpu/common/sim_pci.c3
-rw-r--r--drivers/gpu/nvgpu/common/sync/channel_sync.c2
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm.c3
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gm20b.c2
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gp106.c3
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gp10b.c7
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gv11b.c9
-rw-r--r--drivers/gpu/nvgpu/common/top/top_gv100.c2
-rw-r--r--drivers/gpu/nvgpu/common/vbios/bios.c3
-rw-r--r--drivers/gpu/nvgpu/common/xve/xve_gp106.c7
-rw-r--r--drivers/gpu/nvgpu/common/xve/xve_gp106.h3
63 files changed, 73 insertions, 114 deletions
diff --git a/drivers/gpu/nvgpu/common/as.c b/drivers/gpu/nvgpu/common/as.c
index f6fc3a06..d6dff9d4 100644
--- a/drivers/gpu/nvgpu/common/as.c
+++ b/drivers/gpu/nvgpu/common/as.c
@@ -27,8 +27,7 @@
27#include <nvgpu/kmem.h> 27#include <nvgpu/kmem.h>
28#include <nvgpu/vm.h> 28#include <nvgpu/vm.h>
29#include <nvgpu/log2.h> 29#include <nvgpu/log2.h>
30 30#include <nvgpu/gk20a.h>
31#include "gk20a/gk20a.h"
32 31
33/* dumb allocator... */ 32/* dumb allocator... */
34static int generate_as_share_id(struct gk20a_as *as) 33static int generate_as_share_id(struct gk20a_as *as)
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gk20a.c b/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
index 5178dcd0..61fd1223 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
+++ b/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
@@ -25,8 +25,8 @@
25#include <nvgpu/mm.h> 25#include <nvgpu/mm.h>
26#include <nvgpu/io.h> 26#include <nvgpu/io.h>
27#include <nvgpu/bug.h> 27#include <nvgpu/bug.h>
28#include <nvgpu/gk20a.h>
28 29
29#include "gk20a/gk20a.h"
30#include "bus_gk20a.h" 30#include "bus_gk20a.h"
31 31
32#include <nvgpu/hw/gk20a/hw_bus_gk20a.h> 32#include <nvgpu/hw/gk20a/hw_bus_gk20a.h>
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gm20b.c b/drivers/gpu/nvgpu/common/bus/bus_gm20b.c
index ef5fee8c..5f6488f1 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gm20b.c
+++ b/drivers/gpu/nvgpu/common/bus/bus_gm20b.c
@@ -26,8 +26,8 @@
26#include <nvgpu/mm.h> 26#include <nvgpu/mm.h>
27#include <nvgpu/enabled.h> 27#include <nvgpu/enabled.h>
28#include <nvgpu/io.h> 28#include <nvgpu/io.h>
29#include <nvgpu/gk20a.h>
29 30
30#include "gk20a/gk20a.h"
31#include "bus_gm20b.h" 31#include "bus_gm20b.h"
32 32
33#include <nvgpu/hw/gm20b/hw_bus_gm20b.h> 33#include <nvgpu/hw/gm20b/hw_bus_gm20b.h>
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gp10b.c b/drivers/gpu/nvgpu/common/bus/bus_gp10b.c
index 8aa75d8d..cc1ca390 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gp10b.c
+++ b/drivers/gpu/nvgpu/common/bus/bus_gp10b.c
@@ -23,9 +23,9 @@
23#include <nvgpu/timers.h> 23#include <nvgpu/timers.h>
24#include <nvgpu/mm.h> 24#include <nvgpu/mm.h>
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "bus_gp10b.h" 28#include "bus_gp10b.h"
28#include "gk20a/gk20a.h"
29 29
30#include <nvgpu/hw/gp10b/hw_bus_gp10b.h> 30#include <nvgpu/hw/gp10b/hw_bus_gp10b.h>
31 31
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gv100.c b/drivers/gpu/nvgpu/common/bus/bus_gv100.c
index eb0387e6..4b654402 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gv100.c
+++ b/drivers/gpu/nvgpu/common/bus/bus_gv100.c
@@ -23,9 +23,9 @@
23#include <nvgpu/timers.h> 23#include <nvgpu/timers.h>
24#include <nvgpu/mm.h> 24#include <nvgpu/mm.h>
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "bus_gv100.h" 28#include "bus_gv100.h"
28#include "gk20a/gk20a.h"
29 29
30#include <nvgpu/hw/gv100/hw_bus_gv100.h> 30#include <nvgpu/hw/gv100/hw_bus_gv100.h>
31 31
diff --git a/drivers/gpu/nvgpu/common/ce2.c b/drivers/gpu/nvgpu/common/ce2.c
index 342f046c..4081b05f 100644
--- a/drivers/gpu/nvgpu/common/ce2.c
+++ b/drivers/gpu/nvgpu/common/ce2.c
@@ -21,12 +21,12 @@
21 */ 21 */
22 22
23#include <nvgpu/types.h> 23#include <nvgpu/types.h>
24#include <nvgpu/gk20a.h>
24#include <nvgpu/channel.h> 25#include <nvgpu/channel.h>
25#include <nvgpu/utils.h> 26#include <nvgpu/utils.h>
26 27
27#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> 28#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h>
28 29
29#include "gk20a/gk20a.h"
30#include "gk20a/ce2_gk20a.h" 30#include "gk20a/ce2_gk20a.h"
31#include "gk20a/fence_gk20a.h" 31#include "gk20a/fence_gk20a.h"
32 32
diff --git a/drivers/gpu/nvgpu/common/ecc.c b/drivers/gpu/nvgpu/common/ecc.c
index b850f09e..81ad37ae 100644
--- a/drivers/gpu/nvgpu/common/ecc.c
+++ b/drivers/gpu/nvgpu/common/ecc.c
@@ -20,7 +20,7 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#include "gk20a/gk20a.h" 23#include <nvgpu/gk20a.h>
24 24
25static void nvgpu_ecc_stat_add(struct gk20a *g, struct nvgpu_ecc_stat *stat) 25static void nvgpu_ecc_stat_add(struct gk20a *g, struct nvgpu_ecc_stat *stat)
26{ 26{
diff --git a/drivers/gpu/nvgpu/common/enabled.c b/drivers/gpu/nvgpu/common/enabled.c
index eaebe48c..076605d7 100644
--- a/drivers/gpu/nvgpu/common/enabled.c
+++ b/drivers/gpu/nvgpu/common/enabled.c
@@ -22,8 +22,7 @@
22 22
23#include <nvgpu/enabled.h> 23#include <nvgpu/enabled.h>
24#include <nvgpu/bitops.h> 24#include <nvgpu/bitops.h>
25 25#include <nvgpu/gk20a.h>
26#include "gk20a/gk20a.h"
27 26
28int nvgpu_init_enabled_flags(struct gk20a *g) 27int nvgpu_init_enabled_flags(struct gk20a *g)
29{ 28{
diff --git a/drivers/gpu/nvgpu/common/falcon/falcon.c b/drivers/gpu/nvgpu/common/falcon/falcon.c
index 4535734f..a0f88de3 100644
--- a/drivers/gpu/nvgpu/common/falcon/falcon.c
+++ b/drivers/gpu/nvgpu/common/falcon/falcon.c
@@ -22,8 +22,7 @@
22#include <nvgpu/lock.h> 22#include <nvgpu/lock.h>
23#include <nvgpu/timers.h> 23#include <nvgpu/timers.h>
24#include <nvgpu/falcon.h> 24#include <nvgpu/falcon.h>
25 25#include <nvgpu/gk20a.h>
26#include "gk20a/gk20a.h"
27 26
28/* Dealy depends on memory size and pwr_clk 27/* Dealy depends on memory size and pwr_clk
29 * delay = MAX {IMEM_SIZE, DMEM_SIZE} * 64 + 1) / pwr_clk 28 * delay = MAX {IMEM_SIZE, DMEM_SIZE} * 64 + 1) / pwr_clk
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
index 00d0fba4..9a13ecca 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
@@ -26,8 +26,7 @@
26 26
27#include <nvgpu/sizes.h> 27#include <nvgpu/sizes.h>
28#include <nvgpu/utils.h> 28#include <nvgpu/utils.h>
29 29#include <nvgpu/gk20a.h>
30#include "gk20a/gk20a.h"
31 30
32#include "fb_gm20b.h" 31#include "fb_gm20b.h"
33 32
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp106.c b/drivers/gpu/nvgpu/common/fb/fb_gp106.c
index 6dacceb5..27fce8a7 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gp106.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gp106.c
@@ -20,14 +20,13 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#include "gk20a/gk20a.h" 23#include <nvgpu/io.h>
24#include <nvgpu/timers.h>
25#include <nvgpu/gk20a.h>
24 26
25#include "fb_gp10b.h" 27#include "fb_gp10b.h"
26#include "fb_gp106.h" 28#include "fb_gp106.h"
27 29
28#include <nvgpu/io.h>
29#include <nvgpu/timers.h>
30
31#include <nvgpu/hw/gp106/hw_fb_gp106.h> 30#include <nvgpu/hw/gp106/hw_fb_gp106.h>
32 31
33#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ 32#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp10b.c b/drivers/gpu/nvgpu/common/fb/fb_gp10b.c
index 45fc8373..ac5fbd9d 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gp10b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gp10b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GP10B FB 2 * GP10B FB
3 * 3 *
4 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5* 5*
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -23,8 +23,8 @@
23 */ 23 */
24 24
25#include <nvgpu/sizes.h> 25#include <nvgpu/sizes.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "gk20a/gk20a.h"
28#include "fb_gp10b.h" 28#include "fb_gp10b.h"
29 29
30unsigned int gp10b_fb_compression_page_size(struct gk20a *g) 30unsigned int gp10b_fb_compression_page_size(struct gk20a *g)
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv100.c b/drivers/gpu/nvgpu/common/fb/fb_gv100.c
index 4cae5312..967af51b 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gv100.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gv100.c
@@ -38,8 +38,7 @@
38#include <nvgpu/io.h> 38#include <nvgpu/io.h>
39#include <nvgpu/utils.h> 39#include <nvgpu/utils.h>
40#include <nvgpu/timers.h> 40#include <nvgpu/timers.h>
41 41#include <nvgpu/gk20a.h>
42#include "gk20a/gk20a.h"
43 42
44#include "fb_gv100.h" 43#include "fb_gv100.h"
45 44
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
index b3d8cdb9..a03c7da7 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
@@ -33,9 +33,9 @@
33#include <nvgpu/io.h> 33#include <nvgpu/io.h>
34#include <nvgpu/utils.h> 34#include <nvgpu/utils.h>
35#include <nvgpu/timers.h> 35#include <nvgpu/timers.h>
36#include <nvgpu/gk20a.h>
36#include <nvgpu/channel.h> 37#include <nvgpu/channel.h>
37 38
38#include "gk20a/gk20a.h"
39#include "gk20a/mm_gk20a.h" 39#include "gk20a/mm_gk20a.h"
40 40
41#include "gv11b/fifo_gv11b.h" 41#include "gv11b/fifo_gv11b.h"
diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c
index 1613f5f6..680382a4 100644
--- a/drivers/gpu/nvgpu/common/fifo/channel.c
+++ b/drivers/gpu/nvgpu/common/fifo/channel.c
@@ -43,10 +43,10 @@
43#include <nvgpu/os_sched.h> 43#include <nvgpu/os_sched.h>
44#include <nvgpu/log2.h> 44#include <nvgpu/log2.h>
45#include <nvgpu/ptimer.h> 45#include <nvgpu/ptimer.h>
46#include <nvgpu/gk20a.h>
46#include <nvgpu/channel.h> 47#include <nvgpu/channel.h>
47#include <nvgpu/channel_sync.h> 48#include <nvgpu/channel_sync.h>
48 49
49#include "gk20a/gk20a.h"
50#include "gk20a/dbg_gpu_gk20a.h" 50#include "gk20a/dbg_gpu_gk20a.h"
51#include "gk20a/fence_gk20a.h" 51#include "gk20a/fence_gk20a.h"
52 52
diff --git a/drivers/gpu/nvgpu/common/fifo/submit.c b/drivers/gpu/nvgpu/common/fifo/submit.c
index 5a0beea9..5e218fbc 100644
--- a/drivers/gpu/nvgpu/common/fifo/submit.c
+++ b/drivers/gpu/nvgpu/common/fifo/submit.c
@@ -20,6 +20,7 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#include <nvgpu/gk20a.h>
23#include <nvgpu/channel.h> 24#include <nvgpu/channel.h>
24#include <nvgpu/ltc.h> 25#include <nvgpu/ltc.h>
25#include <nvgpu/os_sched.h> 26#include <nvgpu/os_sched.h>
@@ -28,7 +29,6 @@
28 29
29#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> 30#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h>
30 31
31#include "gk20a/gk20a.h"
32#include "gk20a/fence_gk20a.h" 32#include "gk20a/fence_gk20a.h"
33 33
34#include <trace/events/gk20a.h> 34#include <trace/events/gk20a.h>
diff --git a/drivers/gpu/nvgpu/common/fuse/fuse_gm20b.c b/drivers/gpu/nvgpu/common/fuse/fuse_gm20b.c
index 0dba3542..0f01f01a 100644
--- a/drivers/gpu/nvgpu/common/fuse/fuse_gm20b.c
+++ b/drivers/gpu/nvgpu/common/fuse/fuse_gm20b.c
@@ -26,8 +26,7 @@
26#include <nvgpu/fuse.h> 26#include <nvgpu/fuse.h>
27#include <nvgpu/enabled.h> 27#include <nvgpu/enabled.h>
28#include <nvgpu/io.h> 28#include <nvgpu/io.h>
29 29#include <nvgpu/gk20a.h>
30#include "gk20a/gk20a.h"
31 30
32#include "fuse_gm20b.h" 31#include "fuse_gm20b.h"
33 32
diff --git a/drivers/gpu/nvgpu/common/fuse/fuse_gp106.c b/drivers/gpu/nvgpu/common/fuse/fuse_gp106.c
index 47dc49ab..f77031df 100644
--- a/drivers/gpu/nvgpu/common/fuse/fuse_gp106.c
+++ b/drivers/gpu/nvgpu/common/fuse/fuse_gp106.c
@@ -24,8 +24,7 @@
24 24
25#include <nvgpu/enabled.h> 25#include <nvgpu/enabled.h>
26#include <nvgpu/io.h> 26#include <nvgpu/io.h>
27 27#include <nvgpu/gk20a.h>
28#include "gk20a/gk20a.h"
29 28
30#include "fuse_gp106.h" 29#include "fuse_gp106.h"
31 30
diff --git a/drivers/gpu/nvgpu/common/fuse/fuse_gp10b.c b/drivers/gpu/nvgpu/common/fuse/fuse_gp10b.c
index 97570f9c..81b97af5 100644
--- a/drivers/gpu/nvgpu/common/fuse/fuse_gp10b.c
+++ b/drivers/gpu/nvgpu/common/fuse/fuse_gp10b.c
@@ -26,8 +26,7 @@
26#include <nvgpu/fuse.h> 26#include <nvgpu/fuse.h>
27#include <nvgpu/enabled.h> 27#include <nvgpu/enabled.h>
28#include <nvgpu/io.h> 28#include <nvgpu/io.h>
29 29#include <nvgpu/gk20a.h>
30#include "gk20a/gk20a.h"
31 30
32#include "fuse_gm20b.h" 31#include "fuse_gm20b.h"
33#include "fuse_gp10b.h" 32#include "fuse_gp10b.h"
diff --git a/drivers/gpu/nvgpu/common/io_common.c b/drivers/gpu/nvgpu/common/io_common.c
index e7041eb7..7c295454 100644
--- a/drivers/gpu/nvgpu/common/io_common.c
+++ b/drivers/gpu/nvgpu/common/io_common.c
@@ -13,8 +13,7 @@
13 13
14#include <nvgpu/io.h> 14#include <nvgpu/io.h>
15#include <nvgpu/types.h> 15#include <nvgpu/types.h>
16 16#include <nvgpu/gk20a.h>
17#include "gk20a/gk20a.h"
18 17
19void nvgpu_writel_check(struct gk20a *g, u32 r, u32 v) 18void nvgpu_writel_check(struct gk20a *g, u32 r, u32 v)
20{ 19{
diff --git a/drivers/gpu/nvgpu/common/ltc/ltc.c b/drivers/gpu/nvgpu/common/ltc/ltc.c
index 3d85db3f..c5a17253 100644
--- a/drivers/gpu/nvgpu/common/ltc/ltc.c
+++ b/drivers/gpu/nvgpu/common/ltc/ltc.c
@@ -23,8 +23,8 @@
23#include <nvgpu/ltc.h> 23#include <nvgpu/ltc.h>
24#include <nvgpu/dma.h> 24#include <nvgpu/dma.h>
25#include <nvgpu/nvgpu_mem.h> 25#include <nvgpu/nvgpu_mem.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "gk20a/gk20a.h"
28#include "gk20a/gr_gk20a.h" 28#include "gk20a/gr_gk20a.h"
29 29
30int nvgpu_init_ltc_support(struct gk20a *g) 30int nvgpu_init_ltc_support(struct gk20a *g)
diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c b/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c
index eb321776..f4d176cb 100644
--- a/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/common/ltc/ltc_gm20b.c
@@ -30,14 +30,13 @@
30#include <nvgpu/ltc.h> 30#include <nvgpu/ltc.h>
31#include <nvgpu/io.h> 31#include <nvgpu/io.h>
32#include <nvgpu/utils.h> 32#include <nvgpu/utils.h>
33#include <nvgpu/gk20a.h>
33 34
34#include <nvgpu/hw/gm20b/hw_mc_gm20b.h> 35#include <nvgpu/hw/gm20b/hw_mc_gm20b.h>
35#include <nvgpu/hw/gm20b/hw_ltc_gm20b.h> 36#include <nvgpu/hw/gm20b/hw_ltc_gm20b.h>
36#include <nvgpu/hw/gm20b/hw_top_gm20b.h> 37#include <nvgpu/hw/gm20b/hw_top_gm20b.h>
37#include <nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h> 38#include <nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h>
38 39
39#include "gk20a/gk20a.h"
40
41#include "ltc_gm20b.h" 40#include "ltc_gm20b.h"
42 41
43int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) 42int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c b/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c
index 4d11b44b..73c258f1 100644
--- a/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c
+++ b/drivers/gpu/nvgpu/common/ltc/ltc_gp10b.c
@@ -29,12 +29,11 @@
29#include <nvgpu/enabled.h> 29#include <nvgpu/enabled.h>
30#include <nvgpu/io.h> 30#include <nvgpu/io.h>
31#include <nvgpu/timers.h> 31#include <nvgpu/timers.h>
32#include <nvgpu/gk20a.h>
32 33
33#include <nvgpu/hw/gp10b/hw_mc_gp10b.h> 34#include <nvgpu/hw/gp10b/hw_mc_gp10b.h>
34#include <nvgpu/hw/gp10b/hw_ltc_gp10b.h> 35#include <nvgpu/hw/gp10b/hw_ltc_gp10b.h>
35 36
36#include "gk20a/gk20a.h"
37
38#include "ltc_gm20b.h" 37#include "ltc_gm20b.h"
39#include "ltc_gp10b.h" 38#include "ltc_gp10b.h"
40 39
diff --git a/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c b/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c
index 69c1ce02..d20c963a 100644
--- a/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c
+++ b/drivers/gpu/nvgpu/common/ltc/ltc_gv11b.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include "gk20a/gk20a.h" 26#include <nvgpu/gk20a.h>
27 27
28#include "ltc_gp10b.h" 28#include "ltc_gp10b.h"
29#include "ltc_gv11b.h" 29#include "ltc_gv11b.h"
diff --git a/drivers/gpu/nvgpu/common/mc/mc.c b/drivers/gpu/nvgpu/common/mc/mc.c
index 77416ef9..9922a0d5 100644
--- a/drivers/gpu/nvgpu/common/mc/mc.c
+++ b/drivers/gpu/nvgpu/common/mc/mc.c
@@ -24,8 +24,7 @@
24 24
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include <nvgpu/mc.h> 26#include <nvgpu/mc.h>
27 27#include <nvgpu/gk20a.h>
28#include "gk20a/gk20a.h"
29 28
30#include <nvgpu/hw/gm20b/hw_mc_gm20b.h> 29#include <nvgpu/hw/gm20b/hw_mc_gm20b.h>
31 30
diff --git a/drivers/gpu/nvgpu/common/mc/mc_gm20b.c b/drivers/gpu/nvgpu/common/mc/mc_gm20b.c
index 88666b1d..c4e682ec 100644
--- a/drivers/gpu/nvgpu/common/mc/mc_gm20b.c
+++ b/drivers/gpu/nvgpu/common/mc/mc_gm20b.c
@@ -27,8 +27,8 @@
27#include <nvgpu/unit.h> 27#include <nvgpu/unit.h>
28#include <nvgpu/io.h> 28#include <nvgpu/io.h>
29#include <nvgpu/mc.h> 29#include <nvgpu/mc.h>
30#include <nvgpu/gk20a.h>
30 31
31#include "gk20a/gk20a.h"
32#include "mc_gm20b.h" 32#include "mc_gm20b.h"
33 33
34#include <nvgpu/hw/gm20b/hw_mc_gm20b.h> 34#include <nvgpu/hw/gm20b/hw_mc_gm20b.h>
diff --git a/drivers/gpu/nvgpu/common/mc/mc_gp10b.c b/drivers/gpu/nvgpu/common/mc/mc_gp10b.c
index 3dce9a09..64888403 100644
--- a/drivers/gpu/nvgpu/common/mc/mc_gp10b.c
+++ b/drivers/gpu/nvgpu/common/mc/mc_gp10b.c
@@ -22,7 +22,7 @@
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24 24
25#include "gk20a/gk20a.h" 25#include <nvgpu/gk20a.h>
26#include <nvgpu/io.h> 26#include <nvgpu/io.h>
27#include <nvgpu/mc.h> 27#include <nvgpu/mc.h>
28 28
diff --git a/drivers/gpu/nvgpu/common/mc/mc_gv100.c b/drivers/gpu/nvgpu/common/mc/mc_gv100.c
index 28c03434..b67f9bbe 100644
--- a/drivers/gpu/nvgpu/common/mc/mc_gv100.c
+++ b/drivers/gpu/nvgpu/common/mc/mc_gv100.c
@@ -25,8 +25,7 @@
25#include <nvgpu/types.h> 25#include <nvgpu/types.h>
26#include <nvgpu/io.h> 26#include <nvgpu/io.h>
27#include <nvgpu/mc.h> 27#include <nvgpu/mc.h>
28 28#include <nvgpu/gk20a.h>
29#include "gk20a/gk20a.h"
30 29
31#include "mc_gp10b.h" 30#include "mc_gp10b.h"
32#include "mc_gv100.h" 31#include "mc_gv100.h"
diff --git a/drivers/gpu/nvgpu/common/mc/mc_gv11b.c b/drivers/gpu/nvgpu/common/mc/mc_gv11b.c
index fa4d4bfb..35508bbe 100644
--- a/drivers/gpu/nvgpu/common/mc/mc_gv11b.c
+++ b/drivers/gpu/nvgpu/common/mc/mc_gv11b.c
@@ -25,8 +25,7 @@
25#include <nvgpu/types.h> 25#include <nvgpu/types.h>
26#include <nvgpu/io.h> 26#include <nvgpu/io.h>
27#include <nvgpu/mc.h> 27#include <nvgpu/mc.h>
28 28#include <nvgpu/gk20a.h>
29#include "gk20a/gk20a.h"
30 29
31#include "mc_gp10b.h" 30#include "mc_gp10b.h"
32#include "mc_gv11b.h" 31#include "mc_gv11b.h"
diff --git a/drivers/gpu/nvgpu/common/mm/comptags.c b/drivers/gpu/nvgpu/common/mm/comptags.c
index f6216648..cb0184c7 100644
--- a/drivers/gpu/nvgpu/common/mm/comptags.c
+++ b/drivers/gpu/nvgpu/common/mm/comptags.c
@@ -23,8 +23,7 @@
23#include <nvgpu/bug.h> 23#include <nvgpu/bug.h>
24#include <nvgpu/bitops.h> 24#include <nvgpu/bitops.h>
25#include <nvgpu/comptags.h> 25#include <nvgpu/comptags.h>
26 26#include <nvgpu/gk20a.h>
27#include "gk20a/gk20a.h"
28 27
29int gk20a_comptaglines_alloc(struct gk20a_comptag_allocator *allocator, 28int gk20a_comptaglines_alloc(struct gk20a_comptag_allocator *allocator,
30 u32 *offset, u32 len) 29 u32 *offset, u32 len)
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c
index 02e32b20..afbad75c 100644
--- a/drivers/gpu/nvgpu/common/mm/gmmu.c
+++ b/drivers/gpu/nvgpu/common/mm/gmmu.c
@@ -32,8 +32,8 @@
32#include <nvgpu/vidmem.h> 32#include <nvgpu/vidmem.h>
33#include <nvgpu/sizes.h> 33#include <nvgpu/sizes.h>
34#include <nvgpu/types.h> 34#include <nvgpu/types.h>
35#include <nvgpu/gk20a.h>
35 36
36#include "gk20a/gk20a.h"
37#include "gk20a/mm_gk20a.h" 37#include "gk20a/mm_gk20a.h"
38 38
39#define __gmmu_dbg(g, attrs, fmt, args...) \ 39#define __gmmu_dbg(g, attrs, fmt, args...) \
diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c
index 6c8f2cdf..58a435c0 100644
--- a/drivers/gpu/nvgpu/common/mm/mm.c
+++ b/drivers/gpu/nvgpu/common/mm/mm.c
@@ -29,8 +29,7 @@
29#include <nvgpu/semaphore.h> 29#include <nvgpu/semaphore.h>
30#include <nvgpu/pramin.h> 30#include <nvgpu/pramin.h>
31#include <nvgpu/enabled.h> 31#include <nvgpu/enabled.h>
32 32#include <nvgpu/gk20a.h>
33#include "gk20a/gk20a.h"
34 33
35/* 34/*
36 * Attempt to find a reserved memory area to determine PTE size for the passed 35 * Attempt to find a reserved memory area to determine PTE size for the passed
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
index 68d68ad6..c49dcfd2 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
@@ -23,8 +23,8 @@
23 */ 23 */
24 24
25#include <nvgpu/allocator.h> 25#include <nvgpu/allocator.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "gk20a/gk20a.h"
28#include "gk20a/mm_gk20a.h" 28#include "gk20a/mm_gk20a.h"
29 29
30u64 nvgpu_alloc_length(struct nvgpu_allocator *a) 30u64 nvgpu_alloc_length(struct nvgpu_allocator *a)
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
index 5cfaded0..8f6bd66e 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
@@ -25,9 +25,7 @@
25#include <nvgpu/nvgpu_mem.h> 25#include <nvgpu/nvgpu_mem.h>
26#include <nvgpu/dma.h> 26#include <nvgpu/dma.h>
27#include <nvgpu/vidmem.h> 27#include <nvgpu/vidmem.h>
28 28#include <nvgpu/gk20a.h>
29#include "gk20a/gk20a.h"
30
31/* 29/*
32 * Make sure to use the right coherency aperture if you use this function! This 30 * Make sure to use the right coherency aperture if you use this function! This
33 * will not add any checks. If you want to simply use the default coherency then 31 * will not add any checks. If you want to simply use the default coherency then
diff --git a/drivers/gpu/nvgpu/common/mm/pd_cache.c b/drivers/gpu/nvgpu/common/mm/pd_cache.c
index a8ed10e7..d9dc3db0 100644
--- a/drivers/gpu/nvgpu/common/mm/pd_cache.c
+++ b/drivers/gpu/nvgpu/common/mm/pd_cache.c
@@ -27,8 +27,8 @@
27#include <nvgpu/nvgpu_mem.h> 27#include <nvgpu/nvgpu_mem.h>
28#include <nvgpu/list.h> 28#include <nvgpu/list.h>
29#include <nvgpu/log2.h> 29#include <nvgpu/log2.h>
30#include <nvgpu/gk20a.h>
30 31
31#include "gk20a/gk20a.h"
32#include "gk20a/mm_gk20a.h" 32#include "gk20a/mm_gk20a.h"
33 33
34#define pd_dbg(g, fmt, args...) nvgpu_log(g, gpu_dbg_pd_cache, fmt, ##args) 34#define pd_dbg(g, fmt, args...) nvgpu_log(g, gpu_dbg_pd_cache, fmt, ##args)
diff --git a/drivers/gpu/nvgpu/common/mm/vidmem.c b/drivers/gpu/nvgpu/common/mm/vidmem.c
index 3f5e0fbb..06cf053b 100644
--- a/drivers/gpu/nvgpu/common/mm/vidmem.c
+++ b/drivers/gpu/nvgpu/common/mm/vidmem.c
@@ -27,8 +27,8 @@
27#include <nvgpu/page_allocator.h> 27#include <nvgpu/page_allocator.h>
28#include <nvgpu/enabled.h> 28#include <nvgpu/enabled.h>
29#include <nvgpu/sizes.h> 29#include <nvgpu/sizes.h>
30#include <nvgpu/gk20a.h>
30 31
31#include "gk20a/gk20a.h"
32#include "gk20a/mm_gk20a.h" 32#include "gk20a/mm_gk20a.h"
33#include "gk20a/fence_gk20a.h" 33#include "gk20a/fence_gk20a.h"
34 34
diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c
index 33587e5d..1e6c4601 100644
--- a/drivers/gpu/nvgpu/common/mm/vm.c
+++ b/drivers/gpu/nvgpu/common/mm/vm.c
@@ -34,10 +34,9 @@
34#include <nvgpu/enabled.h> 34#include <nvgpu/enabled.h>
35#include <nvgpu/sizes.h> 35#include <nvgpu/sizes.h>
36#include <nvgpu/timers.h> 36#include <nvgpu/timers.h>
37 37#include <nvgpu/gk20a.h>
38#include <nvgpu/vgpu/vm.h> 38#include <nvgpu/vgpu/vm.h>
39 39
40#include "gk20a/gk20a.h"
41#include "gk20a/mm_gk20a.h" 40#include "gk20a/mm_gk20a.h"
42 41
43struct nvgpu_ctag_buffer_info { 42struct nvgpu_ctag_buffer_info {
diff --git a/drivers/gpu/nvgpu/common/mm/vm_area.c b/drivers/gpu/nvgpu/common/mm/vm_area.c
index ac4708af..363995fb 100644
--- a/drivers/gpu/nvgpu/common/mm/vm_area.c
+++ b/drivers/gpu/nvgpu/common/mm/vm_area.c
@@ -23,8 +23,8 @@
23#include <nvgpu/vm.h> 23#include <nvgpu/vm.h>
24#include <nvgpu/vm_area.h> 24#include <nvgpu/vm_area.h>
25#include <nvgpu/barrier.h> 25#include <nvgpu/barrier.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "gk20a/gk20a.h"
28#include "gk20a/mm_gk20a.h" 28#include "gk20a/mm_gk20a.h"
29 29
30struct nvgpu_vm_area *nvgpu_vm_area_find(struct vm_gk20a *vm, u64 addr) 30struct nvgpu_vm_area *nvgpu_vm_area_find(struct vm_gk20a *vm, u64 addr)
diff --git a/drivers/gpu/nvgpu/common/nvlink.c b/drivers/gpu/nvgpu/common/nvlink.c
index 966a14a1..8f0bf94a 100644
--- a/drivers/gpu/nvgpu/common/nvlink.c
+++ b/drivers/gpu/nvgpu/common/nvlink.c
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include <gk20a/gk20a.h> 17#include <nvgpu/gk20a.h>
18#include <nvgpu/nvlink.h> 18#include <nvgpu/nvlink.h>
19#include <nvgpu/enabled.h> 19#include <nvgpu/enabled.h>
20 20
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu.c b/drivers/gpu/nvgpu/common/pmu/pmu.c
index ffc9ec39..fe36ab87 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu.c
@@ -29,8 +29,7 @@
29#include <nvgpu/timers.h> 29#include <nvgpu/timers.h>
30#include <nvgpu/bug.h> 30#include <nvgpu/bug.h>
31#include <nvgpu/utils.h> 31#include <nvgpu/utils.h>
32 32#include <nvgpu/gk20a.h>
33#include "gk20a/gk20a.h"
34 33
35static int nvgpu_pg_init_task(void *arg); 34static int nvgpu_pg_init_task(void *arg);
36 35
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_debug.c b/drivers/gpu/nvgpu/common/pmu/pmu_debug.c
index 68a39432..11f972b8 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_debug.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_debug.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -25,10 +25,9 @@
25#include <nvgpu/timers.h> 25#include <nvgpu/timers.h>
26#include <nvgpu/kmem.h> 26#include <nvgpu/kmem.h>
27#include <nvgpu/dma.h> 27#include <nvgpu/dma.h>
28#include <nvgpu/gk20a.h>
28#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> 29#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
29 30
30#include "gk20a/gk20a.h"
31
32void nvgpu_pmu_dump_elpg_stats(struct nvgpu_pmu *pmu) 31void nvgpu_pmu_dump_elpg_stats(struct nvgpu_pmu *pmu)
33{ 32{
34 struct gk20a *g = pmu->g; 33 struct gk20a *g = pmu->g;
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c
index c1416493..21d03306 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c
@@ -27,8 +27,7 @@
27#include <nvgpu/firmware.h> 27#include <nvgpu/firmware.h>
28#include <nvgpu/enabled.h> 28#include <nvgpu/enabled.h>
29#include <nvgpu/utils.h> 29#include <nvgpu/utils.h>
30 30#include <nvgpu/gk20a.h>
31#include "gk20a/gk20a.h"
32 31
33#include "boardobj/boardobj.h" 32#include "boardobj/boardobj.h"
34#include "boardobj/boardobjgrp.h" 33#include "boardobj/boardobjgrp.h"
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
index 01b91662..6f1ca88a 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
@@ -27,8 +27,7 @@
27#include <nvgpu/bug.h> 27#include <nvgpu/bug.h>
28#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> 28#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
29#include <nvgpu/falcon.h> 29#include <nvgpu/falcon.h>
30 30#include <nvgpu/gk20a.h>
31#include "gk20a/gk20a.h"
32 31
33void nvgpu_pmu_seq_init(struct nvgpu_pmu *pmu) 32void nvgpu_pmu_seq_init(struct nvgpu_pmu *pmu)
34{ 33{
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c b/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c
index 12ab4422..57a4ea40 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c
@@ -25,8 +25,7 @@
25#include <nvgpu/log.h> 25#include <nvgpu/log.h>
26#include <nvgpu/bug.h> 26#include <nvgpu/bug.h>
27#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> 27#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
28 28#include <nvgpu/gk20a.h>
29#include "gk20a/gk20a.h"
30 29
31static u8 get_perfmon_id(struct nvgpu_pmu *pmu) 30static u8 get_perfmon_id(struct nvgpu_pmu *pmu)
32{ 31{
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
index d2615b1a..3d46298d 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
@@ -26,8 +26,7 @@
26#include <nvgpu/barrier.h> 26#include <nvgpu/barrier.h>
27#include <nvgpu/bug.h> 27#include <nvgpu/bug.h>
28#include <nvgpu/utils.h> 28#include <nvgpu/utils.h>
29 29#include <nvgpu/gk20a.h>
30#include "gk20a/gk20a.h"
31 30
32/* state transition : 31/* state transition :
33 * OFF => [OFF_ON_PENDING optional] => ON_PENDING => ON => OFF 32 * OFF => [OFF_ON_PENDING optional] => ON_PENDING => ON => OFF
diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c
index 26bf1038..289489cd 100644
--- a/drivers/gpu/nvgpu/common/pramin.c
+++ b/drivers/gpu/nvgpu/common/pramin.c
@@ -25,8 +25,7 @@
25#include <nvgpu/enabled.h> 25#include <nvgpu/enabled.h>
26#include <nvgpu/sizes.h> 26#include <nvgpu/sizes.h>
27#include <nvgpu/io.h> 27#include <nvgpu/io.h>
28 28#include <nvgpu/gk20a.h>
29#include "gk20a/gk20a.h"
30 29
31/* 30/*
32 * This typedef is for functions that get called during the access_batched() 31 * This typedef is for functions that get called during the access_batched()
diff --git a/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gm20b.c b/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gm20b.c
index 41a5391d..e30d94f9 100644
--- a/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gm20b.c
+++ b/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gm20b.c
@@ -20,8 +20,7 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#include "gk20a/gk20a.h" 23#include <nvgpu/gk20a.h>
24
25#include <nvgpu/log.h> 24#include <nvgpu/log.h>
26#include <nvgpu/timers.h> 25#include <nvgpu/timers.h>
27#include <nvgpu/enabled.h> 26#include <nvgpu/enabled.h>
diff --git a/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gp10b.c b/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gp10b.c
index f8a136c6..47403711 100644
--- a/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gp10b.c
+++ b/drivers/gpu/nvgpu/common/priv_ring/priv_ring_gp10b.c
@@ -22,13 +22,12 @@
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24 24
25#include "gk20a/gk20a.h"
26
27#include <nvgpu/log.h> 25#include <nvgpu/log.h>
28#include <nvgpu/timers.h> 26#include <nvgpu/timers.h>
29#include <nvgpu/enabled.h> 27#include <nvgpu/enabled.h>
30#include <nvgpu/io.h> 28#include <nvgpu/io.h>
31#include <nvgpu/utils.h> 29#include <nvgpu/utils.h>
30#include <nvgpu/gk20a.h>
32 31
33#include <nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h> 32#include <nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h>
34#include <nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h> 33#include <nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h>
diff --git a/drivers/gpu/nvgpu/common/ptimer/ptimer.c b/drivers/gpu/nvgpu/common/ptimer/ptimer.c
index 992ea3d6..4f0b3131 100644
--- a/drivers/gpu/nvgpu/common/ptimer/ptimer.c
+++ b/drivers/gpu/nvgpu/common/ptimer/ptimer.c
@@ -22,8 +22,7 @@
22 22
23#include <nvgpu/ptimer.h> 23#include <nvgpu/ptimer.h>
24#include <nvgpu/timers.h> 24#include <nvgpu/timers.h>
25 25#include <nvgpu/gk20a.h>
26#include "gk20a/gk20a.h"
27 26
28int nvgpu_get_timestamps_zipper(struct gk20a *g, 27int nvgpu_get_timestamps_zipper(struct gk20a *g,
29 u32 source_id, u32 count, 28 u32 source_id, u32 count,
diff --git a/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c b/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c
index eeb6e460..cbbacac7 100644
--- a/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c
+++ b/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c
@@ -22,8 +22,8 @@
22 22
23#include <nvgpu/log.h> 23#include <nvgpu/log.h>
24#include <nvgpu/io.h> 24#include <nvgpu/io.h>
25#include <nvgpu/gk20a.h>
25 26
26#include "gk20a/gk20a.h"
27#include "ptimer_gk20a.h" 27#include "ptimer_gk20a.h"
28 28
29#include <nvgpu/hw/gk20a/hw_timer_gk20a.h> 29#include <nvgpu/hw/gk20a/hw_timer_gk20a.h>
diff --git a/drivers/gpu/nvgpu/common/semaphore.c b/drivers/gpu/nvgpu/common/semaphore.c
index 44321770..08297c1a 100644
--- a/drivers/gpu/nvgpu/common/semaphore.c
+++ b/drivers/gpu/nvgpu/common/semaphore.c
@@ -29,8 +29,8 @@
29#include <nvgpu/bug.h> 29#include <nvgpu/bug.h>
30#include <nvgpu/sizes.h> 30#include <nvgpu/sizes.h>
31#include <nvgpu/channel.h> 31#include <nvgpu/channel.h>
32#include <nvgpu/gk20a.h>
32 33
33#include "gk20a/gk20a.h"
34#include "gk20a/mm_gk20a.h" 34#include "gk20a/mm_gk20a.h"
35 35
36#define pool_to_gk20a(p) ((p)->sema_sea->gk20a) 36#define pool_to_gk20a(p) ((p)->sema_sea->gk20a)
diff --git a/drivers/gpu/nvgpu/common/sim.c b/drivers/gpu/nvgpu/common/sim.c
index 618e8ffb..8ad39b8c 100644
--- a/drivers/gpu/nvgpu/common/sim.c
+++ b/drivers/gpu/nvgpu/common/sim.c
@@ -29,8 +29,7 @@
29#include <nvgpu/sim.h> 29#include <nvgpu/sim.h>
30#include <nvgpu/utils.h> 30#include <nvgpu/utils.h>
31#include <nvgpu/bug.h> 31#include <nvgpu/bug.h>
32 32#include <nvgpu/gk20a.h>
33#include "gk20a/gk20a.h"
34 33
35int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem) 34int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem)
36{ 35{
diff --git a/drivers/gpu/nvgpu/common/sim_pci.c b/drivers/gpu/nvgpu/common/sim_pci.c
index 5f2344b4..cd7d90ca 100644
--- a/drivers/gpu/nvgpu/common/sim_pci.c
+++ b/drivers/gpu/nvgpu/common/sim_pci.c
@@ -28,8 +28,7 @@
28#include <nvgpu/io.h> 28#include <nvgpu/io.h>
29#include <nvgpu/utils.h> 29#include <nvgpu/utils.h>
30#include <nvgpu/bug.h> 30#include <nvgpu/bug.h>
31 31#include <nvgpu/gk20a.h>
32#include "gk20a/gk20a.h"
33 32
34static inline u32 sim_msg_header_size(void) 33static inline u32 sim_msg_header_size(void)
35{ 34{
diff --git a/drivers/gpu/nvgpu/common/sync/channel_sync.c b/drivers/gpu/nvgpu/common/sync/channel_sync.c
index fa08a7d3..116e5701 100644
--- a/drivers/gpu/nvgpu/common/sync/channel_sync.c
+++ b/drivers/gpu/nvgpu/common/sync/channel_sync.c
@@ -29,11 +29,11 @@
29#include <nvgpu/bug.h> 29#include <nvgpu/bug.h>
30#include <nvgpu/list.h> 30#include <nvgpu/list.h>
31#include <nvgpu/nvhost.h> 31#include <nvgpu/nvhost.h>
32#include <nvgpu/gk20a.h>
32#include <nvgpu/os_fence.h> 33#include <nvgpu/os_fence.h>
33#include <nvgpu/channel.h> 34#include <nvgpu/channel.h>
34#include <nvgpu/channel_sync.h> 35#include <nvgpu/channel_sync.h>
35 36
36#include "gk20a/gk20a.h"
37#include "gk20a/fence_gk20a.h" 37#include "gk20a/fence_gk20a.h"
38#include "gk20a/mm_gk20a.h" 38#include "gk20a/mm_gk20a.h"
39 39
diff --git a/drivers/gpu/nvgpu/common/therm/therm.c b/drivers/gpu/nvgpu/common/therm/therm.c
index cfe8a2c1..8c88ff0d 100644
--- a/drivers/gpu/nvgpu/common/therm/therm.c
+++ b/drivers/gpu/nvgpu/common/therm/therm.c
@@ -23,8 +23,7 @@
23#include <nvgpu/types.h> 23#include <nvgpu/types.h>
24#include <nvgpu/log.h> 24#include <nvgpu/log.h>
25#include <nvgpu/therm.h> 25#include <nvgpu/therm.h>
26 26#include <nvgpu/gk20a.h>
27#include "gk20a/gk20a.h"
28 27
29int nvgpu_init_therm_support(struct gk20a *g) 28int nvgpu_init_therm_support(struct gk20a *g)
30{ 29{
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gm20b.c b/drivers/gpu/nvgpu/common/therm/therm_gm20b.c
index 023ec36a..925f6951 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gm20b.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gm20b.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include "gk20a/gk20a.h" 26#include <nvgpu/gk20a.h>
27 27
28#include "therm_gm20b.h" 28#include "therm_gm20b.h"
29 29
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp106.c b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
index b22cefeb..b1490613 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gp106.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
@@ -21,8 +21,7 @@
21 */ 21 */
22 22
23#include <nvgpu/io.h> 23#include <nvgpu/io.h>
24 24#include <nvgpu/gk20a.h>
25#include "gk20a/gk20a.h"
26 25
27#include "therm_gp106.h" 26#include "therm_gp106.h"
28#include "therm/thrmpmu.h" 27#include "therm/thrmpmu.h"
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp10b.c b/drivers/gpu/nvgpu/common/therm/therm_gp10b.c
index 905ff178..8b5371a9 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gp10b.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gp10b.c
@@ -21,13 +21,12 @@
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24
25#include "gk20a/gk20a.h"
26#include "therm_gp10b.h"
27
28#include <nvgpu/soc.h> 24#include <nvgpu/soc.h>
29#include <nvgpu/io.h> 25#include <nvgpu/io.h>
30#include <nvgpu/utils.h> 26#include <nvgpu/utils.h>
27#include <nvgpu/gk20a.h>
28
29#include "therm_gp10b.h"
31 30
32#include <nvgpu/hw/gp10b/hw_therm_gp10b.h> 31#include <nvgpu/hw/gp10b/hw_therm_gp10b.h>
33 32
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gv11b.c b/drivers/gpu/nvgpu/common/therm/therm_gv11b.c
index 419dd75e..971848fb 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gv11b.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gv11b.c
@@ -21,18 +21,15 @@
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24
25#include "gk20a/gk20a.h"
26#include "therm_gv11b.h"
27
28#include <nvgpu/soc.h> 24#include <nvgpu/soc.h>
29#include <nvgpu/io.h> 25#include <nvgpu/io.h>
30#include <nvgpu/utils.h> 26#include <nvgpu/utils.h>
31 27#include <nvgpu/gk20a.h>
32#include <nvgpu/hw/gv11b/hw_therm_gv11b.h>
33 28
34#include "therm_gv11b.h" 29#include "therm_gv11b.h"
35 30
31#include <nvgpu/hw/gv11b/hw_therm_gv11b.h>
32
36int gv11b_init_therm_setup_hw(struct gk20a *g) 33int gv11b_init_therm_setup_hw(struct gk20a *g)
37{ 34{
38 u32 v; 35 u32 v;
diff --git a/drivers/gpu/nvgpu/common/top/top_gv100.c b/drivers/gpu/nvgpu/common/top/top_gv100.c
index 138528a2..1a7137fb 100644
--- a/drivers/gpu/nvgpu/common/top/top_gv100.c
+++ b/drivers/gpu/nvgpu/common/top/top_gv100.c
@@ -23,8 +23,8 @@
23 */ 23 */
24 24
25#include <nvgpu/io.h> 25#include <nvgpu/io.h>
26#include <nvgpu/gk20a.h>
26 27
27#include "gk20a/gk20a.h"
28#include "top_gv100.h" 28#include "top_gv100.h"
29 29
30#include <nvgpu/hw/gv100/hw_top_gv100.h> 30#include <nvgpu/hw/gv100/hw_top_gv100.h>
diff --git a/drivers/gpu/nvgpu/common/vbios/bios.c b/drivers/gpu/nvgpu/common/vbios/bios.c
index 4e851b39..4d9f785c 100644
--- a/drivers/gpu/nvgpu/common/vbios/bios.c
+++ b/drivers/gpu/nvgpu/common/vbios/bios.c
@@ -22,10 +22,9 @@
22 22
23#include <nvgpu/bios.h> 23#include <nvgpu/bios.h>
24#include <nvgpu/io.h> 24#include <nvgpu/io.h>
25#include <nvgpu/gk20a.h>
25#include <nvgpu/hw/gp106/hw_gc6_gp106.h> 26#include <nvgpu/hw/gp106/hw_gc6_gp106.h>
26 27
27#include "gk20a/gk20a.h"
28
29#define BIT_HEADER_ID 0xb8ffU 28#define BIT_HEADER_ID 0xb8ffU
30#define BIT_HEADER_SIGNATURE 0x00544942U 29#define BIT_HEADER_SIGNATURE 0x00544942U
31#define PCI_EXP_ROM_SIG 0xaa55U 30#define PCI_EXP_ROM_SIG 0xaa55U
diff --git a/drivers/gpu/nvgpu/common/xve/xve_gp106.c b/drivers/gpu/nvgpu/common/xve/xve_gp106.c
index 29d97843..d5e5f754 100644
--- a/drivers/gpu/nvgpu/common/xve/xve_gp106.c
+++ b/drivers/gpu/nvgpu/common/xve/xve_gp106.c
@@ -19,15 +19,14 @@
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22
23#include "gk20a/gk20a.h"
24#include "gp106/bios_gp106.h"
25
26#include <nvgpu/bug.h> 22#include <nvgpu/bug.h>
27#include <nvgpu/xve.h> 23#include <nvgpu/xve.h>
28#include <nvgpu/io.h> 24#include <nvgpu/io.h>
29#include <nvgpu/utils.h> 25#include <nvgpu/utils.h>
30#include <nvgpu/timers.h> 26#include <nvgpu/timers.h>
27#include <nvgpu/gk20a.h>
28
29#include "gp106/bios_gp106.h"
31 30
32#include "xve_gp106.h" 31#include "xve_gp106.h"
33 32
diff --git a/drivers/gpu/nvgpu/common/xve/xve_gp106.h b/drivers/gpu/nvgpu/common/xve/xve_gp106.h
index 992f0c86..fcf50658 100644
--- a/drivers/gpu/nvgpu/common/xve/xve_gp106.h
+++ b/drivers/gpu/nvgpu/common/xve/xve_gp106.h
@@ -23,10 +23,9 @@
23#ifndef NVGPU_XVE_GP106_H 23#ifndef NVGPU_XVE_GP106_H
24#define NVGPU_XVE_GP106_H 24#define NVGPU_XVE_GP106_H
25 25
26#include "gk20a/gk20a.h"
27
28#include <nvgpu/log2.h> 26#include <nvgpu/log2.h>
29#include <nvgpu/types.h> 27#include <nvgpu/types.h>
28#include <nvgpu/gk20a.h>
30 29
31int gp106_init_xve_ops(struct gpu_ops *gops); 30int gp106_init_xve_ops(struct gpu_ops *gops);
32 31