public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons•com (Gregory CLEMENT)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 7/7] ARM: redo TTBR setup code for LPAE
Date: Thu, 06 Aug 2015 13:14:48 +0200	[thread overview]
Message-ID: <55C341A8.5040504@free-electrons.com> (raw)
In-Reply-To: <20150805160112.GZ7557@n2100.arm.linux.org.uk>

On 05/08/2015 18:01, Russell King - ARM Linux wrote:
> On Wed, Aug 05, 2015 at 05:26:25PM +0200, Gregory CLEMENT wrote:
>> It seems that since the merge of this commit the secondary CPUs on
>> Armada XP failed to come online in Big Endian (my configuration is
>> mvebu_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y).
> 
> That's probably because I don't test big endian at all, never have done,
> and I suspect never will as I've never had systems using BE.  So, I regard
> BE as something of a troublesome untestable burden on kernel development.
> (And I've always regarded BE to be an abomination.)  In short, I loath
> big endian, which really doesn't bode well for me not constantly cocking
> it up...
> 
> My guess is that it all comes down to much of the new code expecting the
> value in r4/r5 to be the least significant 32bits in r4 and the most
> significant 32bits in r5.  However, in the secondary code, we load this
> using ldrd, which on BE probably reverses that.

Thanks for the explanation.

> 
>> Once I found that this commit introduced the regression I also tested
>> but with LPAE but I had the same result: only the first CPU boot.
> 
> Not surprising.  I guess BE would need the two registers to mcrr reversing
> if they were a 64-bit value loaded with ldrd.
> 
> The simple answer may just be to swap r4/r5 after the ldrd.  

I tried this and it fixed the issue.
I will send a patch shortly and if you agree I will submit it to your
patch system.

Thanks,

Gregory


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2015-08-06 11:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 10:30 [PATCH v2 0/7] Fix Keystone 2 physical address switch Russell King - ARM Linux
2015-05-06 10:30 ` [PATCH 1/7] ARM: keystone2: move platform notifier initialisation into platform init Russell King
2015-05-06 10:30 ` [PATCH 2/7] ARM: keystone2: move update of the phys-to-virt constants into generic code Russell King
2015-05-06 10:30 ` [PATCH 3/7] ARM: keystone2: move address space switch printk " Russell King
2015-05-06 10:30 ` [PATCH 4/7] ARM: keystone2: rename init_meminfo to pv_fixup Russell King
2015-05-06 10:30 ` [PATCH 5/7] ARM: re-implement physical address space switching Russell King
2015-05-11 18:58   ` Nishanth Menon
2015-05-11 19:59     ` Russell King - ARM Linux
2015-05-12 17:22       ` Nishanth Menon
2015-05-06 10:30 ` [PATCH 6/7] ARM: cleanup early_paging_init() calling Russell King
2015-05-06 10:30 ` [PATCH 7/7] ARM: redo TTBR setup code for LPAE Russell King
2015-08-05 15:26   ` Gregory CLEMENT
2015-08-05 16:01     ` Russell King - ARM Linux
2015-08-06 11:14       ` Gregory CLEMENT [this message]

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=55C341A8.5040504@free-electrons.com \
    --to=gregory.clement@free-electrons$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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