public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] [PATCH 2/2] crazy: Sort u_boot_cmd at runtime
Date: Sat, 28 Jul 2012 22:54:32 +0200	[thread overview]
Message-ID: <201207282254.33014.marex@denx.de> (raw)
In-Reply-To: <20120728195300.53F53200346@gemini.denx.de>

Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <201207282039.34518.marex@denx.de> you wrote:
> > > Seems incomplete in several aspects:
> > Below the section:
> > 
> > * NOTE * THIS PATCH IS CRAZY
> 
> Then what is actually the purpose of such a posting?  Just dumping
> unsorted thoughts to community?

I'd prefer to get some feedback, you know ...

> You are experienced enough to know what would be needed for a
> semi-clean patch, even if it's "just for RFC"...

If you mean droping the ascii art ... well, yes.

But for draft patch, I'd like to actually see further ideas.

> > There are a few notes. I'd actually like to know if this approach is
> > correct at all, it might break on some crazy configurations or such.
> 
> Define "correct".

If there's not some obvious flub in the code. If this kind of abuse of CPP is 
correct or not.

> It may be possible - but what would be the advantage?

The list of commands will be already sorted.

> Which problem does it solve?

Optimization, nothing else.

> In which way is it better than the current code?

It's a bit faster.

> > > 1) what about all the non-ARM architecures and the board specific
> > > 
> > >    linker scripts?
> > 
> > - This patch affects only arm926t, obviously to make it proper, every
> > 
> >   linkerscript would have to be adjusted
> > 
> > Which sucks, since there're a lot of them. But it can probably be
> > automated.
> 
> Actually I doubt it makes sense at all.

It actually does ... but not in such a plain context.

I did this patch because we want the driver lists sorted. So I did this research 
and implemented it on the command list. I wanted to gather some feedback on if 
this actually can be done in such a way or if there'll be problems with 
toolchains maybe. Or any other issues.

> I envision a situation where some "pluggable" code (say, a standalone
> application, or some form of loadable module whatever) can add new
> commands - it would be nice if these would still appear in sorted
> order, but this cannot be done at compile-time.

Certainly ... but we can keep a separate runtime table for these added commands.

> So please explain which actual problem you are rying to solve.
> 
> Best regards,
> 
> Wolfgang Denk

Best regards,
Marek Vasut

  reply	other threads:[~2012-07-28 20:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28 13:47 [U-Boot] [PATCH 1/2] COMMON: Add __stringify() function Marek Vasut
2012-07-28 13:47 ` [U-Boot] [RFC] [PATCH 2/2] crazy: Sort u_boot_cmd at runtime Marek Vasut
2012-07-28 17:46   ` Wolfgang Denk
2012-07-28 18:39     ` Marek Vasut
2012-07-28 19:53       ` Wolfgang Denk
2012-07-28 20:54         ` Marek Vasut [this message]
2012-07-28 19:36 ` [U-Boot] [PATCH 1/2] COMMON: Add __stringify() function Wolfgang Denk
2012-07-28 19:39   ` Marek Vasut
2012-07-28 19:57     ` Wolfgang Denk
2012-07-28 20:59       ` Marek Vasut
2012-07-31  8:01       ` Mike Frysinger
2012-07-31 13:55         ` Marek Vasut
2012-07-31 14:06           ` Mike Frysinger
2012-07-31 14:08             ` Marek Vasut
2012-07-31 14:16               ` Mike Frysinger

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=201207282254.33014.marex@denx.de \
    --to=marex@denx.de \
    --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