From: Arnd Bergmann <arnd@arndb.de>
To: davidm@hpl.hp.com
Cc: Richard Henderson <rth@twiddle.net>,
Rusty Russell <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 00:24:02 +0200 [thread overview]
Message-ID: <200405040024.03906.arnd@arndb.de> (raw)
In-Reply-To: <16534.37209.199911.737170@napali.hpl.hp.com>
On Monday 03 May 2004 20:37, David Mosberger wrote:
> This was in the context of per-CPU addressing. I don't know the s390x
> well but if the 32-bit offset is a memory-model limitation, fine. The
> real problem then seems to lie in the way per-CPU addressing is
> imlemented on s390x, no?
Exactly. However, s390x is using the same code as every other architecture
aside from ia64. Both s390{,x} and x86_64 have some optimized way to get
to the per_cpu_offset, but that does not impact the problem.
> Perhaps s390x could use a similar trick as we do on ia64? We put the
> per-CPU area in the last 64KB of the address space, so the absolute
> address is guaranteed to fit into a small signed integer constant.
> Newer compilers support the "model(small)" attribute so the compiler
> knows it can use a simple "addl" instruction to calculate the address
> of a per-CPU variable.
I don't understand how that would help. On an 4GB+ system, modules get
get loaded to a >4GB address, so a 32 bit PC-relative relocation that
can not get to a small positive address won't be enough for a small negative
address either. The only way to force absolute addressing instead of
PC-relative on s390x is to compile with -fPIC (as we do) _and_ declare
the symbol non-static.
It could work if we load the modules to the top of the address space as
well, is that what you mean?
Arnd <><
next prev parent reply other threads:[~2004-05-03 22:28 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 [this message]
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
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=200405040024.03906.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davidm@hpl.hp.com \
--cc=epasch@de.ibm.com \
--cc=hare@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=rth@twiddle.net \
--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