mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: linux-kernel@vger.kernel.org, f.fainelli@gmail.com,
	"kernelci.org bot" <bot@kernelci.org>,
	wahrenst@gmx.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: dt: check MPIDR on MP devices built without SMP
Date: Mon, 18 Nov 2019 18:45:55 +0100	[thread overview]
Message-ID: <061822b6ad80094a52d27f27f3e37594adb313c2.camel@suse.de> (raw)
In-Reply-To: <20191118125540.GW25745@shell.armlinux.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]

Hi Russell, thanks for the review.

On Mon, 2019-11-18 at 12:55 +0000, Russell King - ARM Linux admin wrote:
> On Mon, Nov 18, 2019 at 12:49:04PM +0100, Nicolas Saenz Julienne wrote:
> > On Fri, 2019-10-04 at 17:52 +0200, Nicolas Saenz Julienne wrote:
> > > On SMP builds, in order to properly link CPU devices with their
> > > respective DT nodes we start by matching the boot CPU. This is achieved
> > > by comparing the 'reg' property on each of the CPU DT nodes with the
> > > MPIDR. The association is necessary as to validate the whole CPU logical
> > > map, which ultimately links CPU devices and their DT nodes.
> 
> No, that is not the primary purpose of the CPU logical map.  The CPU 
> logical map is there to map the CPU logical number to a hardware number,
> necessary for programming hardware.

Noted.

> > > On setups built without SMP, no MPIDR read is performed. The only thing
> > > expected is for the 'reg' property in the CPU DT node to contain the
> > > value 0x0.
> > > 
> > > This causes problems on MP setups built without SMP. As their boot CPU
> > > DT node contains the relevant MPIDR as opposed to 0x0. No match is then
> > > possible. This causes troubles further down the line as drivers are
> > > unable to get the CPU's DT node.
> 
> So the DT is incorrect for the platform - it is not describing the
> hardware.  Why can't the DT be fixed?  Clearly, it would have never
> worked with the mainline kernel today.

Sorry but I don't see any incorrect DT here. From the ARM CPU bindings I gather
that (at least since ARMv7) every CPU node should contain its corresponding
MPIDR. It transpires that ARM's DT cpu map init code should take that into
account regardles of whether the kernel supports SMP, isn't it?

Regards,
Nicolas


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-11-18 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 15:52 Nicolas Saenz Julienne
2019-11-18 11:49 ` Nicolas Saenz Julienne
2019-11-18 12:55   ` Russell King - ARM Linux admin
2019-11-18 17:45     ` Nicolas Saenz Julienne [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=061822b6ad80094a52d27f27f3e37594adb313c2.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=bot@kernelci.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=wahrenst@gmx.net \
    /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

all inboxes | Powered by JetHome®