[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mxh2lpey.fsf@rustcorp.com.au>
Date: Tue, 28 Jun 2011 10:53:33 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Jonas Bonn <jonas@...thpole.se>, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
monstr@...str.eu, cmetcalf@...era.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] modules: add default loader hook implementations
On Mon, 27 Jun 2011 13:05:44 +0200, Arnd Bergmann <arnd@...db.de> wrote:
> On Monday 27 June 2011, Geert Uytterhoeven wrote:
> > >> I don't care much either way, you would get my Ack for both solutions.
> > >> The __weak approach would definitely make a simpler patch, and the
> > >> patch you sent adds extra complexity because of the
> > >> asm_generic_moduleloader_hooks macro you used to avoid having to
> > >> change all other architectures.
> > >
> > > I think you misread me. If all else is equal, I dislike weak functions.
> > > But AFAICT the two standard mechanisms are #ifdef HAVE_ARCH and __weak.
> > > Inventing a third one is not going to be a win.
> >
> > It's not inventing a new one, the third one is already in use.
>
> True. In fact, we are (slowly) migrating away from HAVE_ARCH_* elsewhere.
> In include/asm-generic/*.h, the common method is now to #define the exact
> symbol if an architecture wants to override the generic version.
>
> Weak symbols are fairly obscure in comparison, but they are actively
> used by a few architectures (mips, sh) and some core code in kernel/
> and mm/.
I stand corrected. It seems to be done one way or another pretty much
on a whim.
To avoid more bikeshedding, smallest patch wins. That's __weak, right?
Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists