|
44 | 44 | # define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
|
45 | 45 | # define test_bit_le(nr, addr) \
|
46 | 46 | test_bit((nr) ^ BITOP_LE_SWIZZLE, addr)
|
47 |
| -# define set_bit_le(nr, addr) \ |
48 |
| - set_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
49 |
| -# define clear_bit_le(nr, addr) \ |
50 |
| - clear_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
51 |
| -# define test_and_set_bit_le(nr, addr) \ |
52 |
| - test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
53 |
| -# define test_and_clear_bit_le(nr, addr) \ |
54 |
| - test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
| 47 | +# define __set_bit_le(nr, addr) \ |
| 48 | + __set_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
| 49 | +# define __clear_bit_le(nr, addr) \ |
| 50 | + __clear_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
| 51 | +# define __test_and_set_bit_le(nr, addr) \ |
| 52 | + __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
| 53 | +# define __test_and_clear_bit_le(nr, addr) \ |
| 54 | + __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, addr) |
55 | 55 | #else
|
56 |
| -# define test_bit_le test_bit |
57 |
| -# define set_bit_le set_bit |
58 |
| -# define clear_bit_le clear_bit |
59 |
| -# define test_and_set_bit_le test_and_set_bit |
60 |
| -# define test_and_clear_bit_le test_and_clear_bit |
| 56 | +# define test_bit_le test_bit |
| 57 | +# define __set_bit_le __set_bit |
| 58 | +# define __clear_bit_le __clear_bit |
| 59 | +# define __test_and_set_bit_le __test_and_set_bit |
| 60 | +# define __test_and_clear_bit_le __test_and_clear_bit |
61 | 61 | #endif
|
62 | 62 |
|
63 | 63 | #define TEST_DIRTY_RING_COUNT 65536
|
@@ -305,7 +305,7 @@ static uint32_t dirty_ring_collect_one(struct kvm_dirty_gfn *dirty_gfns,
|
305 | 305 | TEST_ASSERT(cur->offset < num_pages, "Offset overflow: "
|
306 | 306 | "0x%llx >= 0x%x", cur->offset, num_pages);
|
307 | 307 | //pr_info("fetch 0x%x page %llu\n", *fetch_index, cur->offset);
|
308 |
| - set_bit_le(cur->offset, bitmap); |
| 308 | + __set_bit_le(cur->offset, bitmap); |
309 | 309 | dirty_ring_last_page = cur->offset;
|
310 | 310 | dirty_gfn_set_collected(cur);
|
311 | 311 | (*fetch_index)++;
|
@@ -560,15 +560,15 @@ static void vm_dirty_log_verify(enum vm_guest_mode mode, unsigned long *bmap)
|
560 | 560 | value_ptr = host_test_mem + page * host_page_size;
|
561 | 561 |
|
562 | 562 | /* If this is a special page that we were tracking... */
|
563 |
| - if (test_and_clear_bit_le(page, host_bmap_track)) { |
| 563 | + if (__test_and_clear_bit_le(page, host_bmap_track)) { |
564 | 564 | host_track_next_count++;
|
565 | 565 | TEST_ASSERT(test_bit_le(page, bmap),
|
566 | 566 | "Page %"PRIu64" should have its dirty bit "
|
567 | 567 | "set in this iteration but it is missing",
|
568 | 568 | page);
|
569 | 569 | }
|
570 | 570 |
|
571 |
| - if (test_and_clear_bit_le(page, bmap)) { |
| 571 | + if (__test_and_clear_bit_le(page, bmap)) { |
572 | 572 | bool matched;
|
573 | 573 |
|
574 | 574 | host_dirty_count++;
|
@@ -661,7 +661,7 @@ static void vm_dirty_log_verify(enum vm_guest_mode mode, unsigned long *bmap)
|
661 | 661 | * should report its dirtyness in the
|
662 | 662 | * next run
|
663 | 663 | */
|
664 |
| - set_bit_le(page, host_bmap_track); |
| 664 | + __set_bit_le(page, host_bmap_track); |
665 | 665 | }
|
666 | 666 | }
|
667 | 667 | }
|
|
0 commit comments