mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: BUG_ON for sema increment, not value
When adding a sema wait to a pushbuf, verify that the sema threshold has been incremented from the original value by reading the incremented field instead of value (which is set to nonzero by nvgpu_semaphore_incr()). Value could be 0 even after an increment if new semas weren't reset to 0. Jira NVGPU-514 Change-Id: I295451fbc7eb9e597aea12d73074e99f74a6a899 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1658100 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
ca95adb2d4
commit
b063870f90
@@ -625,7 +625,7 @@ static int __semaphore_wait_fd_fast_path(struct channel_gk20a *c,
|
||||
return err;
|
||||
|
||||
nvgpu_semaphore_get(sema);
|
||||
BUG_ON(!nvgpu_atomic_read(&sema->value));
|
||||
BUG_ON(!sema->incremented);
|
||||
add_sema_cmd(c->g, c, sema, wait_cmd, 8, true, false);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user