From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 01/11] thunderx: Calculate TCR dynamically
Date: Fri, 26 Feb 2016 16:44:27 +0100 [thread overview]
Message-ID: <56D072DB.8030801@suse.de> (raw)
In-Reply-To: <CAPnjgZ1jywyprJ8QBL1OyihydAxXhnuEPyj0U8QVkmv17_MvMg@mail.gmail.com>
On 02/26/2016 04:39 PM, Simon Glass wrote:
> Hi Alexander,
>
> On 26 February 2016 at 01:58, Alexander Graf <agraf@suse.de> wrote:
>>
>>> Am 26.02.2016 um 03:51 schrieb Simon Glass <sjg@chromium.org>:
>>>
>>> Hi,
>>>
>>>> On 25 February 2016 at 17:49, Alexander Graf <agraf@suse.de> wrote:
>>>> Based on the memory map we can determine a lot of hard coded fields of
>>>> TCR, like the maximum VA and max PA we want to support. Calculate those
>>>> dynamically to reduce the chance for pit falls.
>>>>
>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>>> ---
>>>> arch/arm/cpu/armv8/cache_v8.c | 59 +++++++++++++++++++++++++++++++++++++++-
>>>> arch/arm/include/asm/armv8/mmu.h | 6 +---
>>>> include/configs/thunderx_88xx.h | 3 --
>>>> 3 files changed, 59 insertions(+), 9 deletions(-)
>>> This approach (extern variable) looks good to me.
>>>
>>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>>
>>> I didn't know ARRAY_SIZE() worked on external variables, so I leaned
>>> something also.
>> It doesn't. Could you please point me to a case where I'm still using ARRAY_SIZE in v4? I thought I had moved everything to null-terminating entries.
> I imagined some gcc linker sizeof() magic. Oh well.
>
> See near the top of get_tcr() - the patch on this thread.
In 1/11 the mem_map is still a locally set array which gets
preinitialized to a constant array. That one is supported by ARRAY_SIZE.
Later in "thunderx: Move mmu table into board file" I move the mem_map
variable into board files and change all ARRAY_SIZE instances to loops
that loop until they hit an empty entry. This is mostly to make review
and bisectability easier, since that way only few things change at a time.
Alex
next prev parent reply other threads:[~2016-02-26 15:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 0:49 [U-Boot] [PATCH v4 00/11] arm64: Unify MMU code v3 Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 01/11] thunderx: Calculate TCR dynamically Alexander Graf
2016-02-26 2:51 ` Simon Glass
2016-02-26 8:58 ` Alexander Graf
2016-02-26 15:39 ` Simon Glass
2016-02-26 15:44 ` Alexander Graf [this message]
2016-02-26 15:50 ` Simon Glass
2016-02-26 0:49 ` [U-Boot] [PATCH v4 02/11] arm64: Disable TTBR1 maps in EL1 Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 03/11] arm64: Make full va map code more dynamic Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 04/11] thunderx: Move mmu table into board file Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 05/11] zymqmp: Replace home grown mmu code with generic table approach Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 06/11] tegra: " Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 07/11] vexpress64: Add MMU tables Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 08/11] dwmmc: Increase retry timeout Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 09/11] hikey: Add MMU tables Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 10/11] arm64: Remove non-full-va map code Alexander Graf
2016-02-26 0:49 ` [U-Boot] [PATCH v4 11/11] arm64: Only allow dcache disabled in SPL builds Alexander Graf
2016-02-26 18:37 ` [U-Boot] [PATCH v4 00/11] arm64: Unify MMU code v3 Stephen Warren
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=56D072DB.8030801@suse.de \
--to=agraf@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.