From: Andrew Morton <akpm@osdl.org>
To: davidm@hpl.hp.com
Cc: arnd@arndb.de, rusty@rustcorp.com.au, linux-arch@vger.kernel.org,
epasch@de.ibm.com, hare@suse.de
Subject: Re: static DEFINE_PER_CPU vs. modules
Date: Tue, 4 May 2004 12:03:17 -0700 [thread overview]
Message-ID: <20040504120317.36d45341.akpm@osdl.org> (raw)
In-Reply-To: <16535.50431.820664.953078@napali.hpl.hp.com>
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>
> >>>>> On Tue, 4 May 2004 16:17:29 +0200, Arnd Bergmann <arnd@arndb.de> said:
>
> Arnd> On Tuesday 04 May 2004 04:38, Andrew Morton wrote:
> >> Arnd Bergmann <arnd@arndb.de> wrote:
> >> >
> >> > The idea I had for preventing the same bug from happening
> >> > in the future is to provoke a compile error for modules using
> >> > 'static DEFINE_PER_CPU', see patch below.
>
> >> It's not a big success with CONFIG_SMP=n.
>
> >> kernel/fork.c:55: warning: return-type defaults to `int'
> >> kernel/fork.c: In function `__PER_CPU_NOSTATIC':
>
> Arnd> Sorry about that, I accidentally defined __PER_CPU_NOSTATIC
> Arnd> inside '#ifdef CONFIG_SMP'. This now builds with and without
> Arnd> SMP.
>
> I do not understand why such a patch should get accepted. In general,
> it makes no sense at all to disallow static per-CPU variables. If
> some platforms are broken, fine, put a workaround _for that platform_
> in, but don't prevent the others from doing the sane thing.
>
Because s390 can use (almost) all modules. It's like the "atomic_t only
holds 24-bits because of sparc32" thing which we lived with for ages.
We can certainly live with this workaround, but it would be nice to find
something better. per-module per-cpu data sections?
next prev parent reply other threads:[~2004-05-04 19:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-03 15:41 static DEFINE_PER_CPU vs. modules Arnd Bergmann
2004-05-03 17:50 ` David Mosberger
2004-05-03 18:01 ` Richard Henderson
2004-05-03 18:37 ` David Mosberger
2004-05-03 22:24 ` Arnd Bergmann
2004-05-03 23:12 ` David Mosberger
2004-05-04 8:56 ` Arnd Bergmann
2004-05-04 2:38 ` Andrew Morton
2004-05-04 14:17 ` Arnd Bergmann
2004-05-04 16:29 ` David Mosberger
2004-05-04 19:03 ` Andrew Morton [this message]
2004-05-04 19:15 ` David Mosberger
2004-05-04 19:23 ` Andrew Morton
2004-05-04 19:45 ` David Mosberger
2004-05-05 8:21 ` Arnd Bergmann
2004-05-05 8:29 ` Andrew Morton
2004-05-05 9:24 ` Arnd Bergmann
2004-05-05 9:33 ` Rusty Russell
2004-05-05 16:17 ` David Mosberger
2004-05-05 3:18 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2004-05-05 17:42 Martin Schwidefsky
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=20040504120317.36d45341.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=davidm@hpl.hp.com \
--cc=epasch@de.ibm.com \
--cc=hare@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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