diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/bug.h b/drivers/gpu/nvgpu/include/nvgpu/posix/bug.h index 00c46168e..06d166576 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/bug.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/bug.h @@ -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. diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h b/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h index 535e034db..e8ff6e0a5 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/thread.h @@ -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. diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h b/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h index ec89f1630..91029fa1b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/utils.h @@ -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.