aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2011-11-29 00:02:45 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:17 -0500
commit37178b8bf00137dbf28a9b291af4fbc1b8f91dcc (patch)
tree3d38ade24b72f406854d3ae58830befc50c54065 /arch/x86/kvm/mmu.c
parent88ebdda6159ffc15699f204c33feb3e431bf9bdc (diff)
KVM: MMU: Remove for_each_unsync_children() macro
There is only one user of it and for_each_set_bit() does the same. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 224b02c3cda9..8a9b27cb4449 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1391,11 +1391,6 @@ struct kvm_mmu_pages {
1391 unsigned int nr; 1391 unsigned int nr;
1392}; 1392};
1393 1393
1394#define for_each_unsync_children(bitmap, idx) \
1395 for (idx = find_first_bit(bitmap, 512); \
1396 idx < 512; \
1397 idx = find_next_bit(bitmap, 512, idx+1))
1398
1399static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, 1394static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp,
1400 int idx) 1395 int idx)
1401{ 1396{
@@ -1417,7 +1412,7 @@ static int __mmu_unsync_walk(struct kvm_mmu_page *sp,
1417{ 1412{
1418 int i, ret, nr_unsync_leaf = 0; 1413 int i, ret, nr_unsync_leaf = 0;
1419 1414
1420 for_each_unsync_children(sp->unsync_child_bitmap, i) { 1415 for_each_set_bit(i, sp->unsync_child_bitmap, 512) {
1421 struct kvm_mmu_page *child; 1416 struct kvm_mmu_page *child;
1422 u64 ent = sp->spt[i]; 1417 u64 ent = sp->spt[i];
1423 1418