xen: use same main loop for counting and remapping pages
authorJuergen Gross <jgross@suse.com>
Wed, 18 May 2016 14:44:54 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:18:51 +0000 (18:18 -0700)
commit22b37b9b71a92bb88a9865a29d671b41a586a100
tree674d1dedf3e53011c8ee6ae0b3c1a75a98d75a74
parent5e90fb436e8831140267abc2d946f10161261791
xen: use same main loop for counting and remapping pages

commit dd14be92fbf5bc1ef7343f34968440e44e21b46a upstream.

Instead of having two functions for cycling through the E820 map in
order to count to be remapped pages and remap them later, just use one
function with a caller supplied sub-function called for each region to
be processed. This eliminates the possibility of a mismatch between
both loops which showed up in certain configurations.

Suggested-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/setup.c