<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/compiler.h, branch linux-2.6.28.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2008-10-14T08:35:08+00:00</updated>
<entry>
<title>ftrace: move notrace to compiler.h</title>
<updated>2008-10-14T08:35:08+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2008-08-15T02:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28614889bcb2558a47d02d52394b7fd9795a9547'/>
<id>urn:sha1:28614889bcb2558a47d02d52394b7fd9795a9547</id>
<content type='text'>
The notrace define belongs in compiler.h so that it can be used in
init.h

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c</title>
<updated>2008-08-18T07:45:22+00:00</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2008-08-17T19:50:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ded00a56e99555c3f4000ef3eebfd5fe0d574565'/>
<id>urn:sha1:ded00a56e99555c3f4000ef3eebfd5fe0d574565</id>
<content type='text'>
Remove the redundant definition of ACCESS_ONCE() from rcupreempt.c in
favor of the one in compiler.h.  Also merge the comment header from
rcupreempt.c's definition into that in compiler.h.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Move ACCESS_ONCE() to &lt;linux/compiler.h&gt;</title>
<updated>2008-05-11T02:51:16+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-05-11T02:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c3cdc1f83a6e07092392ff4aba6466517dbd1d0'/>
<id>urn:sha1:9c3cdc1f83a6e07092392ff4aba6466517dbd1d0</id>
<content type='text'>
It actually makes much more sense there, and we do tend to need it for
non-RCU usage too.  Moving it to &lt;linux/compiler.h&gt; will allow some
other cases that have open-coded the same logic to use the same helper
function that RCU has used.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>add noinline_for_stack</title>
<updated>2008-03-05T00:35:12+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-03-04T22:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=735c4fb916e9f83a9350aeb2680d77d01ea75094'/>
<id>urn:sha1:735c4fb916e9f83a9350aeb2680d77d01ea75094</id>
<content type='text'>
People are adding `noinline' in various places to prevent excess stack
consumption due to gcc inlining.  But once this is done, it is quite unobvious
why the `noinline' is present in the code.  We can comment each and every
site, or we can use noinline_for_stack.

Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>remove __attribute_used__</title>
<updated>2008-01-28T22:21:18+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-01-24T21:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3ff6eecca4e5c49a5d1dd8b58ea0e20102ce08f0'/>
<id>urn:sha1:3ff6eecca4e5c49a5d1dd8b58ea0e20102ce08f0</id>
<content type='text'>
Remove the deprecated __attribute_used__.

[Introduce __section in a few places to silence checkpatch /sam]

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>compiler.h: introduce __section()</title>
<updated>2008-01-28T22:21:17+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-01-20T17:54:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3fe866d59d707c7a2bba0b23add078e19edb3dc'/>
<id>urn:sha1:f3fe866d59d707c7a2bba0b23add078e19edb3dc</id>
<content type='text'>
Add a new helper: __section() that makes a section definition
much shorter and more readable.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>Permit silencing of __deprecated warnings.</title>
<updated>2007-10-25T22:10:17+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2007-10-25T08:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de48844398f81cfdf087d56e12c920d620dae8d5'/>
<id>urn:sha1:de48844398f81cfdf087d56e12c920d620dae8d5</id>
<content type='text'>
The __deprecated marker is quite useful in highlighting the remnants of
old APIs that want removing.

However, it is quite normal for one or more years to pass, before the
(usually ancient, bitrotten) code in question is either updated or
deleted.

Thus, like __must_check, add a Kconfig option that permits the silencing
of this compiler warning.

This change mimics the ifdef-ery and Kconfig defaults of MUST_CHECK as
closely as possible.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Replace __attribute_pure__ with __pure</title>
<updated>2007-10-18T21:37:32+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2007-10-18T10:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8c44319c691dfb4a0b039b095204c040df9b01a'/>
<id>urn:sha1:e8c44319c691dfb4a0b039b095204c040df9b01a</id>
<content type='text'>
To be consistent with the use of attributes in the rest of the kernel
replace all use of __attribute_pure__ with __pure and delete the definition
of __attribute_pure__.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: Bryan Wu &lt;bryan.wu@analog.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>make __chk_{user,io}_ptr() accept pointers to volatile</title>
<updated>2007-07-26T18:11:57+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-07-26T16:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c47ffe3d3d841986108a8316f6e01792cb45d0d2'/>
<id>urn:sha1:c47ffe3d3d841986108a8316f6e01792cb45d0d2</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86: Support __attribute__((__cold__)) in gcc 4.3</title>
<updated>2007-07-22T01:37:08+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2007-07-21T15:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a586df067afe0580bb02b7a6312ca2afe49bba03'/>
<id>urn:sha1:a586df067afe0580bb02b7a6312ca2afe49bba03</id>
<content type='text'>
gcc 4.3 supports a new __attribute__((__cold__)) to mark functions cold. Any
path directly leading to a call of this function will be unlikely. And gcc
will try to generate smaller code for the function itself.

Please use with care. The code generation advantage isn't large and in most
cases it is not worth uglifying code with this.

This patch marks some common error functions like panic(), printk()
as cold.  This will longer term make many unlikely()s unnecessary, although
we can keep them for now for older compilers.

BUG is not marked cold because there is currently no way to tell
gcc to mark a inline function told.

Also all __init and __exit functions are marked cold. With a non -Os
build this will tell the compiler to generate slightly smaller code
for them. I think it currently only uses less alignments for labels,
but that might change in the future.

One disadvantage over *likely() is that they cannot be easily instrumented
to verify them.

Another drawback is that only the latest gcc 4.3 snapshots support this.
Unfortunately we cannot detect this using the preprocessor. This means older
snapshots will fail now. I don't think that's a problem because they are
unreleased compilers that nobody should be using.

gcc also has a __hot__ attribute, but I don't see any sense in using
this in the kernel right now. But someday I hope gcc will be able
to use more aggressive optimizing for hot functions even in -Os,
if that happens it should be added.

Includes compile fix from Thomas Gleixner.

Cc: Jan Hubicka &lt;jh@suse.cz&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
