public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Chris Packham <judge.packham@gmail.com>
Cc: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Stefan Roese <sr@denx.de>, Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] arm: mvebu: AC5/AC5X: use fixed page table size
Date: Fri, 20 Oct 2023 14:04:48 +0100	[thread overview]
Message-ID: <063a16d559dc9cb327c9459803005006@kernel.org> (raw)
In-Reply-To: <20231018205358.1557234-1-judge.packham@gmail.com>

On 2023-10-18 21:53, Chris Packham wrote:
> Since commit 6cdf6b7a340d ("arm64: Use FEAT_HAFDBS to track dirty pages
> when available") the default get_page_table_size() sets some flags for
> more efficient handling of dirty page table entries. This causes
> problems on the AC5/AC5X SoC (specifically a lockup when calling
> __asm_switch_ttbr() via mmu_set_region_dcache_behaviour()).
> 
> The reason for the lockup isn't at all clear but it can be avoided if 
> we
> provide our own get_page_table_size() which stops gd->arch.has_hafdbs
> from being set to true effectively returning the AC5/AC5X to the older
> behaviour. This also opts for a simple fixed page table size rather 
> than
> trying to duplicate the more complicated logic to optimise the table
> size.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> 
>  arch/arm/mach-mvebu/alleycat5/cpu.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/mach-mvebu/alleycat5/cpu.c
> b/arch/arm/mach-mvebu/alleycat5/cpu.c
> index 8204d9627515..7ba57ae75e76 100644
> --- a/arch/arm/mach-mvebu/alleycat5/cpu.c
> +++ b/arch/arm/mach-mvebu/alleycat5/cpu.c
> @@ -63,6 +63,11 @@ static struct mm_region ac5_mem_map[] = {
> 
>  struct mm_region *mem_map = ac5_mem_map;
> 
> +u64 get_page_table_size(void)
> +{
> +	return 0x80000;
> +}
> +
>  void reset_cpu(void)
>  {
>  }

This looks terribly wrong. In all honesty, if the original
patch creates problems and that people add this sort of stuff
to paper over it, I'd rather your *revert* my patch altogether.

         M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2023-10-20 13:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 20:53 [PATCH] arm: mvebu: AC5/AC5X: use fixed page table size Chris Packham
2023-10-20  6:18 ` Stefan Roese
2023-10-20  8:21   ` Chris Packham
2023-10-20 12:49     ` Stefan Roese
2023-10-20 13:04 ` Marc Zyngier [this message]
2023-10-21  5:35   ` Chris Packham

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=063a16d559dc9cb327c9459803005006@kernel.org \
    --to=maz@kernel.org \
    --cc=judge.packham@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=trini@konsulko.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