ARM: mm: HugeTLB support for non-LPAE systems.
authorSteve Capper <steve.capper@arm.com>
Fri, 8 Feb 2013 15:01:21 +0000 (17:01 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 10 Feb 2013 17:57:12 +0000 (19:57 +0200)
commitc4eb13efe84a0618aa0aad796f869e486187d182
tree9f45e21c8a8273f60e643b5694356fad1f397049
parent39168b47420443c600166c0c8571a69e6101290c
ARM: mm: HugeTLB support for non-LPAE systems.

Based on Bill Carson's HugeTLB patch, with the big difference being
in the way PTEs are passed back to the memory manager. Rather than
store a "Linux Huge PTE" separately; we make one up on the fly in
huge_ptep_get. Also rather than consider 16M supersections, we focus
solely on 2x1M sections.

To construct a huge PTE on the fly we need additional information
(such as the accessed flag and dirty bit) which we choose to store
in the domain bits of the short section descriptor. In order to use
these domain bits for storage, we need to make ourselves a client
for all 16 domains and this is done in head.S.

Storing extra information in the domain bits also makes it a lot
easier to implement Transparent Huge Pages, and some of the code in
pgtable-2level.h is arranged to facilitate THP support in a later
patch.

Non-LPAE HugeTLB pages are incompatible with the huge page migration
code (enabled when CONFIG_MEMORY_FAILURE is selected) as that code
dereferences PTEs directly, rather than calling huge_ptep_get and
set_huge_pte_at.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
arch/arm/Kconfig
arch/arm/include/asm/hugetlb-2level.h [new file with mode: 0644]
arch/arm/include/asm/hugetlb.h
arch/arm/include/asm/pgtable-2level.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/tlb.h
arch/arm/kernel/head.S
arch/arm/mm/fault.c
arch/arm/mm/fsr-2level.c
arch/arm/mm/mmu.c