public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ovidiu Panait <ovpanait@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 0/3] common/board_f: Make reserve_mmu generic
Date: Sun, 29 Mar 2020 20:57:38 +0300	[thread overview]
Message-ID: <20200329175741.26297-1-ovpanait@gmail.com> (raw)

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

             reply	other threads:[~2020-03-29 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 17:57 Ovidiu Panait [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200329175741.26297-1-ovpanait@gmail.com \
    --to=ovpanait@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox