diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-11 18:05:21 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-11 18:05:21 +0100 |
| commit | 706808585a49bfd266e00b1c7723b6e1b0f4ff35 (patch) | |
| tree | 661e735294e244c1c07fcc88ea76dfdb4fe93e58 /util/hbitmap.c | |
| parent | c5cb1afc4675bf5ff66e7a149d2a8cffba2eaa9e (diff) | |
| parent | c4af6d4b13cc263b20133096f4de7b48e0aa7b46 (diff) | |
| download | focaccia-qemu-706808585a49bfd266e00b1c7723b6e1b0f4ff35.tar.gz focaccia-qemu-706808585a49bfd266e00b1c7723b6e1b0f4ff35.zip | |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-bsd-user-20140611' into staging
bsd-user queue: * build fixes * improvements to strace # gpg: Signature made Wed 11 Jun 2014 15:23:40 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-bsd-user-20140611: bsd-user: Fix syscall format, add strace support for more syscalls bsd-user: Implement strace support for thr_* syscalls bsd-user: Implement strace support for extattr_* syscalls bsd-user: Implement strace support for __acl_* syscalls bsd-user: Implement strace support for print_ioctl syscall bsd-user: Implement strace support for print_sysctl syscall bsd-user: GPL v2 attribution update and style bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code exec: replace ffsl with ctzl vhost: replace ffsl with ctzl xen: replace ffsl with ctzl util/qemu-openpty: fix build with musl libc by include termios.h as fallback bsd-user/mmap.c: Don't try to override g_malloc/g_free util/hbitmap.c: Use ctpopl rather than reimplementing a local equivalent bsd-user: refresh freebsd system call numbers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/hbitmap.c')
| -rw-r--r-- | util/hbitmap.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/util/hbitmap.c b/util/hbitmap.c index d93683128b..b3060e6976 100644 --- a/util/hbitmap.c +++ b/util/hbitmap.c @@ -92,11 +92,6 @@ struct HBitmap { unsigned long *levels[HBITMAP_LEVELS]; }; -static inline int popcountl(unsigned long l) -{ - return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l); -} - /* Advance hbi to the next nonzero word and return it. hbi->pos * is updated. Returns zero if we reach the end of the bitmap. */ @@ -200,14 +195,14 @@ static uint64_t hb_count_between(HBitmap *hb, uint64_t start, uint64_t last) if (pos >= (end >> BITS_PER_LEVEL)) { break; } - count += popcountl(cur); + count += ctpopl(cur); } if (pos == (end >> BITS_PER_LEVEL)) { /* Drop bits representing the END-th and subsequent items. */ int bit = end & (BITS_PER_LONG - 1); cur &= (1UL << bit) - 1; - count += popcountl(cur); + count += ctpopl(cur); } return count; |