ia64/xen-unstable

changeset 7700:6d298cac0e8d

Bug fix in error handling in get_page_from_l4e()
author mafetter@aosda.research.intel-research.net
date Tue Nov 08 12:26:48 2005 +0100 (2005-11-08)
parents 0f62ea79cd8d
children c665ab5a6b44
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue Nov 08 11:38:32 2005 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Tue Nov 08 12:26:48 2005 +0100
     1.3 @@ -507,7 +507,7 @@ get_page_from_l2e(
     1.4          l2e_get_pfn(l2e), PGT_l1_page_table | vaddr, d);
     1.5  
     1.6  #if CONFIG_PAGING_LEVELS == 2
     1.7 -    if (!rc)
     1.8 +    if ( unlikely(!rc) )
     1.9          rc = get_linear_pagetable(l2e, pfn, d);
    1.10  #endif
    1.11      return rc;
    1.12 @@ -540,7 +540,7 @@ get_page_from_l3e(
    1.13          l3e_get_pfn(l3e),
    1.14          PGT_l2_page_table | vaddr, d);
    1.15  #if CONFIG_PAGING_LEVELS == 3
    1.16 -    if (!rc)
    1.17 +    if ( unlikely(!rc) )
    1.18          rc = get_linear_pagetable(l3e, pfn, d);
    1.19  #endif
    1.20      return rc;
    1.21 @@ -575,9 +575,9 @@ get_page_from_l4e(
    1.22          PGT_l3_page_table | vaddr, d);
    1.23  
    1.24      if ( unlikely(!rc) )
    1.25 -        return get_linear_pagetable(l4e, pfn, d);
    1.26 -
    1.27 -    return 1;
    1.28 +        rc = get_linear_pagetable(l4e, pfn, d);
    1.29 +
    1.30 +    return rc;
    1.31  }
    1.32  
    1.33  #endif /* 4 level */