diff options
author | Steve Capper <steve.capper@arm.com> | 2012-07-19 12:00:10 +0100 |
---|---|---|
committer | Steve Capper <steve.capper@linaro.org> | 2013-05-14 15:22:25 +0100 |
commit | 6b5757462e052eb07f2304b591e6d02c9af1256b (patch) | |
tree | 5065948e034f7e7f62897648c54a7a0c6c84cf56 /arch/arm/include/asm/pgtable.h | |
parent | 35ab7d4c8310839b04b7053afab4b307abb7b367 (diff) |
ARM: mm: Transparent huge page support for non-LPAE systems.tracking-hugepages-llct-20130715.0tracking-hugepages-llct-20130708.0tracking-hugepages-llct-20130701.0tracking-hugepages-llct-20130626.0tracking-hugepages-llct-20130625.0tracking-hugepages-llct-20130618.0tracking-hugepages-llct-20130617.1tracking-hugepages-llct-20130617.0tracking-hugepages-llct-20130613.0tracking-hugepages-llct-20130610.0tracking-hugepages-llct-20130606.0tracking-hugepages-llct-20130604.1tracking-hugepages-llct-20130604.0tracking-hugepages-llct-20130521.0tracking-hugepages-llct-20130518.0tracking-hugepages-llct-20130515.1tracking-hugepages-llct-20130515.0tracking-hugepages-llct-20130514.0arm-hugepages-20130514
Much of the required code for THP has been implemented in the
earlier non-LPAE HugeTLB patch.
One more domain bit is used (to store whether or not the THP is
splitting).
Some THP helper functions are defined; and we have to re-define
pmd_page such that it distinguishes between page tables and
sections.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Diffstat (limited to 'arch/arm/include/asm/pgtable.h')
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 8e124ca284ba..d00c4c7f0844 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -185,11 +185,14 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; static inline pte_t *pmd_page_vaddr(pmd_t pmd) { +#ifdef SYS_SUPPORTS_HUGETLBFS + if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_SECT) + return __va(pmd_val(pmd) & HPAGE_MASK); +#endif + return __va(pmd_val(pmd) & PHYS_MASK & (s32)PAGE_MASK); } -#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) - #ifndef CONFIG_HIGHPTE #define __pte_map(pmd) pmd_page_vaddr(*(pmd)) #define __pte_unmap(pte) do { } while (0) |