ARM: 6667/1: Fix early_pte_alloc() assumption about the Linux PTE
With LPAE we no longer have software bits in a separate Linux PTE and the early_pte_alloc() function should pass PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE to early_alloc() to avoid allocating extra memory. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
36bb94ba36
commit
410f14837a
1 changed files with 1 additions and 1 deletions
|
@ -532,7 +532,7 @@ static void __init *early_alloc(unsigned long sz)
|
||||||
static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot)
|
static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot)
|
||||||
{
|
{
|
||||||
if (pmd_none(*pmd)) {
|
if (pmd_none(*pmd)) {
|
||||||
pte_t *pte = early_alloc(2 * PTRS_PER_PTE * sizeof(pte_t));
|
pte_t *pte = early_alloc(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE);
|
||||||
__pmd_populate(pmd, __pa(pte), prot);
|
__pmd_populate(pmd, __pa(pte), prot);
|
||||||
}
|
}
|
||||||
BUG_ON(pmd_bad(*pmd));
|
BUG_ON(pmd_bad(*pmd));
|
||||||
|
|
Loading…
Add table
Reference in a new issue