From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 13/15] env: Mark env_get_location as weak
Date: Mon, 22 Jan 2018 16:57:41 +0100 [thread overview]
Message-ID: <20180122155741.yrflogoczwk255ll@flea.lan> (raw)
In-Reply-To: <20180122124941.GE4660@bill-the-cat>
On Mon, Jan 22, 2018 at 07:49:41AM -0500, Tom Rini wrote:
> On Mon, Jan 22, 2018 at 01:46:46PM +0100, Maxime Ripard wrote:
> > Hi,
> >
> > On Sun, Jan 21, 2018 at 05:29:56PM -0700, Simon Glass wrote:
> > > > On Wed, Jan 17, 2018 at 03:07:58PM -0700, Simon Glass wrote:
> > > >> On 16 January 2018 at 01:16, Maxime Ripard
> > > >> <maxime.ripard@free-electrons.com> wrote:
> > > >> > Allow boards and architectures to override the default environment lookup
> > > >> > code by overriding env_get_location.
> > > >> >
> > > >> > Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> > > >> > Reviewed-by: Lukasz Majewski <lukma@denx.de>
> > > >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > > >> > ---
> > > >> > env/env.c | 20 +++++++++++++++++++-
> > > >> > 1 file changed, 19 insertions(+), 1 deletion(-)
> > > >> >
> > > >>
> > > >> I still don't really understand why this needs to be a weak function.
> > > >> If the board knows the priority order, can it not put it into
> > > >> global_data? We could have a little u8 array of 4 items with a
> > > >> terminator?
> > > >
> > > > Sure that would be simpler, but that would also prevent us from doing
> > > > "smart" things based on data other than just whether the previous
> > > > environment is usable. Things based for example on a GPIO state, or a
> > > > custom algorithm to transition (or duplicate) the environment.
> > >
> > > In that case the board could read the GPIO state, or the algorithm,
> > > and then set up the value.
> > >
> > > Basically I am saying it could set up the priority order in advance of
> > > it being needed, rather than having a callback.
> >
> > Aren't we kind of stuck here?
> >
> > On the previous iterations, we already discussed this and Tom
> > eventually told he was in favour of __weak functions, and the
> > discussion stopped there. I assumed you were ok with it.
> >
> > I'd really want to move forward on that. This is something that is
> > really biting us *now* and I'd hate to miss yet another merge window
> > because of debates like this.
>
> Yes, I think this is where we want things to be weak, with a reasonable
> default. If we start to see that "everyone" does the same thing by and
> large we can re-evaluate.
Ok.
I've fixed the bug I mentionned the other day on IRC, should I send a PR?
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/bcccd18e/attachment.sig>
next prev parent reply other threads:[~2018-01-22 15:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 9:16 [U-Boot] [PATCH v2 00/15] env: Multiple env support and env transition for sunxi Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 01/15] cmd: nvedit: Get rid of the env lookup Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 02/15] env: Rename env_driver_lookup_default and env_get_default_location Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 03/15] env: Pass additional parameters to the env lookup function Maxime Ripard
2018-01-17 22:03 ` Simon Glass
2018-01-18 14:54 ` Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 04/15] env: Make the env save message a bit more explicit Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 05/15] env: Make it explicit where we're loading our environment from Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 06/15] env: fat: Make the debug messages play a little nicer Maxime Ripard
2018-01-17 22:03 ` Simon Glass
2018-01-18 15:12 ` Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 07/15] env: mmc: " Maxime Ripard
2018-01-17 22:07 ` Simon Glass
2018-01-16 9:16 ` [U-Boot] [PATCH v2 08/15] env: common: " Maxime Ripard
2018-01-17 22:07 ` Simon Glass
2018-01-16 9:16 ` [U-Boot] [PATCH v2 09/15] env: Support multiple environments Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 10/15] env: Initialise all the environments Maxime Ripard
2018-01-17 22:07 ` Simon Glass
2018-01-16 9:16 ` [U-Boot] [PATCH v2 11/15] env: mmc: depends on the MMC framework Maxime Ripard
2018-01-17 22:07 ` Simon Glass
2018-01-16 9:16 ` [U-Boot] [PATCH v2 12/15] env: Allow to build multiple environments in Kconfig Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 13/15] env: Mark env_get_location as weak Maxime Ripard
2018-01-17 22:07 ` Simon Glass
2018-01-18 17:21 ` Maxime Ripard
2018-01-22 0:29 ` Simon Glass
2018-01-22 12:46 ` Maxime Ripard
2018-01-22 12:49 ` Tom Rini
2018-01-22 15:57 ` Maxime Ripard [this message]
2018-01-22 16:36 ` Tom Rini
2018-01-22 16:48 ` Simon Glass
2018-01-22 17:08 ` Tom Rini
2018-01-16 9:16 ` [U-Boot] [PATCH v2 14/15] sunxi: Transition from the MMC to a FAT-based environment Maxime Ripard
2018-01-16 9:16 ` [U-Boot] [PATCH v2 15/15] env: sunxi: Enable FAT-based environment support by default Maxime Ripard
2018-01-16 21:56 ` [U-Boot] [PATCH v2 00/15] env: Multiple env support and env transition for sunxi Tom Rini
2018-01-17 8:58 ` Maxime Ripard
2018-01-17 13:01 ` Tom Rini
2018-01-17 13:27 ` Maxime Ripard
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=20180122155741.yrflogoczwk255ll@flea.lan \
--to=maxime.ripard@free-electrons.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