Skip to content

Fix issues with huge mapping in ioremap for ARM64

Chintan Pandya linux-arm-kernel lkml stable 14 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v13 Latest3 patches 8 repliesIn review
  2. v125 patches 10 repliesSuperseded
  3. v11 posting 2/24 patches 0 repliesSuperseded
Earlier versions · 11
VersionPostedPatchesRepliesStatus
v11 posting 1/21 of 4 patches0 repliesSuperseded
v104 patches1 replySuperseded
v94 patches4 repliesSuperseded
v84 patches7 repliesSuperseded
v74 patches1 replySuperseded
v63 of 4 patches1 replySuperseded
v54 patches3 repliesSuperseded
v43 patches3 repliesSuperseded
v33 patches4 repliesSuperseded
v24 patches13 repliesSuperseded
v14 patches12 repliesSuperseded

Patches in v13 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ioremap: Update pgtable free interfaces with addrarch/arm64/mm/mmu.c arch/x86/mm/pgtable.c include/asm-generic/pgtable.h +1 more+13 -111 reply
2/3arm64: tlbflush: Introduce __flush_tlb_kernel_pgtablearch/arm64/include/asm/tlbflush.h+7 -01 reply
3/3arm64: Implement page table free interfacesarch/arm64/mm/mmu.c+44 -43 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchWill Deacon
1/3R-b
2/3A-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v13 thread

Cover letter [PATCH v13 0/3] Fix issues with huge mapping in ioremap for ARM64

This series of patches re-bring huge vmap back for arm64.

Patch 1/3 has been taken by Toshi in his series of patches by name "[PATCH v3 0/3] fix free pmd/pte page handlings on x86" to avoid merge conflict with this series.

These patches are tested on 4.16 kernel with Cortex-A75 based SoC.

The test used for verifying these patches is a stress test on ioremap/unmap which tries to re-use same io-address but changes size of mapping randomly i.e. 4K to 2M to 1G etc. The same test used to reproduce 3rd level translation fault without these fixes (and also of course with Revert "arm64: Enforce BBM for huge IO/VMAP mappings" being part of the tree).

These patches can also go into '-stable' branch (if accepted) for 4.6 onwards.

Quoted 1 line

From V12->V13:

- Dropped v12 3/5 and v12 5/5
- Using existing APIs like pte_offset_kernel and pmd_offset instead of pmd_page_vaddr & pud_page_vaddr
- Updated commit log message for 3/3
- Some other cosmetic corrections in 3/3

Quoted 1 line

From V11->V12:

- Introduced p*d_page_vaddr helper macros and using them
- Rebased over current tip

Quoted 1 line

From V10->V11:

- Updated pud_free_pmd_page & pmd_free_pte_page to use consistent conding style
- Fixed few bugs by using pmd_page_paddr & pud_page_paddr

Quoted 1 line

From V9->V10:

- Updated commit log for patch 1/4 by Toshi
- Addressed review comments by Will on patch 3/4

Quoted 1 line

From V8->V9:

- Used __TLBI_VADDR macros in new TLB flush API

Quoted 1 line

From V7->V8:

- Properly fixed compilation issue in x86 file

Quoted 1 line

From V6->V7:

- Fixed compilation issue in x86 case
- V6 patches were not properly enumarated

Quoted 1 line

From V5->V6:

- Use __flush_tlb_kernel_pgtable() for both PUD and PMD. Remove "bool tlb_inv" based variance as it is not need now
- Re-naming for consistency

Quoted 1 line

From V4->V5:

- Add new API __flush_tlb_kernel_pgtable(unsigned long addr) for kernel addresses

Quoted 1 line

From V3->V4:

- Add header for 'addr' in x86 implementation
- Re-order pmd/pud clear and table free
- Avoid redundant TLB invalidatation in one perticular case

Quoted 1 line

From V2->V3:

- Use the exisiting page table free interface to do arm64 specific things

Quoted 1 line

From V1->V2:

- Rebased my patches on top of "[PATCH v2 1/2] mm/vmalloc:
Add interfaces to free unmapped page table"
- Honored BBM for ARM64

Chintan Pandya (3):
ioremap: Update pgtable free interfaces with addr
arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable
arm64: Implement page table free interfaces

 arch/arm64/include/asm/tlbflush.h |  7 ++++++
 arch/arm64/mm/mmu.c               | 48 +++++++++++++++++++++++++++++++++++----
 arch/x86/mm/pgtable.c             |  8 ++++---
 include/asm-generic/pgtable.h     |  8 +++----
 lib/ioremap.c                     |  4 ++--
 5 files changed, 62 insertions(+), 13 deletions(-)
Signature · 3 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation
Center, Inc., is a member of Code Aurora Forum, a Linux Foundation
Collaborative Project