gpu: nvgpu: Userspace POSIX support

Add support for compiling nvgpu in a POSIX compliant userspace.
This code adds all of the necessary abstraction interfaces (mostly
stubbed) to enabled extremely limited and basic functionality in
nvgpu.

The goal of this code is to facilitate unit testing of the nvgpu
common core. By doing this in userspace it is much easier to write
tests that rely on very particular states within nvgpu since a user
can very precisely control the state of nvgpu.

JIRA NVGPU-525

Change-Id: I30e95016df14997d951075777e0585f912dc5960
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1683914
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2018-01-22 16:30:53 -08:00
committed by mobile promotions
parent e6b3bb4e6b
commit 6e739d924f
73 changed files with 5543 additions and 2 deletions

View File

@@ -13,6 +13,8 @@
* more details.
*/
#ifdef __KERNEL__
#undef TRACE_SYSTEM
#define TRACE_SYSTEM gk20a
@@ -577,3 +579,26 @@ DEFINE_EVENT(gk20a_cde, gk20a_cde_finished_ctx_cb,
/* This part must be outside protection */
#include <trace/define_trace.h>
#else /* Not __KERNEL__ */
#define trace_gk20a_mmu_fault(arg...) ((void)(NULL))
#define trace_gk20a_release_used_channel(arg...) ((void)(NULL))
#define trace_gk20a_free_channel(arg...) ((void)(NULL))
#define trace_gk20a_channel_get(arg...) ((void)(NULL))
#define trace_gk20a_channel_put(arg...) ((void)(NULL))
#define trace_gk20a_open_new_channel(arg...) ((void)(NULL))
#define trace_gk20a_channel_update(arg...) ((void)(NULL))
#define trace_gk20a_mm_fb_flush(arg...) ((void)(NULL))
#define trace_gk20a_mm_fb_flush_done(arg...) ((void)(NULL))
#define trace_gk20a_mm_l2_invalidate(arg...) ((void)(NULL))
#define trace_gk20a_mm_l2_invalidate_done(arg...) ((void)(NULL))
#define trace_gk20a_mm_l2_flush(arg...) ((void)(NULL))
#define trace_gk20a_mm_l2_flush_done(arg...) ((void)(NULL))
#define trace_gk20a_mm_tlb_invalidate(arg...) ((void)(NULL))
#define trace_gk20a_mm_tlb_invalidate_done(arg...) ((void)(NULL))
#define trace_gk20a_ltc_cbc_ctrl_start(arg...) ((void)(NULL))
#define trace_gk20a_ltc_cbc_ctrl_done(arg...) ((void)(NULL))
#endif