diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-09-27 16:21:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-13 18:19:55 -0400 |
commit | be3750bc9eb60f8696c20b7298cc282eea17ac1b (patch) | |
tree | b36fb818ce58a96fc7f2822480433057bd28faf4 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | ff9c3fc20a27444cd1ff7d9402965023e425f404 (diff) |
gpu: nvgpu: Abstract IO aperture accessors
Add abstraction of IO aperture accessors. Add new functions
gk20a_io_exists() and gk20a_io_valid_reg() to remove dependencies to
aperture fields from common code.
Implement Linux version of the abstraction by moving gk20a_readl()
and gk20a_writel() to new Linux specific io.c. Move the fields
defining IO aperture to nvgpu_os_linux.
Add t19x specific IO aperture initialization functions and add t19x
specific section to nvgpu_os_linux.
JIRA NVGPU-259
Change-Id: I09e79cda60d11a20d1099a9aaa6d2375236e94ce
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1569698
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 707bfb87..6f829282 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -5256,8 +5256,7 @@ static inline bool is_valid_cyclestats_bar0_offset_gk20a(struct gk20a *g, | |||
5256 | is_bar0_global_offset_whitelisted_gk20a(g, offset); | 5256 | is_bar0_global_offset_whitelisted_gk20a(g, offset); |
5257 | /* resource size check in case there was a problem | 5257 | /* resource size check in case there was a problem |
5258 | * with allocating the assumed size of bar0 */ | 5258 | * with allocating the assumed size of bar0 */ |
5259 | valid = valid && | 5259 | valid = valid && gk20a_io_valid_reg(g, offset); |
5260 | offset < resource_size(g->regs); | ||
5261 | return valid; | 5260 | return valid; |
5262 | } | 5261 | } |
5263 | #endif | 5262 | #endif |