All of lore.kernel.org
 help / color / mirror / Atom feed
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 13:46:46 +0100	[thread overview]
Message-ID: <20180122124646.dsb53xyhczcpqbmy@flea.lan> (raw)
In-Reply-To: <CAPnjgZ2i1LR4kNRh2D=8+W4TxF4reoCq1z+_XfyiywfyLvz19Q@mail.gmail.com>

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.

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/05ce10f3/attachment.sig>

  reply	other threads:[~2018-01-22 12:46 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 [this message]
2018-01-22 12:49           ` Tom Rini
2018-01-22 15:57             ` Maxime Ripard
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=20180122124646.dsb53xyhczcpqbmy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.