Skip to content

common/board_f: Make reserve_mmu generic

Ovidiu Panait u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v11 patch 0 repliesSuperseded

Changes in v2 from the cover letter

- split the original patch in 3 parts
- add function comments
- drop #ifdefs around asm/cache.h includes
- drop reserve_mmu function and leave only arch_reserve_mmu

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.carch/arm/lib/cache.c common/board_f.c+28 -282 replies
2/3arm: asm/cache.c: Introduce arm_reserve_mmuarch/arm/include/asm/cache.h arch/arm/lib/cache.c arch/arm/mach-versal/cpu.c +1 more+20 -22 replies
3/3common/board_f: Make reserve_mmu genericarch/arm/lib/cache.c common/board_f.c include/init.h+19 -52 replies

Reviews trailers per patch

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

PatchSimon Glass
1/3R-b
2/3R-b
3/3R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] common/board_f: Make reserve_mmu generic

Changes in v2:
- split the original patch in 3 parts
- add function comments
- drop #ifdefs around asm/cache.h includes
- drop reserve_mmu function and leave only arch_reserve_mmu

For the following suggestion:
"Can you please try to use if() instead of #if as much as possible?"

I tried replacing in reserve_mmu
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
with
if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
...
}
but it caused compile issues on different arm platforms such as:
...
arch/arm/lib/cache.c: In function 'arm_reserve_mmu':
arch/arm/lib/cache.c:134:11: error: 'volatile struct arch_global_data' has no member named 'tlb_size'

   gd->arch.tlb_size = PGTABLE_SIZE;
           ^
arch/arm/lib/cache.c:135:28: error: 'volatile struct arch_global_data' has no member named 'tlb_size'
   gd->relocaddr -= gd->arch.tlb_size;
                            ^

arch/arm/lib/cache.c:140:11: error: 'volatile struct arch_global_data' has no member named 'tlb_addr'
gd->arch.tlb_addr = gd->relocaddr;
In file included from include/common.h:34:0,
from arch/arm/lib/cache.c:9:
arch/arm/lib/cache.c:141:52: error: 'volatile struct arch_global_data' has no member named 'tlb_addr'
...

Ovidiu Panait (3):
common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.c
arm: asm/cache.c: Introduce arm_reserve_mmu common/board_f: Make reserve_mmu generic

 arch/arm/include/asm/cache.h | 11 +++++++++++
 arch/arm/lib/cache.c         | 33 +++++++++++++++++++++++++++++++++
 arch/arm/mach-versal/cpu.c   |  3 ++-
 arch/arm/mach-zynqmp/cpu.c   |  3 ++-
 common/board_f.c             | 29 ++---------------------------
 include/init.h               | 13 ++++++++++++-
 6 files changed, 62 insertions(+), 30 deletions(-)
Signature · 1 line
2.17.1