summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorsmadhavan <smadhavan@nvidia.com>2018-09-06 11:10:34 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-10 07:54:07 -0400
commit5366778e8e81da276dd4ceb3bf70fb2e9256a3b1 (patch)
tree028109ac53bfdd4ed9cc4e730a75a990cac8bdd0 /drivers/gpu/nvgpu/include
parent66f7bcc2f841f43e9bcd2a854361d6783bdb030e (diff)
nvgpu: include: MISRA Rule 21.2 header guard fixes
MISRA rule 21.2 doesn't allow the use of macro names which start with an underscore. These leading underscores are to be removed from the macro names. This patch will fix such violations in the include directory by renaming them to follow the convention, 'NVGPU_PARENT-DIR_HEADER_H'. JIRA NVGPU-1028 Change-Id: I14e3558c80511314e32ef79c2b609a9fd9cf0a44 Signed-off-by: smadhavan <smadhavan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1813123 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/bsearch.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/circ_buf.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/clk_arb.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/debug.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/dma.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/errno.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/error_notifier.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/firmware.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/fuse.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/io.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/io_usermode.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/log2.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/ltc.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/nvhost.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/os_fence.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/os_sched.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pci.h6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/soc.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/sort.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/unit.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vgpu/vm.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vidmem.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vm_area.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/xve.h8
25 files changed, 94 insertions, 92 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/bsearch.h b/drivers/gpu/nvgpu/include/nvgpu/bsearch.h
index 872701e6..46a2d049 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/bsearch.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/bsearch.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_BSEARCH_H__ 22#ifndef NVGPU_BSEARCH_H
23#define __NVGPU_BSEARCH_H__ 23#define NVGPU_BSEARCH_H
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#include <linux/bsearch.h> 26#include <linux/bsearch.h>
@@ -28,4 +28,4 @@
28#include <stdlib.h> 28#include <stdlib.h>
29#endif 29#endif
30 30
31#endif 31#endif /*NVGPU_BSEARCH_H*/
diff --git a/drivers/gpu/nvgpu/include/nvgpu/circ_buf.h b/drivers/gpu/nvgpu/include/nvgpu/circ_buf.h
index 4dd9e0d8..76998caf 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/circ_buf.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/circ_buf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_CIRC_BUF_H__ 22#ifndef NVGPU_CIRC_BUF_H
23#define __NVGPU_CIRC_BUF_H__ 23#define NVGPU_CIRC_BUF_H
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#include <linux/circ_buf.h> 26#include <linux/circ_buf.h>
@@ -28,4 +28,4 @@
28#include <nvgpu/posix/circ_buf.h> 28#include <nvgpu/posix/circ_buf.h>
29#endif 29#endif
30 30
31#endif 31#endif /* NVGPU_CIRC_BUF_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
index e63545df..46952f1c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_CLK_ARB_H__ 23#ifndef NVGPU_CLK_ARB_H
24#define __NVGPU_CLK_ARB_H__ 24#define NVGPU_CLK_ARB_H
25 25
26struct gk20a; 26struct gk20a;
27 27
@@ -368,5 +368,5 @@ void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev);
368#ifdef CONFIG_DEBUG_FS 368#ifdef CONFIG_DEBUG_FS
369int nvgpu_clk_arb_debugfs_init(struct gk20a *g); 369int nvgpu_clk_arb_debugfs_init(struct gk20a *g);
370#endif 370#endif
371#endif /* __NVGPU_CLK_ARB_H__ */ 371#endif /* NVGPU_CLK_ARB_H */
372 372
diff --git a/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h b/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
index 4eaf9bf0..2da6b837 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_CTXSW_TRACE_H__ 23#ifndef NVGPU_CTXSW_TRACE_H
24#define __NVGPU_CTXSW_TRACE_H__ 24#define NVGPU_CTXSW_TRACE_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27 27
@@ -90,4 +90,4 @@ int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma);
90 90
91u8 nvgpu_gpu_ctxsw_tags_to_common_tags(u8 tags); 91u8 nvgpu_gpu_ctxsw_tags_to_common_tags(u8 tags);
92 92
93#endif 93#endif /*NVGPU_CTXSW_TRACE_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/debug.h b/drivers/gpu/nvgpu/include/nvgpu/debug.h
index c2811319..900850c3 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/debug.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/debug.h
@@ -1,6 +1,8 @@
1/* 1/*
2 * GK20A Debug functionality 2 * GK20A Debug functionality
3 * 3 *
4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 *
4 * 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
5 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation 8 * to deal in the Software without restriction, including without limitation
@@ -20,8 +22,8 @@
20 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
21 */ 23 */
22 24
23#ifndef __NVGPU_DEBUG_H__ 25#ifndef NVGPU_DEBUG_H
24#define __NVGPU_DEBUG_H__ 26#define NVGPU_DEBUG_H
25 27
26struct gk20a; 28struct gk20a;
27struct gpu_ops; 29struct gpu_ops;
@@ -56,4 +58,4 @@ static inline void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink
56static inline void gk20a_debug_deinit(struct gk20a *g) {} 58static inline void gk20a_debug_deinit(struct gk20a *g) {}
57#endif 59#endif
58 60
59#endif /* __NVGPU_DEBUG_H__ */ 61#endif /* NVGPU_DEBUG_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/dma.h b/drivers/gpu/nvgpu/include/nvgpu/dma.h
index f6f264cf..6a13e577 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/dma.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/dma.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_DMA_H__ 23#ifndef NVGPU_DMA_H
24#define __NVGPU_DMA_H__ 24#define NVGPU_DMA_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27 27
@@ -358,4 +358,4 @@ void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem);
358void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem); 358void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem);
359void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem); 359void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem);
360 360
361#endif 361#endif /* NVGPU_DMA_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/errno.h b/drivers/gpu/nvgpu/include/nvgpu/errno.h
index 12ba118e..7e8b1105 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/errno.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/errno.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_ERRNO_H__ 23#ifndef NVGPU_ERRNO_H
24#define __NVGPU_ERRNO_H__ 24#define NVGPU_ERRNO_H
25 25
26/* 26/*
27 * Explicit include to get all the -E* error messages. Useful for header files 27 * Explicit include to get all the -E* error messages. Useful for header files
@@ -38,4 +38,4 @@
38 * TODO: add else path above for QNX. 38 * TODO: add else path above for QNX.
39 */ 39 */
40 40
41#endif 41#endif /* NVGPU_ERRNO_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/error_notifier.h b/drivers/gpu/nvgpu/include/nvgpu/error_notifier.h
index 3e70c379..7ba01e97 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/error_notifier.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/error_notifier.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_ERROR_NOTIFIER_H__ 23#ifndef NVGPU_ERROR_NOTIFIER_H
24#define __NVGPU_ERROR_NOTIFIER_H__ 24#define NVGPU_ERROR_NOTIFIER_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27 27
@@ -46,4 +46,4 @@ void nvgpu_set_error_notifier(struct channel_gk20a *ch, u32 error);
46void nvgpu_set_error_notifier_if_empty(struct channel_gk20a *ch, u32 error); 46void nvgpu_set_error_notifier_if_empty(struct channel_gk20a *ch, u32 error);
47bool nvgpu_is_error_notifier_set(struct channel_gk20a *ch, u32 error_notifier); 47bool nvgpu_is_error_notifier_set(struct channel_gk20a *ch, u32 error_notifier);
48 48
49#endif /* __NVGPU_ERROR_NOTIFIER_H__ */ 49#endif /* NVGPU_ERROR_NOTIFIER_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/firmware.h b/drivers/gpu/nvgpu/include/nvgpu/firmware.h
index cde897ed..54d67956 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/firmware.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/firmware.h
@@ -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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef _NVGPU_FIRMWARE_H_ 23#ifndef NVGPU_FIRMWARE_H
24#define _NVGPU_FIRMWARE_H_ 24#define NVGPU_FIRMWARE_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27 27
@@ -71,4 +71,4 @@ struct nvgpu_firmware *nvgpu_request_firmware(struct gk20a *g,
71 */ 71 */
72void nvgpu_release_firmware(struct gk20a *g, struct nvgpu_firmware *fw); 72void nvgpu_release_firmware(struct gk20a *g, struct nvgpu_firmware *fw);
73 73
74#endif 74#endif /* NVGPU_FIRMWARE_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/fuse.h b/drivers/gpu/nvgpu/include/nvgpu/fuse.h
index fb04eef1..1d459a91 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/fuse.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/fuse.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_FUSE_H__ 22#ifndef NVGPU_FUSE_H
23#define __NVGPU_FUSE_H__ 23#define NVGPU_FUSE_H
24 24
25struct gk20a; 25struct gk20a;
26 26
@@ -35,4 +35,4 @@ void nvgpu_tegra_fuse_write_opt_gpu_tpc1_disable(struct gk20a *g, u32 val);
35int nvgpu_tegra_fuse_read_gcplex_config_fuse(struct gk20a *g, u32 *val); 35int nvgpu_tegra_fuse_read_gcplex_config_fuse(struct gk20a *g, u32 *val);
36int nvgpu_tegra_fuse_read_reserved_calib(struct gk20a *g, u32 *val); 36int nvgpu_tegra_fuse_read_reserved_calib(struct gk20a *g, u32 *val);
37 37
38#endif 38#endif /* NVGPU_FUSE_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/io.h b/drivers/gpu/nvgpu/include/nvgpu/io.h
index fb7783fe..d6cc16e8 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/io.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/io.h
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_IO_H__ 22#ifndef NVGPU_IO_H
23#define __NVGPU_IO_H__ 23#define NVGPU_IO_H
24 24
25#include <nvgpu/types.h> 25#include <nvgpu/types.h>
26 26
@@ -46,4 +46,4 @@ u32 nvgpu_bar1_readl(struct gk20a *g, u32 b);
46bool nvgpu_io_exists(struct gk20a *g); 46bool nvgpu_io_exists(struct gk20a *g);
47bool nvgpu_io_valid_reg(struct gk20a *g, u32 r); 47bool nvgpu_io_valid_reg(struct gk20a *g, u32 r);
48 48
49#endif 49#endif /* NVGPU_IO_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h b/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h
index a756ef44..f56062ba 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h
@@ -19,9 +19,9 @@
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#ifndef __NVGPU_IO_USERMODE_H__ 22#ifndef NVGPU_IO_USERMODE_H
23#define __NVGPU_IO_USERMODE_H__ 23#define NVGPU_IO_USERMODE_H
24 24
25void nvgpu_usermode_writel(struct gk20a *g, u32 r, u32 v); 25void nvgpu_usermode_writel(struct gk20a *g, u32 r, u32 v);
26 26
27#endif 27#endif /* NVGPU_IO_USERMODE_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/log2.h b/drivers/gpu/nvgpu/include/nvgpu/log2.h
index 57b77217..98db1ecc 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/log2.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/log2.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_LOG2_H__ 22#ifndef NVGPU_LOG2_H
23#define __NVGPU_LOG2_H__ 23#define NVGPU_LOG2_H
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#include <linux/log2.h> 26#include <linux/log2.h>
@@ -28,4 +28,4 @@
28#include <nvgpu/posix/log2.h> 28#include <nvgpu/posix/log2.h>
29#endif 29#endif
30 30
31#endif /* __NVGPU_LOG2_H__ */ 31#endif /* NVGPU_LOG2_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/ltc.h b/drivers/gpu/nvgpu/include/nvgpu/ltc.h
index 21edcba7..a674a291 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/ltc.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/ltc.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_LTC_H__ 23#ifndef NVGPU_LTC_H
24#define __NVGPU_LTC_H__ 24#define NVGPU_LTC_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27 27
@@ -32,4 +32,4 @@ void nvgpu_ltc_sync_enabled(struct gk20a *g);
32int nvgpu_ltc_alloc_cbc(struct gk20a *g, size_t compbit_backing_size, 32int nvgpu_ltc_alloc_cbc(struct gk20a *g, size_t compbit_backing_size,
33 bool vidmem_alloc); 33 bool vidmem_alloc);
34 34
35#endif 35#endif /* NVGPU_LTC_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h
index 7d50d222..74dc48b5 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_NVHOST_H__ 23#ifndef NVGPU_NVHOST_H
24#define __NVGPU_NVHOST_H__ 24#define NVGPU_NVHOST_H
25 25
26#ifdef CONFIG_TEGRA_GK20A_NVHOST 26#ifdef CONFIG_TEGRA_GK20A_NVHOST
27 27
@@ -109,4 +109,4 @@ static inline int nvgpu_nvhost_syncpt_init(struct gk20a *g)
109} 109}
110#endif 110#endif
111#endif /* CONFIG_TEGRA_GK20A_NVHOST */ 111#endif /* CONFIG_TEGRA_GK20A_NVHOST */
112#endif /* __NVGPU_NVHOST_H__ */ 112#endif /* NVGPU_NVHOST_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h
index fe5d9ced..272b0761 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h
@@ -22,8 +22,8 @@
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24 24
25#ifndef __NVGPU_OS_FENCE__ 25#ifndef NVGPU_OS_FENCE_H
26#define __NVGPU_OS_FENCE__ 26#define NVGPU_OS_FENCE_H
27 27
28#include <nvgpu/errno.h> 28#include <nvgpu/errno.h>
29 29
@@ -135,4 +135,4 @@ static inline int nvgpu_os_fence_syncpt_create(
135 135
136#endif /* CONFIG_TEGRA_GK20A_NVHOST && CONFIG_SYNC */ 136#endif /* CONFIG_TEGRA_GK20A_NVHOST && CONFIG_SYNC */
137 137
138#endif /* __NVGPU_OS_FENCE__ */ 138#endif /* NVGPU_OS_FENCE_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
index d1e44b06..c8843b1b 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_OS_SCHED_H__ 23#ifndef NVGPU_OS_SCHED_H
24#define __NVGPU_OS_SCHED_H__ 24#define NVGPU_OS_SCHED_H
25 25
26#include <nvgpu/log.h> 26#include <nvgpu/log.h>
27 27
@@ -48,4 +48,4 @@ void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line,
48#define nvgpu_print_current(g, ctx, type) \ 48#define nvgpu_print_current(g, ctx, type) \
49 __nvgpu_print_current(g, __func__, __LINE__, ctx, type) 49 __nvgpu_print_current(g, __func__, __LINE__, ctx, type)
50 50
51#endif /* __NVGPU_OS_SCHED_H__ */ 51#endif /* NVGPU_OS_SCHED_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pci.h b/drivers/gpu/nvgpu/include/nvgpu/pci.h
index 388e6de8..b38465af 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pci.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pci.h
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_PCI_H__ 23#ifndef NVGPU_PCI_H
24#define __NVGPU_PCI_H__ 24#define NVGPU_PCI_H
25 25
26#ifdef __KERNEL__ 26#ifdef __KERNEL__
27#include <linux/pci_ids.h> 27#include <linux/pci_ids.h>
@@ -36,4 +36,4 @@
36#error "Build bug: need PCI headers!" 36#error "Build bug: need PCI headers!"
37#endif 37#endif
38 38
39#endif 39#endif /* NVGPU_PCI_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/soc.h b/drivers/gpu/nvgpu/include/nvgpu/soc.h
index fc7f6341..729d8af4 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/soc.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/soc.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_SOC_H__ 22#ifndef NVGPU_SOC_H
23#define __NVGPU_SOC_H__ 23#define NVGPU_SOC_H
24 24
25#include <nvgpu/types.h> 25#include <nvgpu/types.h>
26 26
@@ -34,4 +34,4 @@ bool nvgpu_is_bpmp_running(struct gk20a *g);
34bool nvgpu_is_soc_t194_a01(struct gk20a *g); 34bool nvgpu_is_soc_t194_a01(struct gk20a *g);
35int nvgpu_init_soc_vars(struct gk20a *g); 35int nvgpu_init_soc_vars(struct gk20a *g);
36 36
37#endif 37#endif /* NVGPU_SOC_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/sort.h b/drivers/gpu/nvgpu/include/nvgpu/sort.h
index 20d86680..80bae4b5 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/sort.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/sort.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_SORT_H__ 22#ifndef NVGPU_SORT_H
23#define __NVGPU_SORT_H__ 23#define NVGPU_SORT_H
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#include <linux/sort.h> 26#include <linux/sort.h>
@@ -30,4 +30,4 @@
30#include <nvgpu_rmos/include/sort.h> 30#include <nvgpu_rmos/include/sort.h>
31#endif 31#endif
32 32
33#endif 33#endif /* NVGPU_SORT_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/unit.h b/drivers/gpu/nvgpu/include/nvgpu/unit.h
index ea929916..f919392e 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/unit.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/unit.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_UNITS_H__ 23#ifndef NVGPU_UNIT_H
24#define __NVGPU_UNITS_H__ 24#define NVGPU_UNIT_H
25 25
26/* 26/*
27 * Enumeration of all units intended to be used by any HAL that requires 27 * Enumeration of all units intended to be used by any HAL that requires
@@ -33,4 +33,4 @@ enum nvgpu_unit {
33 NVGPU_UNIT_FIFO, 33 NVGPU_UNIT_FIFO,
34}; 34};
35 35
36#endif 36#endif /* NVGPU_UNIT_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/vm.h
index 0092fa28..fc0078de 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/vm.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/vm.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,12 +20,12 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_VM_VGPU_H__ 23#ifndef NVGPU_VGPU_VM_H
24#define __NVGPU_VM_VGPU_H__ 24#define NVGPU_VGPU_VM_H
25 25
26#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 26#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
27int vgpu_vm_init(struct gk20a *g, struct vm_gk20a *vm); 27int vgpu_vm_init(struct gk20a *g, struct vm_gk20a *vm);
28void vgpu_vm_remove(struct vm_gk20a *vm); 28void vgpu_vm_remove(struct vm_gk20a *vm);
29#endif 29#endif
30 30
31#endif 31#endif /* NVGPU_VGPU_VM_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h
index 4809bcd4..4470232d 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_VIDMEM_H__ 23#ifndef NVGPU_VIDMEM_H
24#define __NVGPU_VIDMEM_H__ 24#define NVGPU_VIDMEM_H
25 25
26#include <nvgpu/types.h> 26#include <nvgpu/types.h>
27#include <nvgpu/errno.h> 27#include <nvgpu/errno.h>
@@ -145,4 +145,4 @@ static inline void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm)
145#define vidmem_dbg(g, fmt, args...) \ 145#define vidmem_dbg(g, fmt, args...) \
146 nvgpu_log(g, gpu_dbg_vidmem, fmt, ##args); \ 146 nvgpu_log(g, gpu_dbg_vidmem, fmt, ##args); \
147 147
148#endif /* __NVGPU_VIDMEM_H__ */ 148#endif /* NVGPU_VIDMEM_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm_area.h b/drivers/gpu/nvgpu/include/nvgpu/vm_area.h
index 53e1cb85..8778e424 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vm_area.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vm_area.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -20,8 +20,8 @@
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef __NVGPU_VM_AREA_H__ 23#ifndef NVGPU_VM_AREA_H
24#define __NVGPU_VM_AREA_H__ 24#define NVGPU_VM_AREA_H
25 25
26#include <nvgpu/list.h> 26#include <nvgpu/list.h>
27#include <nvgpu/types.h> 27#include <nvgpu/types.h>
@@ -72,4 +72,4 @@ int nvgpu_vm_area_validate_buffer(struct vm_gk20a *vm,
72 u64 map_offset, u64 map_size, u32 pgsz_idx, 72 u64 map_offset, u64 map_size, u32 pgsz_idx,
73 struct nvgpu_vm_area **pvm_area); 73 struct nvgpu_vm_area **pvm_area);
74 74
75#endif 75#endif /* NVGPU_VM_AREA_H */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/xve.h b/drivers/gpu/nvgpu/include/nvgpu/xve.h
index 1c47e1c5..acaf441c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/xve.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/xve.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-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"),
@@ -19,8 +19,8 @@
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#ifndef __NVGPU_XVE_H__ 22#ifndef NVGPU_XVE_H
23#define __NVGPU_XVE_H__ 23#define NVGPU_XVE_H
24 24
25#include <nvgpu/types.h> 25#include <nvgpu/types.h>
26#include <nvgpu/log2.h> 26#include <nvgpu/log2.h>
@@ -64,4 +64,4 @@ static inline const char *xve_speed_to_str(u32 speed)
64 "Unknown ???"; 64 "Unknown ???";
65} 65}
66 66
67#endif 67#endif /* NVGPU_XVE_H */