[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/15] exec: replace ffsl with ctzl
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 07/15] exec: replace ffsl with ctzl |
Date: |
Wed, 11 Jun 2014 15:29:45 +0100 |
From: Natanael Copa <address@hidden>
See commit fbeadf50 (bitops: unify bitops_ffsl with the one in
host-utils.h, call it bitops_ctzl) on why ctzl should be used instead
of ffsl.
This is also needed for musl libc which does not implement ffsl.
Signed-off-by: Natanael Copa <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
include/exec/ram_addr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 2edfa96..b94de02 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -117,7 +117,7 @@ static inline void
cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
if (bitmap[i] != 0) {
c = leul_to_cpu(bitmap[i]);
do {
- j = ffsl(c) - 1;
+ j = ctzl(c);
c &= ~(1ul << j);
page_number = (i * HOST_LONG_BITS + j) * hpratio;
addr = page_number * TARGET_PAGE_SIZE;
--
1.9.2
- [Qemu-devel] [PULL 00/15] bsd-user queue, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 14/15] bsd-user: Implement strace support for thr_* syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 15/15] bsd-user: Fix syscall format, add strace support for more syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 13/15] bsd-user: Implement strace support for extattr_* syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 11/15] bsd-user: Implement strace support for print_ioctl syscall, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 10/15] bsd-user: Implement strace support for print_sysctl syscall, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 07/15] exec: replace ffsl with ctzl,
Peter Maydell <=
- [Qemu-devel] [PULL 02/15] util/hbitmap.c: Use ctpopl rather than reimplementing a local equivalent, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 09/15] bsd-user: GPL v2 attribution update and style, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 08/15] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 06/15] vhost: replace ffsl with ctzl, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 03/15] bsd-user/mmap.c: Don't try to override g_malloc/g_free, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 01/15] bsd-user: refresh freebsd system call numbers, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 04/15] util/qemu-openpty: fix build with musl libc by include termios.h as fallback, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 12/15] bsd-user: Implement strace support for __acl_* syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl, Peter Maydell, 2014/06/11
- Re: [Qemu-devel] [PULL 00/15] bsd-user queue, Peter Maydell, 2014/06/11