diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-08-26 19:23:51 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-10-22 15:57:20 -0400 |
commit | 764f0138b9f54aa96761810055a74fce1e58c300 (patch) | |
tree | 18593be4d0f7ebbf1a8cf863251b0ef1f8d3d4d6 /arch | |
parent | f0991802bb4368e33848e7f823caa487d23555fb (diff) |
xen: allocate level1_ident_pgt
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/mmu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 71c6af6c89a5..3de42d1e475b 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -138,7 +138,8 @@ static inline void check_zero(void) | |||
138 | * large enough to allocate page table pages to allocate the rest. | 138 | * large enough to allocate page table pages to allocate the rest. |
139 | * Each page can map 2MB. | 139 | * Each page can map 2MB. |
140 | */ | 140 | */ |
141 | static pte_t level1_ident_pgt[PTRS_PER_PTE * 4] __page_aligned_bss; | 141 | #define LEVEL1_IDENT_ENTRIES (PTRS_PER_PTE * 4) |
142 | static RESERVE_BRK_ARRAY(pte_t, level1_ident_pgt, LEVEL1_IDENT_ENTRIES); | ||
142 | 143 | ||
143 | #ifdef CONFIG_X86_64 | 144 | #ifdef CONFIG_X86_64 |
144 | /* l3 pud for userspace vsyscall mapping */ | 145 | /* l3 pud for userspace vsyscall mapping */ |
@@ -1718,6 +1719,9 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1718 | unsigned ident_pte; | 1719 | unsigned ident_pte; |
1719 | unsigned long pfn; | 1720 | unsigned long pfn; |
1720 | 1721 | ||
1722 | level1_ident_pgt = extend_brk(sizeof(pte_t) * LEVEL1_IDENT_ENTRIES, | ||
1723 | PAGE_SIZE); | ||
1724 | |||
1721 | ident_pte = 0; | 1725 | ident_pte = 0; |
1722 | pfn = 0; | 1726 | pfn = 0; |
1723 | for (pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { | 1727 | for (pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { |
@@ -1728,7 +1732,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1728 | pte_page = m2v(pmd[pmdidx].pmd); | 1732 | pte_page = m2v(pmd[pmdidx].pmd); |
1729 | else { | 1733 | else { |
1730 | /* Check for free pte pages */ | 1734 | /* Check for free pte pages */ |
1731 | if (ident_pte == ARRAY_SIZE(level1_ident_pgt)) | 1735 | if (ident_pte == LEVEL1_IDENT_ENTRIES) |
1732 | break; | 1736 | break; |
1733 | 1737 | ||
1734 | pte_page = &level1_ident_pgt[ident_pte]; | 1738 | pte_page = &level1_ident_pgt[ident_pte]; |