mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: unify NV_READ_ONCE and NV_WRITE_ONCE
Implemented NV_READ_ONCE and NV_WRITE_ONCE in common code. Jira GVSCI-10879 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Change-Id: I5465b4bd1cd44fc7bc1592da01d6be455b1fcdcc Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2541559 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Aparna Das <aparnad@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5ec1e0cc21
commit
9ac7550f35
@@ -27,6 +27,7 @@
|
||||
#include <unit/unit.h>
|
||||
|
||||
#include <nvgpu/utils.h>
|
||||
#include <nvgpu/barrier.h>
|
||||
|
||||
#include "posix-utils.h"
|
||||
|
||||
@@ -487,10 +488,10 @@ int test_write_once(struct unit_module *m,
|
||||
test1 = 20;
|
||||
for (i = 0 ; i < 10; i++) {
|
||||
test1 += 1;
|
||||
WRITE_ONCE(result, test1);
|
||||
NV_WRITE_ONCE(result, test1);
|
||||
if (result != test1) {
|
||||
unit_return_fail(m,
|
||||
"WRITE_ONCE failure %d\n", result);
|
||||
"NV_WRITE_ONCE failure %d\n", result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user