mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: Don't ioremap() regs when using POSIX
When __NVGPU_POSIX__ is defined do no use ioremap(). This operation probably doesn't make much sense. Currently we have no plans to run the driver in userspace against a real GPU, hence programming the nvlink credits registers is simply not necessary. Also fix an unused variable by returing it as an error. JIRA NVGPU-525 Change-Id: Ic94d332551f6e25c1836331bf92188e7651546cb Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1673815 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User 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:
committed by
mobile promotions
parent
eb54945f18
commit
22a95f15e0
@@ -56,6 +56,7 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g)
|
||||
if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) {
|
||||
nvgpu_log(g, gpu_dbg_info, "nvlink soc credits init done by bpmp");
|
||||
} else {
|
||||
#ifndef __NVGPU_POSIX__
|
||||
/* MSS_NVLINK_1_BASE */
|
||||
void __iomem *soc1 = ioremap(0x01f20010, 4096);
|
||||
/* MSS_NVLINK_2_BASE */
|
||||
@@ -87,6 +88,7 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g)
|
||||
writel_relaxed(val, soc4);
|
||||
val = readl_relaxed(soc4 + 4);
|
||||
writel_relaxed(val, soc4 + 4);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -996,7 +998,7 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g,
|
||||
}
|
||||
}
|
||||
|
||||
static void gv11b_fb_replay_or_cancel_faults(struct gk20a *g,
|
||||
static int gv11b_fb_replay_or_cancel_faults(struct gk20a *g,
|
||||
u32 invalidate_replay_val)
|
||||
{
|
||||
int err = 0;
|
||||
@@ -1017,6 +1019,8 @@ static void gv11b_fb_replay_or_cancel_faults(struct gk20a *g,
|
||||
err = gv11b_fb_mmu_invalidate_replay(g,
|
||||
fb_mmu_invalidate_replay_start_ack_all_f());
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
|
||||
|
||||
Reference in New Issue
Block a user