mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: move macros under NON_FUSA flag
Move macros in posix unit that are not used by safety code under NON_FUSA flag. Jira NVGPU-6253 Change-Id: If4227b4a5d8c35652e324e0cf5276293e29fa3f2 Signed-off-by: ajesh <akv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2459298 (cherry picked from commit 86c1b4ca98f9ff7104a1c2e6ce5512a44aafa832) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2461111 GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#define WARN_ON(cond) \
|
||||
((void) nvgpu_posix_warn(cond, ""))
|
||||
|
||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||
/** Define for issuing warning once on condition with message. */
|
||||
#define WARN_ONCE(cond, msg, arg...) \
|
||||
({static bool warn_once_warned = false; \
|
||||
@@ -59,6 +60,7 @@
|
||||
} \
|
||||
cond; })
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Dumps the stack.
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define nvgpu_thread_cleanup_pop_do_not_invoke() \
|
||||
pthread_cleanup_pop((bool)0)
|
||||
|
||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||
/**
|
||||
* Returns the PID of the calling process.
|
||||
*/
|
||||
@@ -69,6 +70,7 @@
|
||||
* Returns the Id of the calling thread.
|
||||
*/
|
||||
#define nvgpu_gettid pthread_self
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Handles passing an nvgpu thread function into a posix thread.
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
/** Round up division for unsigned long long. */
|
||||
#define DIV_ROUND_UP_ULL DIV_ROUND_UP
|
||||
|
||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||
/**
|
||||
* Divide positive or negative dividend by positive or negative divisor
|
||||
* and round to closest integer.
|
||||
@@ -151,6 +152,8 @@
|
||||
(((val) - ((div) / 2)) / (div)); \
|
||||
} \
|
||||
)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Joys of userspace: usually division just works since the compiler can link
|
||||
* against external division functions implicitly.
|
||||
|
||||
Reference in New Issue
Block a user