aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2014-01-07 06:53:35 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2014-05-15 11:12:25 -0400
commitfcca2e3119f3771dcfd0b03b3718b3c51b5f21c3 (patch)
treee289a2c0756dc9b9913130da6b7a0259277d92d5 /arch/x86/xen
parentbc5eb20161ad742a38b7b4deda393e577ade669b (diff)
x86/xen: rename early_p2m_alloc() and early_p2m_alloc_middle()
early_p2m_alloc_middle() allocates a new leaf page and early_p2m_alloc() allocates a new middle page. This is confusing. Swap the names so they match what the functions actually do. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/p2m.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 85e5d78c9874..4fc71cc1705b 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -596,7 +596,7 @@ static bool alloc_p2m(unsigned long pfn)
596 return true; 596 return true;
597} 597}
598 598
599static bool __init early_alloc_p2m_middle(unsigned long pfn, bool check_boundary) 599static bool __init early_alloc_p2m(unsigned long pfn, bool check_boundary)
600{ 600{
601 unsigned topidx, mididx, idx; 601 unsigned topidx, mididx, idx;
602 unsigned long *p2m; 602 unsigned long *p2m;
@@ -638,7 +638,7 @@ static bool __init early_alloc_p2m_middle(unsigned long pfn, bool check_boundary
638 return true; 638 return true;
639} 639}
640 640
641static bool __init early_alloc_p2m(unsigned long pfn) 641static bool __init early_alloc_p2m_middle(unsigned long pfn)
642{ 642{
643 unsigned topidx = p2m_top_index(pfn); 643 unsigned topidx = p2m_top_index(pfn);
644 unsigned long *mid_mfn_p; 644 unsigned long *mid_mfn_p;
@@ -663,7 +663,7 @@ static bool __init early_alloc_p2m(unsigned long pfn)
663 p2m_top_mfn_p[topidx] = mid_mfn_p; 663 p2m_top_mfn_p[topidx] = mid_mfn_p;
664 p2m_top_mfn[topidx] = virt_to_mfn(mid_mfn_p); 664 p2m_top_mfn[topidx] = virt_to_mfn(mid_mfn_p);
665 /* Note: we don't set mid_mfn_p[midix] here, 665 /* Note: we don't set mid_mfn_p[midix] here,
666 * look in early_alloc_p2m_middle */ 666 * look in early_alloc_p2m() */
667 } 667 }
668 return true; 668 return true;
669} 669}
@@ -739,7 +739,7 @@ found:
739 739
740 /* This shouldn't happen */ 740 /* This shouldn't happen */
741 if (WARN_ON(p2m_top[topidx] == p2m_mid_missing)) 741 if (WARN_ON(p2m_top[topidx] == p2m_mid_missing))
742 early_alloc_p2m(set_pfn); 742 early_alloc_p2m_middle(set_pfn);
743 743
744 if (WARN_ON(p2m_top[topidx][mididx] != p2m_missing)) 744 if (WARN_ON(p2m_top[topidx][mididx] != p2m_missing))
745 return false; 745 return false;
@@ -754,13 +754,13 @@ found:
754bool __init early_set_phys_to_machine(unsigned long pfn, unsigned long mfn) 754bool __init early_set_phys_to_machine(unsigned long pfn, unsigned long mfn)
755{ 755{
756 if (unlikely(!__set_phys_to_machine(pfn, mfn))) { 756 if (unlikely(!__set_phys_to_machine(pfn, mfn))) {
757 if (!early_alloc_p2m(pfn)) 757 if (!early_alloc_p2m_middle(pfn))
758 return false; 758 return false;
759 759
760 if (early_can_reuse_p2m_middle(pfn, mfn)) 760 if (early_can_reuse_p2m_middle(pfn, mfn))
761 return __set_phys_to_machine(pfn, mfn); 761 return __set_phys_to_machine(pfn, mfn);
762 762
763 if (!early_alloc_p2m_middle(pfn, false /* boundary crossover OK!*/)) 763 if (!early_alloc_p2m(pfn, false /* boundary crossover OK!*/))
764 return false; 764 return false;
765 765
766 if (!__set_phys_to_machine(pfn, mfn)) 766 if (!__set_phys_to_machine(pfn, mfn))