Skip to content

Commit

Permalink
xen: replace ffsl with ctzl
Browse files Browse the repository at this point in the history
ffsl is a GNU extension and not available in musl libc.

See also commit fbeadf5 (bitops: unify bitops_ffsl with the one in
host-utils.h, call it bitops_ctzl) on why ctzl should be used instead
of ffsl.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
[PMM: rebased to accommodate file rename to xen-hvm.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
ncopa authored and pm215 committed Jun 10, 2014
1 parent 6ad3f09 commit adf9d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xen-hvm.c
Expand Up @@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
for (i = 0; i < ARRAY_SIZE(bitmap); i++) {
unsigned long map = bitmap[i];
while (map != 0) {
j = ffsl(map) - 1;
j = ctzl(map);
map &= ~(1ul << j);
memory_region_set_dirty(framebuffer,
(i * width + j) * TARGET_PAGE_SIZE,
Expand Down

0 comments on commit adf9d70

Please sign in to comment.