From: Christoph Lameter <cl@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
andi@firstfloor.org, ak@linux.intel.com, rth@twiddle.net,
sfr@canb.auug.org.au, travis@sgi.com,
linux-kernel@vger.kernel.org
Subject: Re: [patch 2/8] compiler-gcc.h: add more comments to RELOC_HIDE
Date: Mon, 12 Jan 2009 11:33:49 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.64.0901121128470.30369@quilx.com> (raw)
In-Reply-To: <20090110122945.GA28033@elte.hu>
On Sat, 10 Jan 2009, Ingo Molnar wrote:
> 2) Special structure sizes
>
> For example we want to load a value from "&var + LARGE_OFFSET" (common
> percpu construct). If 'var' is a C structure that happens to have a size
> of 255 bytes, then GCC could legitimately assume that 'LARGE_OFFSET' is
> 0..255 [inclusive], and could optimize LARGE_OFFSET to be truncated to a
> single byte.
But that is not what is occurring. We do not do &var + LARGE_OFFSET.
Instead one does
((void *)&var) + LARGE_OFFSET
or
((unsigned long)&var) + LARGE_OFFSET
The cast should cause the C compiler to drop all assumptions about size.
And the definition of RELOC_HIDE for icc and generic compilers in the tree
show that this is working.
next prev parent reply other threads:[~2009-01-12 17:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901100040.n0A0eruc013680@imap1.linux-foundation.org>
[not found] ` <200901102211.45603.rusty@rustcorp.com.au>
2009-01-10 12:29 ` Ingo Molnar
2009-01-12 17:33 ` Christoph Lameter [this message]
[not found] ` <200901151227.27935.rusty@rustcorp.com.au>
2009-01-15 3:33 ` Linus Torvalds
2009-01-15 19:19 ` Christoph Lameter
2009-01-15 22:44 ` Andi Kleen
2009-01-15 20:29 ` Christoph Lameter
2009-01-15 23:15 ` Richard Henderson
2009-01-16 20:37 ` Christoph Lameter
2009-01-19 16:30 ` Richard Henderson
2009-01-21 13:50 ` Christoph Lameter
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=Pine.LNX.4.64.0901121128470.30369@quilx.com \
--to=cl@linux-foundation.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rth@twiddle.net \
--cc=rusty@rustcorp.com.au \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=travis@sgi.com \
/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
all inboxes | Powered by JetHome®