public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/3] common/board_f: Make reserve_mmu generic
@ 2020-03-29 17:57 Ovidiu Panait
  2020-03-29 17:57 ` [PATCH v2 1/3] common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.c Ovidiu Panait
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ovidiu Panait @ 2020-03-29 17:57 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-04-26 11:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-29 17:57 [PATCH v2 0/3] common/board_f: Make reserve_mmu generic Ovidiu Panait
2020-03-29 17:57 ` [PATCH v2 1/3] common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.c Ovidiu Panait
2020-03-30 23:56   ` Simon Glass
2020-04-26 11:25   ` Tom Rini
2020-03-29 17:57 ` [PATCH v2 2/3] arm: asm/cache.c: Introduce arm_reserve_mmu Ovidiu Panait
2020-03-30 23:57   ` Simon Glass
2020-04-26 11:26   ` Tom Rini
2020-03-29 17:57 ` [PATCH v2 3/3] common/board_f: Make reserve_mmu generic Ovidiu Panait
2020-03-30 23:57   ` Simon Glass
2020-04-26 11:26   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox