提交 adf9d70b 编写于 作者: N Natanael Copa 提交者: Peter Maydell

xen: replace ffsl with ctzl

ffsl is a GNU extension and not available in musl libc.

See also 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.
Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
[PMM: rebased to accommodate file rename to xen-hvm.c]
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 6ad3f09b
...@@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state, ...@@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
for (i = 0; i < ARRAY_SIZE(bitmap); i++) { for (i = 0; i < ARRAY_SIZE(bitmap); i++) {
unsigned long map = bitmap[i]; unsigned long map = bitmap[i];
while (map != 0) { while (map != 0) {
j = ffsl(map) - 1; j = ctzl(map);
map &= ~(1ul << j); map &= ~(1ul << j);
memory_region_set_dirty(framebuffer, memory_region_set_dirty(framebuffer,
(i * width + j) * TARGET_PAGE_SIZE, (i * width + j) * TARGET_PAGE_SIZE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册