[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/mm: don't check alloc_boot_pages return
commit 79d5dd06a677fcc8c5a585d95b32c35bd38bc34e Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Wed Aug 16 12:27:22 2017 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Aug 16 12:27:22 2017 +0200 x86/mm: don't check alloc_boot_pages return The only way alloc_boot_pages will return 0 is during the error case. Although, Xen will panic in the error path. So the check in the caller is pointless. Looking at the loop, my understanding is it will try to allocate in smaller chunk if a bigger chunk fail. Given that alloc_boot_pages can never check, the loop seems unecessary. Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/mm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 5b863c6..31fe8a1 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -200,11 +200,7 @@ static void __init init_frametable_chunk(void *start, void *end) */ while ( step && s + (step << PAGE_SHIFT) > e + (4 << PAGE_SHIFT) ) step >>= PAGETABLE_ORDER; - do { - mfn = alloc_boot_pages(step, step); - } while ( !mfn && (step >>= PAGETABLE_ORDER) ); - if ( !mfn ) - panic("Not enough memory for frame table"); + mfn = alloc_boot_pages(step, step); map_pages_to_xen(s, mfn, step, PAGE_HYPERVISOR); } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |