From: Michael Ellerman <michael@ellerman.id.au>
To: Benjamin Herrenschmidt <benh@ozlabs.org>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
linux-m32r@ml.linux-m32r.org, takata@linux-m32r.org,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Paul Mackerras <paulus@samba.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Fri, 18 Apr 2008 14:38:55 +1000 [thread overview]
Message-ID: <1208493535.9319.3.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <20080417211905.8ff769fa.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
On Thu, 2008-04-17 at 21:19 -0700, Andrew Morton wrote:
> On Fri, 18 Apr 2008 13:58:06 +1000 Benjamin Herrenschmidt <benh@ozlabs.org> wrote:
>
> >
> > > > > otoh, if only one .c file will ever call this function then I think that
> > > > > all problems are solved by
> > > > >
> > > > > a) moving the above ifdeffery into the .c file
> > > > > b) adding a comment explaining which arch file must provide the override
> > > > > c) directly including that file from within the .c file.
> > > >
> > > > I can definitely do that. I have no problem either way. I can add to all
> > > > archs too, it's just that whatever way I choose, some people won't be
> > > > happy with it :-)
> > > >
> > > > Anyway, I'll move the ifdeferry to init/main.c then.
> > >
> > > Thanks ;)
> > >
> > > I'm still wounded by my recent encounter with set_softirq_pending()
> > > and or_softirq_pending().
> >
> > Well, looking there, I saw we already used weak symbols for that
>
> Yes, `weak' is a nice solution. It does add a few bytes of text which we
> could avoid with compile-time trickery, but only a very few.
>
> Plus this is __init anyway, although I don't know how well the combination
> of `weak' and __init works.
>
> > +void __init __attribute__((weak) thread_info_cache_init(void)
>
> s/weak)/weak))/
There's also a #define of this called "__weak" if you like, less typing
and less ugly.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-04-18 4:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 3:22 [PATCH 1/2] Add thread_info_cache_init() to all archs Benjamin Herrenschmidt
2008-04-10 21:46 ` Benjamin Herrenschmidt
2008-04-14 0:19 ` Andrew Morton
2008-04-14 0:38 ` Benjamin Herrenschmidt
2008-04-14 2:13 ` Andrew Morton
2008-04-18 3:58 ` Benjamin Herrenschmidt
2008-04-18 4:19 ` Andrew Morton
2008-04-18 4:38 ` Michael Ellerman [this message]
2008-04-18 6:44 ` Benjamin Herrenschmidt
2008-05-21 17:56 ` Benjamin Herrenschmidt
2008-05-21 18:41 ` Andrew Morton
2008-05-21 19:06 ` Sam Ravnborg
2008-05-21 20:38 ` Benjamin Herrenschmidt
2008-05-21 19:44 ` Benjamin Herrenschmidt
2008-05-21 20:52 ` Andrew Morton
2008-04-18 4:21 ` Kyle McMartin
-- strict thread matches above, loose matches on Subject: below --
2008-04-10 23:36 Benjamin Herrenschmidt
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=1208493535.9319.3.camel@concordia.ozlabs.ibm.com \
--to=michael@ellerman.id.au \
--cc=akpm@linux-foundation.org \
--cc=benh@ozlabs.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m32r@ml.linux-m32r.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=takata@linux-m32r.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).