Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ylefloch@online.net (Yves Lefloch)
To: linux-arm-kernel@lists.infradead.org
Subject: arm: mach-mvebu: dts: enable-method is always overwritten
Date: Fri, 8 Jun 2018 17:43:11 +0200	[thread overview]
Message-ID: <a2d4701e-28b3-07ee-6b2f-588b2e9a75c4@online.net> (raw)

Hello everybody,

I'm facing an issue that I believe to be a conflict between device-tree and 
machine_desc.

My platform is arm/mach-mvebu. I have a DT based on "armada-xp-db-dxbc2.dts" (I 
just included it and added a few okays), my CPU is a Marvell Bobcat2 switching 
chip. My kernel is a vanilla 4.16.

Everything works fine except that my second core won't boot: `CPU1: failed to 
come online'.
I tracked down the problem to arch/arm/mach-mvebu/platsmp.c: in this file is 
defined a machine_desc that hardcodes the SMP ops to `marvell,armada-xp-smp' 
whereas my device tree (by including armada-xp-98dx3236.dtsi) attempts to set 
the ops to `marvell,98dx3236-smp' through enable-method. In setup_arch() the 
machine_desc's ops overwrites the enable-method's ops, causing the wrong 
smp_boot_secondary() call to be issued.

Now there is a note from 2014 saying that this machine_desc's `smp' field is 
hardcoded like that because of "old Device Trees that were not specifying the 
cpus enable-method property". As far as I can tell, this is still the case, for 
instance "armada-370-db.dts" doesn't have any enable-method property.

I have worked around this by commenting out `armada_xp_smp_ops.smp' but 
obviously I would prefer to keep a vanilla kernel.

So I propose to:
- Add `enable-method = "marvell,armada-xp-smp"' to armada-370-xp.dtsi, because 
it seems that all Armada 370/XP include it;
- Remove the `smp' field of `armada_xp_smp_ops'.

If you agree with the diagnosis and the proposed fix I will write a patch.

Regards,
Yves Lefloch.

             reply	other threads:[~2018-06-08 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 15:43 Yves Lefloch [this message]
2018-06-08 15:58 ` arm: mach-mvebu: dts: enable-method is always overwritten Andrew Lunn
2018-06-11  0:48   ` Chris Packham
2018-07-25  8:56     ` Yves Lefloch
2018-07-25 21:06       ` 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=a2d4701e-28b3-07ee-6b2f-588b2e9a75c4@online.net \
    --to=ylefloch@online.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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