From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/9] Switch internal registers address to 0xF1 on Armada 370/XP
Date: Fri, 24 May 2013 11:16:58 +0200 [thread overview]
Message-ID: <201305241116.59116.arnd@arndb.de> (raw)
In-Reply-To: <20130524094313.669ab838@skate>
On Friday 24 May 2013, Thomas Petazzoni wrote:
> On Fri, 24 May 2013 09:15:27 +0200, Arnd Bergmann wrote:
>
> > But there is no problem on those boards /yet/. So far, the two boards
> > always come with the known 0xd0 configuration that match the DTs
> > we have, independent of where they come from.
> >
> > Thomas wants to be prepared for them to do something stupid, and he
> > anticipates that they are going to do it in a particular way, but
> > he says that he has no control over them, so it's all speculation
> > at this point,
>
> Speculation? The new bootloaders that change the address to 0xf1000000
> are already shipping on all new Marvell evaluation platforms, they are
> the ones currently available to Marvell customers for their
> developments, and I'm running such a new bootloader on an evaluation
> board.
>
> I wouldn't call speculation something that I have in front of my eyes
> today. But maybe we don't have the same definition of speculation.
You said earlier yourself that you think the evaluation platforms are
under control because there are only small quantities of them and they
will eventually all move to the new address. I understand that Marvell
screwed up here (actually repeatedly it seems)
> > unless we do something stupid and change the dts
> > files in the kernel to no longer match the current hardware.
>
> You are again making the same mistake again. You make the association
> between a given hardware platform and the location of the internal
> registers, but this is completely false. Current OpenBlocks are shipped
> with a old bootloader, but new OpenBlocks will most likely be shipped
> with a new bootloader, or existing users of OpenBlocks may upgrade
> their bootloader. So you can't make the assumption that OpenBlocks ==
> old register address.
That is what I meant with speculation: You don't actually know if
OpenBlocks are going to change their boot loader incompatibly, or
in case they do, whether they do it in the same way that Marvell
did or in a different way.
I think it's rather unlikely that a company that has shipped a ton
of machines would force an update on their users that breaks every
single kernel they have running today.
> Again, we do *NOT* want to make this address configurable. All boards
> should use 0xf1000000, and the kernel should assume that this a fixed
> location for the internal registers.
You also said that it didn't matter what you *want* because you have
no control over the boot loaders.
> All what we're trying to achieve here is to provide some temporary
> workaround to help people using old bootloaders move smoothly to newer
> bootloaders version without having a completely silent kernel at boot
> time in the mean time.
I understand that you are trying to do what's best here, but I fear
your workaround is going to make it much worse than it already is.
> So, while we are seeking for a workaround for a mistake of the past,
> you are trying to force us to generalize the mechanism of customizing
> the internal register address, which we do not want to do.
But your approach forces OpenBlocks and others to make the same mistake
that Marvell did by changing their boot loaders in a way that is not
backwards compatible and not detectable in a reliable way (see below).
> If all you're willing to accept is a very complex generalization of the
> internal register base address handling, then I believe what we're
> going to do is just move all Device Tree sources to use 0xf1, and we'll
> tell users to upgrade their bootloader.
Those are two options that would both be better than your current proposal,
but you can probably come up with others. The one thing you must not do
is override the address passed in the boot protocol for all boards based
on an arbitrary non-architecture register setting.
We know that boot loaders are broken all the time. Being able to describe
the breakage correctly in the device tree so the kernel can work around
it is our last line of defence, we have to trust that data.
In your patch, you are effectively encoding the policy that whatever we
find as the internal register address in the DT is meaningless and that
we instead use one of two hardcoded values depending on a bit that
Marvell (who are the ones that screwed this up before) tells you to use
as the interface. You also assume that by some magic you can introduce
the interface now and get everybody to do what you think they should in
the future (i.e. set the internal register to 0xf1 and enable that bit)
so you can remove that hack. I would call that rather optimistic.
What I would expect to see instead is:
* As the interface is now there, some board developers randomly mix
boot loaders with 0xd0 and 0xf1 and rely on the kernel to use that
bit for all eternity.
* some other board developers will get the updated u-boot from Marvell
that sets the bit, but they revert the address back to 0xd0 because
they want to keep running their old in-house kernels.
* some (slightly crazy) board developers will use their own boot loader
with the 0xf1 address since Marvell is telling them to use that as
the new default, but will not set the bit because their in-house kernel
does not require it.
* at least one (rather crazy) board developers decides that neither 0xd0
nor 0xf1 is the best base address for their uses and pick something
completely different. They put the address into their DT following
the binding and expect the kernel to handle that.
If any of the above happen, your hack will fail and you will have to
build additional hacks on top, instead of getting rid of it.
Arnd
next prev parent reply other threads:[~2013-05-24 9:16 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 10:33 [PATCH 0/9] Switch internal registers address to 0xF1 on Armada 370/XP Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 1/9] arm: mvebu: fix length of SATA registers area in .dtsi Thomas Petazzoni
2013-05-21 13:42 ` Jason Cooper
2013-05-21 10:33 ` [PATCH 2/9] arm: mvebu: fix length of Ethernet " Thomas Petazzoni
2013-05-21 13:43 ` Jason Cooper
2013-05-21 10:33 ` [PATCH 3/9] arm: mvebu: mark functions of armada-370-xp.c as static Thomas Petazzoni
2013-05-21 13:45 ` Jason Cooper
2013-05-21 10:33 ` [PATCH 4/9] arm: mvebu: remove dependency of SMP init on static I/O mapping Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 5/9] arm: mvebu: avoid hardcoded virtual address in coherency code Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 6/9] arm: mvebu: move cache and mvebu-mbus initialization later Thomas Petazzoni
2013-05-21 14:16 ` Jason Cooper
2013-05-21 15:37 ` Thomas Petazzoni
2013-05-21 15:43 ` Jason Cooper
2013-05-21 16:10 ` Thomas Petazzoni
2013-05-21 16:37 ` Jason Cooper
2013-05-21 16:44 ` Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 7/9] arm: mvebu: remove hardcoded static I/O mapping Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 8/9] arm: mvebu: don't hardcode a physical address in headsmp.S Thomas Petazzoni
2013-05-21 10:33 ` [PATCH 9/9] arm: mvebu: switch internal register address at runtime if needed Thomas Petazzoni
2013-05-22 13:27 ` Thomas Petazzoni
2013-05-22 14:04 ` Andrew Lunn
2013-05-22 14:16 ` Thomas Petazzoni
2013-05-22 14:17 ` Sebastian Hesselbarth
2013-05-22 17:42 ` Andrew Lunn
2013-05-22 17:59 ` Thomas Petazzoni
2013-05-22 18:31 ` Andrew Lunn
2013-05-21 19:38 ` [PATCH 0/9] Switch internal registers address to 0xF1 on Armada 370/XP Willy Tarreau
2013-05-21 20:12 ` Thomas Petazzoni
2013-05-21 20:26 ` Willy Tarreau
2013-05-22 10:01 ` Sebastian Hesselbarth
2013-05-22 11:46 ` Greg
2013-05-22 13:43 ` Russell King - ARM Linux
2013-05-22 13:52 ` Thomas Petazzoni
2013-05-22 14:11 ` Arnd Bergmann
2013-05-22 14:17 ` Russell King - ARM Linux
2013-05-22 14:23 ` Sebastian Hesselbarth
2013-05-22 14:33 ` Arnd Bergmann
2013-05-22 14:41 ` Gregory CLEMENT
2013-05-22 15:18 ` Arnd Bergmann
2013-05-22 15:37 ` Gregory CLEMENT
2013-05-22 15:43 ` Arnd Bergmann
2013-05-22 15:56 ` Gregory CLEMENT
2013-05-22 20:30 ` Arnd Bergmann
2013-05-22 15:06 ` Thomas Petazzoni
2013-05-22 15:35 ` Arnd Bergmann
2013-05-22 15:51 ` Andrew Lunn
2013-05-22 16:22 ` Thomas Petazzoni
2013-05-22 20:36 ` Arnd Bergmann
2013-05-23 10:02 ` Thomas Petazzoni
2013-05-23 14:12 ` Arnd Bergmann
2013-05-23 14:47 ` Thomas Petazzoni
2013-05-23 17:39 ` Arnd Bergmann
2013-05-22 16:08 ` Thomas Petazzoni
2013-05-22 16:35 ` Willy Tarreau
2013-05-22 16:42 ` Thomas Petazzoni
2013-05-22 16:49 ` Willy Tarreau
2013-05-22 17:00 ` Thomas Petazzoni
2013-05-22 17:08 ` Willy Tarreau
2013-05-22 17:14 ` Thomas Petazzoni
2013-05-22 20:47 ` Sebastian Hesselbarth
2013-05-22 16:49 ` Jason Cooper
2013-05-22 16:57 ` Thomas Petazzoni
2013-05-22 17:13 ` Jason Cooper
2013-05-22 18:05 ` Thomas Petazzoni
2013-05-22 18:09 ` Jason Cooper
2013-05-22 18:13 ` Thomas Petazzoni
2013-05-22 18:19 ` Jason Gunthorpe
2013-05-22 18:55 ` Andrew Lunn
2013-05-22 19:36 ` Jason Gunthorpe
2013-05-22 20:31 ` Andrew Lunn
2013-05-23 9:53 ` Thomas Petazzoni
2013-05-23 17:27 ` Jason Gunthorpe
2013-05-22 20:40 ` Arnd Bergmann
2013-05-22 21:31 ` Thomas Petazzoni
2013-05-23 5:53 ` Andrew Lunn
2013-05-23 7:53 ` Russell King - ARM Linux
2013-05-23 12:23 ` Thomas Petazzoni
2013-05-23 14:14 ` Arnd Bergmann
2013-05-23 14:50 ` Thomas Petazzoni
2013-05-23 20:26 ` Russell King - ARM Linux
2013-05-23 20:40 ` Arnd Bergmann
2013-05-23 23:09 ` Russell King - ARM Linux
2013-05-23 23:17 ` Thomas Petazzoni
2013-05-23 23:40 ` Russell King - ARM Linux
2013-05-24 10:25 ` Greg
2013-05-24 7:15 ` Arnd Bergmann
2013-05-24 7:43 ` Thomas Petazzoni
2013-05-24 9:16 ` Arnd Bergmann [this message]
2013-05-24 7:46 ` Russell King - ARM Linux
2013-05-24 8:07 ` Thomas Petazzoni
2013-05-24 10:57 ` Arnd Bergmann
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=201305241116.59116.arnd@arndb.de \
--to=arnd@arndb.de \
--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;
as well as URLs for NNTP newsgroup(s).