Commit e2c5ce04 authored by Russell King's avatar Russell King

[ARM] Remove ARM specific set_pmd()

set_pmd has specific behaviour on ARM which may be unexpected.  Since
it is rather too close to macros used by other architectures, open
code this functionality.
Signed-off-by: default avatarRussell King <rmk@arm.linux.org.uk>
parent c0b3fe33
......@@ -259,9 +259,11 @@ static void __init map_sa1100_gpio_regs( void )
unsigned long phys = __PREG(GPLR) & PMD_MASK;
unsigned long virt = io_p2v(phys);
int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO);
pmd_t pmd;
pmd_val(pmd) = phys | prot;
set_pmd(pmd_offset(pgd_offset_k(virt), virt), pmd);
pmd_t *pmd;
pmd = pmd_offset(pgd_offset_k(virt), virt);
*pmd = __pmd(phys | prot);
flush_pmd_entry(pmd);
}
/*
......
......@@ -252,7 +252,8 @@ alloc_init_section(unsigned long virt, unsigned long phys, int prot)
if (virt & (1 << 20))
pmdp++;
set_pmd(pmdp, __pmd(phys | prot));
*pmdp = __pmd(phys | prot);
flush_pmd_entry(pmdp);
}
/*
......@@ -568,8 +569,9 @@ void setup_mm_for_reboot(char mode)
if (cpu_arch <= CPU_ARCH_ARMv5)
pmdval |= PMD_BIT4;
pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT);
set_pmd(pmd, __pmd(pmdval));
set_pmd(pmd + 1, __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))));
pmd[0] = __pmd(pmdval);
pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
flush_pmd_entry(pmd);
}
}
......
......@@ -316,12 +316,6 @@ PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG);
#define pmd_present(pmd) (pmd_val(pmd))
#define pmd_bad(pmd) (pmd_val(pmd) & 2)
#define set_pmd(pmdp,pmd) \
do { \
*(pmdp) = pmd; \
flush_pmd_entry(pmdp); \
} while (0)
#define copy_pmd(pmdpd,pmdps) \
do { \
pmdpd[0] = pmdps[0]; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment