diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/posix/os_posix.h')
-rw-r--r-- | drivers/gpu/nvgpu/os/posix/os_posix.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/posix/os_posix.h b/drivers/gpu/nvgpu/os/posix/os_posix.h index 955186ef..ff8c9817 100644 --- a/drivers/gpu/nvgpu/os/posix/os_posix.h +++ b/drivers/gpu/nvgpu/os/posix/os_posix.h | |||
@@ -25,8 +25,34 @@ | |||
25 | 25 | ||
26 | #include "gk20a/gk20a.h" | 26 | #include "gk20a/gk20a.h" |
27 | 27 | ||
28 | struct nvgpu_posix_io_callbacks; | ||
29 | |||
28 | struct nvgpu_os_posix { | 30 | struct nvgpu_os_posix { |
29 | struct gk20a g; | 31 | struct gk20a g; |
32 | |||
33 | |||
34 | /* | ||
35 | * IO callbacks for handling the nvgpu IO accessors. | ||
36 | */ | ||
37 | struct nvgpu_posix_io_callbacks *callbacks; | ||
38 | |||
39 | /* | ||
40 | * Memory-mapped register space for unit tests. | ||
41 | */ | ||
42 | struct nvgpu_list_node reg_space_head; | ||
43 | int error_code; | ||
44 | |||
45 | |||
46 | /* | ||
47 | * List to record sequence of register writes. | ||
48 | */ | ||
49 | struct nvgpu_list_node recorder_head; | ||
50 | bool recording; | ||
30 | }; | 51 | }; |
31 | 52 | ||
53 | static inline struct nvgpu_os_posix *nvgpu_os_posix_from_gk20a(struct gk20a *g) | ||
54 | { | ||
55 | return container_of(g, struct nvgpu_os_posix, g); | ||
56 | } | ||
57 | |||
32 | #endif | 58 | #endif |