Skip to content

ARM MMU code improvements and on-demand PTE allocation

Andrey Smirnov barebox 4 versions – Applied

Status from this message: Applied, thanks. I skipped 29/29 which hasn't been part of the other

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest29 patches 2 repliesApplied
  2. v328 patches 4 repliesSuperseded
  3. v228 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v128 patches8 repliesSuperseded

Changes in v4 from the cover letter

- Fixed spelling in commit message for 23/28

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/29ARM: mmu: Remove unused ARM_VECTORS_SIZEarch/arm/cpu/mmu.c+0 -60 replies
2/29ARM: mmu: Make use of IS_ALIGNED in arm_mmu_remap_sdram()arch/arm/cpu/mmu.c+1 -10 replies
3/29ARM: mmu: Use ALIGN and ALIGN_DOWN in map_cachable()arch/arm/cpu/mmu-early.c+2 -20 replies
4/29ARM: mmu: Introduce set_ttbr()arch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+7 -40 replies
5/29ARM: mmu: Introduce set_domain()arch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+11 -110 replies
6/29ARM: mmu: Share code for create_sections()arch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+20 -310 replies
7/29ARM: mmu: Separate index and address in create_sections()arch/arm/cpu/mmu.h+8 -20 replies
8/29sizes.h: Sync with Linux 4.16arch/arm/boards/phytec-som-imx6/lowlevel.c include/linux/sizes.h+5 -00 replies
9/29ARM: mmu: Specify size in bytes in create_sections()arch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+9 -90 replies
10/29ARM: mmu: Share code for initial flat mapping creationarch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+10 -80 replies
11/29ARM: mmu: Share PMD_SECT_DEF_CACHEDarch/arm/cpu/mmu-early.c arch/arm/cpu/mmu.h+2 -20 replies
12/29ARM: mmu: Drop needless shifting in map_io_sections()arch/arm/cpu/mmu.c+2 -30 replies
13/29ARM: mmu: Replace hardcoded shifts with pgd_index() from Linuxarch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+12 -80 replies
14/29ARM: mmu: Trivial simplification in arm_mmu_remap_sdram()arch/arm/cpu/mmu.c+1 -10 replies
15/29ARM: mmu: Replace various SZ_1M with PGDIR_SIZEarch/arm/cpu/mmu.c arch/arm/cpu/mmu.h+6 -50 replies
16/29ARM: mmu: Use PAGE_SIZE when specifying size of one pagearch/arm/cpu/mmu.c+2 -20 replies
17/29ARM: mmu: Define and use PTRS_PER_PTEarch/arm/cpu/mmu.c+5 -30 replies
18/29ARM: mmu: Use PAGE_SIZE instead of magic right shift by 12arch/arm/cpu/mmu.c+1 -10 replies
19/29ARM: mmu: Use xmemalign in arm_create_pte()arch/arm/cpu/mmu.c+2 -20 replies
20/29ARM: mmu: Use xmemalign in mmu_init()arch/arm/cpu/mmu.c+1 -10 replies
21/29ARM: mmu: Share code between dma_alloc_*() functionsarch/arm/cpu/mmu.c+8 -140 replies
22/29ARM: mmu: Pass PTE flags a parameter to arm_create_pte()arch/arm/cpu/mmu.c+5 -40 replies
23/29ARM: mmu: Make sure that address is 1M aligned in arm_create_pte()arch/arm/cpu/mmu.c+3 -20 replies
24/29ARM: mmu: Use find_pte() to find PTE in create_vector_table()arch/arm/cpu/mmu.c+4 -50 replies
25/29ARM: mmu: Use dma_inv_range() in dma_sync_single_for_cpu()arch/arm/cpu/mmu.c+2 -50 replies
26/29ARM: mmu: Simplify the use of dma_flush_range()arch/arm/cpu/mmu.c+8 -80 replies
27/29ARM: mmu: Implement on-demand PTE allocationarch/arm/cpu/mmu.c+110 -990 replies
28/29ARM: mmu: Introduce ARM_TTB_SIZEarch/arm/cpu/mmu.c arch/arm/include/asm/barebox-arm.h+8 -20 replies
29/29ARM: mmu: Do not try to pick early TTB uparch/arm/cpu/mmu.c+15 -220 replies

Reviews trailers per patch

2 of 29 patches have a Reviewed-by or Acked-by.

PatchLucas Stach
1/29
2/29
3/29
4/29
5/29
6/29
7/29
8/29
9/29
10/29
11/29
12/29
13/29
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29
22/29
23/29
24/29
25/29R-b
26/29R-b
27/29
28/29
29/29

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

Read the v4 thread

Cover letter [PATCH v4 00/29] ARM MMU code improvements and on-demand PTE allocation

Everyone:

With exeception of patch 27/28, all patches in this series are just small improvements(IMHO) that I made while working with ARM MMU code.

Patch 27/28, OTOH, brings a bit of a change to how MMU code allocates PTEs, postponing that until the users of DMA API actually request that.

Feedback is welcome!

Changes since [v3]:

- Fixed spelling in commit message for 23/28

Changes since [v2]:

- Dropped create_sections() macro.

- Fixed a bug in 6/28, pointed out by Sam

- Minor style changes and comment re-wording

Changes since [v1]:

- create_sections() reworked to keep all of its arguments 32-bits

- Fixed compliation error in 9/28

- Small style fix for 26/28

- Collected Reviewed-by's from Lucas

[v1] http://lists.infradead.org/pipermail/barebox/2018-May/032816.html
[v2] http://lists.infradead.org/pipermail/barebox/2018-May/032880.html
[v3] http://lists.infradead.org/pipermail/barebox/2018-May/032951.html

Andrey Smirnov (29):
ARM: mmu: Remove unused ARM_VECTORS_SIZE
ARM: mmu: Make use of IS_ALIGNED in arm_mmu_remap_sdram()
ARM: mmu: Use ALIGN and ALIGN_DOWN in map_cachable()
ARM: mmu: Introduce set_ttbr()
ARM: mmu: Introduce set_domain()
ARM: mmu: Share code for create_sections()
ARM: mmu: Separate index and address in create_sections() sizes.h: Sync with Linux 4.16
ARM: mmu: Specify size in bytes in create_sections()
ARM: mmu: Share code for initial flat mapping creation
ARM: mmu: Share PMD_SECT_DEF_CACHED
ARM: mmu: Drop needless shifting in map_io_sections()
ARM: mmu: Replace hardcoded shifts with pgd_index() from Linux
ARM: mmu: Trivial simplification in arm_mmu_remap_sdram()
ARM: mmu: Replace various SZ_1M with PGDIR_SIZE
ARM: mmu: Use PAGE_SIZE when specifying size of one page
ARM: mmu: Define and use PTRS_PER_PTE
ARM: mmu: Use PAGE_SIZE instead of magic right shift by 12
ARM: mmu: Use xmemalign in arm_create_pte()
ARM: mmu: Use xmemalign in mmu_init()
ARM: mmu: Share code between dma_alloc_*() functions
ARM: mmu: Pass PTE flags a parameter to arm_create_pte()
ARM: mmu: Make sure that address is 1M aligned in arm_create_pte()
ARM: mmu: Use find_pte() to find PTE in create_vector_table()
ARM: mmu: Use dma_inv_range() in dma_sync_single_for_cpu()
ARM: mmu: Simplify the use of dma_flush_range()
ARM: mmu: Implement on-demand PTE allocation
ARM: mmu: Introduce ARM_TTB_SIZE
ARM: mmu: Do not try to pick early TTB up

 arch/arm/boards/phytec-som-imx6/lowlevel.c |   1 +
 arch/arm/cpu/mmu-early.c                   |  31 +-
 arch/arm/cpu/mmu.c                         | 341 +++++++++------------
 arch/arm/cpu/mmu.h                         |  44 +++
 arch/arm/include/asm/barebox-arm.h         |   8 +-
 include/linux/sizes.h                      |   4 +
 6 files changed, 213 insertions(+), 216 deletions(-)
Signature · 7 lines
2.17.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox