[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/38] bitmap: use long as index
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH 01/38] bitmap: use long as index |
Date: |
Tue, 17 Dec 2013 19:27:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Am 17.12.2013 19:05, schrieb Eric Blake:
> On 12/17/2013 08:25 AM, Juan Quintela wrote:
>> Move index and size fields from int to long. We need that for
>> migration. long is 64 bits on sane architectures, and 32bits should
>> be enough on all the 32bits architectures.
Does this also work for "insane" architectures like Windows (64 bit) where
long is only 32 bit? Wouldn't uintptr_t or intptr_t be better (also for
x32)?
>>
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>> include/qemu/bitmap.h | 77
++++++++++++++++++++++++++-------------------------
>> include/qemu/bitops.h | 14 +++++-----
>> util/bitmap.c | 60 +++++++++++++++++++--------------------
>> 3 files changed, 76 insertions(+), 75 deletions(-)
>>
>> diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
>> index 308bbb7..afdd257 100644
>> --- a/include/qemu/bitmap.h
>> +++ b/include/qemu/bitmap.h
>> @@ -31,7 +31,7 @@
>> * bitmap_andnot(dst, src1, src2, nbits) *dst = *src1 & ~(*src2)
>> * bitmap_complement(dst, src, nbits) *dst = ~(*src)
>> * bitmap_equal(src1, src2, nbits) Are *src1 and *src2 equal?
>> - * bitmap_intersects(src1, src2, nbits) Do *src1 and *src2 overlap?
>> + * bitmap_intersects(src1, src2, nbits) Do *src1 and *src2
overlap?
>
> Spurious whitespace change?
>
>> * bitmap_empty(src, nbits) Are all bits zero in *src?
>> * bitmap_full(src, nbits) Are all bits set in *src?
>> * bitmap_set(dst, pos, nbits) Set specified bit area
>> @@ -62,71 +62,71 @@
>> )
>>
>> #define DECLARE_BITMAP(name,bits) \
>> - unsigned long name[BITS_TO_LONGS(bits)]
>> + unsigned long name[BITS_TO_LONGS(bits)]
>>
>> #define small_nbits(nbits) \
>> - ((nbits) <= BITS_PER_LONG)
>> + ((nbits) <= BITS_PER_LONG)
>
> Whitespace change, but in same hunk as real changes, so ok for
> checkpatch.pl reasons.
>
>> +++ b/include/qemu/bitops.h
>> @@ -28,7 +28,7 @@
>> * @nr: the bit to set
>> * @addr: the address to start counting from
>> */
>> -static inline void set_bit(int nr, unsigned long *addr)
>> +static inline void set_bit(long nr, unsigned long *addr)
>> {
>> unsigned long mask = BIT_MASK(nr);
>> unsigned long *p = addr + BIT_WORD(nr);
>
> Worth cleaning up this whitespace while in the area?
>
> Content changes seem sane to me:
> Reviewed-by: Eric Blake <address@hidden>
>
Cheers,
Stefan
- [Qemu-devel] [PATCH v3 00/38] bitmap queue, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 02/38] memory: cpu_physical_memory_set_dirty_flags() result is never used, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 03/38] memory: cpu_physical_memory_set_dirty_range() return void, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 01/38] bitmap: use long as index, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 04/38] exec: use accessor function to know if memory is dirty, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 05/38] memory: create function to set a single dirty bit, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 06/38] exec: create function to get a single dirty bit, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 07/38] memory: make cpu_physical_memory_is_dirty return bool, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 08/38] memory: all users of cpu_physical_memory_get_dirty used only one flag, Juan Quintela, 2013/12/17
- [Qemu-devel] [PATCH 09/38] memory: set single dirty flags when possible, Juan Quintela, 2013/12/17