gpu: nvgpu: Fix timeout in gm20b's LTC flush

The flush timeout should have been comparing between the current
time (jiffies) not the snapshot in time when the L2 flush started.

Change-Id: Idba0ccbfeeab9e3fadd0b5bed7073acefbd403e3
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/729090
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Alex Waterman
2015-04-08 09:47:15 -07:00
committed by Ishan Mittal
parent 3b8c8972ef
commit 72b565452e

View File

@@ -286,15 +286,16 @@ u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base)
void gm20b_flush_ltc(struct gk20a *g)
{
u32 op_pending;
unsigned long now, timeout;
unsigned long timeout;
#define __timeout_init() \
do { \
now = jiffies; timeout = now + HZ; \
timeout = jiffies + HZ; \
} while (0)
#define __timeout_check() \
do { \
if (tegra_platform_is_silicon() && time_after(now, timeout)) { \
if (tegra_platform_is_silicon() && \
time_after(jiffies, timeout)) { \
gk20a_err(dev_from_gk20a(g), "L2 flush timeout!"); \
break; \
} \