mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: posix: fix GPL dependencies in bitmap
Fix up GPL issues in posix version of bitops. Bug 2919200 Change-Id: I57fdb035b811f47e119cca2278431d3701717d89 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2340983 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Alex Waterman <alexw@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
Alex Waterman
parent
681077d578
commit
f0f126d7cc
@@ -348,29 +348,29 @@ int test_find_zero_area(struct unit_module *m, struct gk20a *g, void *unused)
|
||||
}
|
||||
|
||||
for (i = 0; i < TEST_BITMAP_SIZE; i++) {
|
||||
result = bitmap_find_next_zero_area_off(bmap_all_zeros,
|
||||
result = bitmap_find_next_zero_area(bmap_all_zeros,
|
||||
TEST_BITMAP_SIZE,
|
||||
i,
|
||||
TEST_BITMAP_SIZE - i,
|
||||
0, 0);
|
||||
0);
|
||||
if (result != i)
|
||||
unit_return_fail(m, FAIL_MSG,
|
||||
"all_zeros: alloc-to-end", i);
|
||||
|
||||
result = bitmap_find_next_zero_area_off(bmap_all_zeros,
|
||||
result = bitmap_find_next_zero_area(bmap_all_zeros,
|
||||
TEST_BITMAP_SIZE,
|
||||
i,
|
||||
1,
|
||||
0, 0);
|
||||
0);
|
||||
if (result != i)
|
||||
unit_return_fail(m, FAIL_MSG,
|
||||
"all_zeros: alloc-one-bit", i);
|
||||
|
||||
result = bitmap_find_next_zero_area_off(bmap_all_zeros,
|
||||
result = bitmap_find_next_zero_area(bmap_all_zeros,
|
||||
TEST_BITMAP_SIZE,
|
||||
0,
|
||||
TEST_BITMAP_SIZE - i,
|
||||
0, 0);
|
||||
0);
|
||||
if (result != 0)
|
||||
unit_return_fail(m, FAIL_MSG,
|
||||
"all_zeros: alloc-i-bits-at-0", i);
|
||||
@@ -382,11 +382,11 @@ int test_find_zero_area(struct unit_module *m, struct gk20a *g, void *unused)
|
||||
*/
|
||||
for (i = 0; i < TEST_BITMAP_SIZE; i++) {
|
||||
for (j = 0; j < (TEST_BITMAP_SIZE - i); j++) {
|
||||
result = bitmap_find_next_zero_area_off(bmap_all_ones,
|
||||
result = bitmap_find_next_zero_area(bmap_all_ones,
|
||||
TEST_BITMAP_SIZE,
|
||||
i,
|
||||
j,
|
||||
0, 0);
|
||||
0);
|
||||
if (result != TEST_BITMAP_SIZE)
|
||||
unit_return_fail(m, FAIL_MSG_EX,
|
||||
"all_ones: failed", i, j);
|
||||
@@ -402,11 +402,11 @@ int test_find_zero_area(struct unit_module *m, struct gk20a *g, void *unused)
|
||||
memset(words, 0x0f, sizeof(words));
|
||||
for (i = 0; i < ((NUM_WORDS * BITS_PER_LONG) - 8); i++) {
|
||||
for (j = 0; j < ((NUM_WORDS * BITS_PER_LONG) - i - 8); j++) {
|
||||
result = bitmap_find_next_zero_area_off(words,
|
||||
result = bitmap_find_next_zero_area(words,
|
||||
NUM_WORDS * BITS_PER_LONG,
|
||||
i,
|
||||
j,
|
||||
0, 0);
|
||||
0);
|
||||
|
||||
/*
|
||||
* Should only return a valid result when j < 4 (since
|
||||
@@ -422,27 +422,16 @@ int test_find_zero_area(struct unit_module *m, struct gk20a *g, void *unused)
|
||||
"alternating-nibbles: failed",
|
||||
i, j);
|
||||
|
||||
result = bitmap_find_next_zero_area_off(words,
|
||||
result = bitmap_find_next_zero_area(words,
|
||||
NUM_WORDS * BITS_PER_LONG,
|
||||
i,
|
||||
(j % 4) + 1,
|
||||
0x3, 0);
|
||||
0x3);
|
||||
if (result % 8 != 4)
|
||||
unit_return_fail(m, FAIL_MSG_EX,
|
||||
"basic-align_mask: failed",
|
||||
i, j);
|
||||
|
||||
|
||||
result = bitmap_find_next_zero_area_off(words,
|
||||
NUM_WORDS * BITS_PER_LONG,
|
||||
i,
|
||||
(j % 2) + 1,
|
||||
0x7, 2);
|
||||
|
||||
if (result % 8 != 6)
|
||||
unit_return_fail(m, FAIL_MSG_EX,
|
||||
"basic-align_offset: failed",
|
||||
i, j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user