mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
xen: switch extra memory accounting to use pfns
Instead of using physical addresses for accounting of extra memory areas available for ballooning switch to pfns as this is much less error prone regarding partial pages. Reported-by: Roger Pau Monné <[email protected]> Tested-by: Roger Pau Monné <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: David Vrabel <[email protected]>
This commit is contained in:
parent
cb9e444b5a
commit
626d750866
3 changed files with 49 additions and 41 deletions
|
|
@ -638,9 +638,9 @@ static int __init balloon_init(void)
|
|||
* regions (see arch/x86/xen/setup.c).
|
||||
*/
|
||||
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++)
|
||||
if (xen_extra_mem[i].size)
|
||||
balloon_add_region(PFN_UP(xen_extra_mem[i].start),
|
||||
PFN_DOWN(xen_extra_mem[i].size));
|
||||
if (xen_extra_mem[i].n_pfns)
|
||||
balloon_add_region(xen_extra_mem[i].start_pfn,
|
||||
xen_extra_mem[i].n_pfns);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue