mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add explicit wmb() before reg write
Add explict memory barrier wmb() before writing to register values. Also call writel_relaxed() instead of writel() to skip internal wmb() call which is conditional on some configs. Bug 200012037 Change-Id: I9c545138314b6e73fec2a4aff2b1956444fac806 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/421463 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Krishna Reddy <vdumpa@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
b7793a493a
commit
6838d9f05e
@@ -483,7 +483,8 @@ static inline void gk20a_mem_wr32(void *ptr, int w, u32 data)
|
||||
static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v)
|
||||
{
|
||||
gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v);
|
||||
writel(v, g->regs + r);
|
||||
wmb();
|
||||
writel_relaxed(v, g->regs + r);
|
||||
}
|
||||
static inline u32 gk20a_readl(struct gk20a *g, u32 r)
|
||||
{
|
||||
@@ -495,7 +496,8 @@ static inline u32 gk20a_readl(struct gk20a *g, u32 r)
|
||||
static inline void gk20a_bar1_writel(struct gk20a *g, u32 b, u32 v)
|
||||
{
|
||||
gk20a_dbg(gpu_dbg_reg, " b=0x%x v=0x%x", b, v);
|
||||
writel(v, g->bar1 + b);
|
||||
wmb();
|
||||
writel_relaxed(v, g->bar1 + b);
|
||||
}
|
||||
|
||||
static inline u32 gk20a_bar1_readl(struct gk20a *g, u32 b)
|
||||
|
||||
Reference in New Issue
Block a user