diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:07:40 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:10:52 -0400 |
commit | 2c5337a24f7f2d02989dfb733c55d6d8c7e90493 (patch) | |
tree | b9f1028cb443b03190b710c0d7ee640bf5958631 /include/nvgpu/bug.h | |
parent | aa06f84f03cba7ad1aae5cd527355bb3d8c152a6 (diff) |
Update includes to L4T r32.7.4 and drop nvgpu/gk20a.h dependency
Also add instructions for updating `include/`. These files are now
only needed to build on Linux 4.9-based Tegra platforms.
Diffstat (limited to 'include/nvgpu/bug.h')
-rw-r--r-- | include/nvgpu/bug.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/nvgpu/bug.h b/include/nvgpu/bug.h index 3d139b7..82d641b 100644 --- a/include/nvgpu/bug.h +++ b/include/nvgpu/bug.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2021, 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"), |
@@ -24,6 +24,24 @@ | |||
24 | 24 | ||
25 | #ifdef __KERNEL__ | 25 | #ifdef __KERNEL__ |
26 | #include <linux/bug.h> | 26 | #include <linux/bug.h> |
27 | /* | ||
28 | * Define an assert macro that code within nvgpu can use. | ||
29 | * | ||
30 | * The goal of this macro is for debugging but what that means varies from OS | ||
31 | * to OS. On Linux wee don't want to BUG() for general driver misbehaving. BUG() | ||
32 | * is a very heavy handed tool - in fact there's probably no where within the | ||
33 | * nvgpu core code where it makes sense to use a BUG() when running under Linux. | ||
34 | * | ||
35 | * However, on QNX (and POSIX) BUG() will just kill the current process. This | ||
36 | * means we can use it for handling bugs in nvgpu. | ||
37 | * | ||
38 | * As a result this macro varies depending on platform. | ||
39 | */ | ||
40 | #define nvgpu_assert(cond) ((void) WARN_ON(!(cond))) | ||
41 | #define nvgpu_do_assert_print(g, fmt, arg...) \ | ||
42 | do { \ | ||
43 | nvgpu_err(g, fmt, ##arg); \ | ||
44 | } while (false) | ||
27 | #elif defined(__NVGPU_POSIX__) | 45 | #elif defined(__NVGPU_POSIX__) |
28 | #include <nvgpu/posix/bug.h> | 46 | #include <nvgpu/posix/bug.h> |
29 | #else | 47 | #else |