<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/asm-generic/bug.h, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/asm-generic/bug.h?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/asm-generic/bug.h?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-06-25T17:32:49Z</updated>
<entry>
<title>bug.h: Fix up CONFIG_BUG=n implicit function declarations.</title>
<updated>2012-06-25T17:32:49Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2012-06-25T08:15:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09682c1dd3820445a27d32dcbeee6a6eafff3dc9'/>
<id>urn:sha1:09682c1dd3820445a27d32dcbeee6a6eafff3dc9</id>
<content type='text'>
Commit 2603efa31a03 ("bug.h: Fix up powerpc build regression") corrected
the powerpc build case and extended the __ASSEMBLY__ guards, but it also
got caught in pre-processor hell accidentally matching the else case of
CONFIG_BUG resulting in the BUG disabled case tripping up on
-Werror=implicit-function-declaration.

It's not possible to __ASSEMBLY__ guard the entire file as architecture
code needs to get at the BUGFLAG_WARNING definition in the GENERIC_BUG
case, but the rest of the CONFIG_BUG=y/n case needs to be guarded.

Rather than littering endless __ASSEMBLY__ checks in each of the if/else
cases we just move the BUGFLAG definitions up under their own
GENERIC_BUG test and then shove everything else under one big
__ASSEMBLY__ guard.

Build tested on all of x86 CONFIG_BUG=y, CONFIG_BUG=n, powerpc (due to
it's dependence on BUGFLAG definitions in assembly code), and sh (due to
not bringing in linux/kernel.h to satisfy the taint flag definitions used
by the generic bug code).

Hopefully that's the end of the corner cases and I can abstain from ever
having to touch this infernal header ever again.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: Fengguang Wu &lt;wfg@linux.intel.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bug.h: Fix up powerpc build regression.</title>
<updated>2012-06-18T18:10:59Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2012-06-18T04:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2603efa31a0377eeaa06723bded8a1d644dd4901'/>
<id>urn:sha1:2603efa31a0377eeaa06723bded8a1d644dd4901</id>
<content type='text'>
The asm-generic/bug.h __ASSEMBLY__ guarding is completely bogus, which
tripped up the powerpc build when the kernel.h include was added:

	In file included from include/asm-generic/bug.h:5:0,
			 from arch/powerpc/include/asm/bug.h:127,
			 from arch/powerpc/kernel/head_64.S:31:
	include/linux/kernel.h:44:0: warning: "ALIGN" redefined [enabled by default]
	include/linux/linkage.h:57:0: note: this is the location of the previous definition
	include/linux/sysinfo.h: Assembler messages:
	include/linux/sysinfo.h:7: Error: Unrecognized opcode: `struct'
	include/linux/sysinfo.h:8: Error: Unrecognized opcode: `__kernel_long_t'

Moving the __ASSEMBLY__ guard up and stashing the kernel.h include under
it fixes this up, as well as covering the case the original fix was
attempting to handle.

Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bug.h: need linux/kernel.h for TAINT_WARN.</title>
<updated>2012-06-11T05:29:58Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2012-06-11T05:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3777808873b0c49c5cf27e44c948dfb02675d578'/>
<id>urn:sha1:3777808873b0c49c5cf27e44c948dfb02675d578</id>
<content type='text'>
asm-generic/bug.h uses taint flags that are only defined in
linux/kernel.h, resulting in build failures on platforms that
don't include linux/kernel.h some other way:

        arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)

Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
without SIGPENDING (and never should be)").

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>consolidate WARN_...ONCE() static variables</title>
<updated>2012-03-23T23:58:31Z</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2012-03-23T22:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ccaba5314caf3a2b1052edb3146ccc969b4d466'/>
<id>urn:sha1:7ccaba5314caf3a2b1052edb3146ccc969b4d466</id>
<content type='text'>
Due to the alignment of following variables, these typically consume
more than just the single byte that 'bool' requires, and as there are a
few hundred instances, the cache pollution (not so much the waste of
memory) sums up.  Put these variables into their own section, outside of
any half way frequently used memory range.

Do the same also to the __warned variable of rcu_lockdep_assert().
(Don't, however, include the ones used by printk_once() and alike, as
they can potentially be hot.)

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&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>treewide: use __printf not __attribute__((format(printf,...)))</title>
<updated>2011-11-01T00:30:54Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-11-01T00:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9075fa968a0a4347aef35e235e2995c0e57dddd'/>
<id>urn:sha1:b9075fa968a0a4347aef35e235e2995c0e57dddd</id>
<content type='text'>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&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>bug.h: Move ratelimit warn interfaces to ratelimit.h</title>
<updated>2011-05-26T19:00:31Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-26T19:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=86e4ca66e81bba0f8640f1fa19b8b8f72cbd0561'/>
<id>urn:sha1:86e4ca66e81bba0f8640f1fa19b8b8f72cbd0561</id>
<content type='text'>
As reported by Ingo Molnar, we still have configuration combinations
where use of the WARN_RATELIMIT interfaces break the build because
dependencies don't get met.

Instead of going down the long road of trying to make it so that
ratelimit.h can get included by kernel.h or asm-generic/bug.h,
just move the interface into ratelimit.h and make users have
to include that.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</content>
</entry>
<entry>
<title>bug.h: Fix build with CONFIG_PRINTK disabled.</title>
<updated>2011-05-24T20:15:56Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-24T20:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b3678354647a653e669746c05765f05d2b90239'/>
<id>urn:sha1:6b3678354647a653e669746c05765f05d2b90239</id>
<content type='text'>
Based upon an email by Joe Perches.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</content>
</entry>
<entry>
<title>bug.h: Add WARN_RATELIMIT</title>
<updated>2011-05-23T21:37:43Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-05-21T07:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3eec79b0776e5340a3db75b34953977c7e5086e'/>
<id>urn:sha1:b3eec79b0776e5340a3db75b34953977c7e5086e</id>
<content type='text'>
Add a generic mechanism to ratelimit WARN(foo, fmt, ...) messages
using a hidden per call site static struct ratelimit_state.

Also add an __WARN_RATELIMIT variant to be able to use a specific
struct ratelimit_state.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>WARN_ON_SMP(): Add comment to explain ({0;})</title>
<updated>2011-03-28T14:10:42Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-03-25T20:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ccd0d44fad38dc1bb4b26dcc7a30e9f2c3b36870'/>
<id>urn:sha1:ccd0d44fad38dc1bb4b26dcc7a30e9f2c3b36870</id>
<content type='text'>
The define to use ({0;}) for the !CONFIG_SMP case of WARN_ON_SMP()
can be confusing. As the WARN_ON_SMP() needs to be a nop when
CONFIG_SMP is not set, including all its parameters must not be
evaluated, and that it must work as both a stand alone statement
and inside an if condition, we define it to a funky ({0;}).

A simple "0" will not work as it causes gcc to give the warning that
the statement has no effect.

As this strange definition has raised a few eyebrows from some
major kernel developers, it is wise to document why we create such
a work of art.

Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>WARN_ON_SMP(): Allow use in if() statements on UP</title>
<updated>2011-03-25T10:32:09Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-03-17T19:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2092e6be82ec71ecbf5a8ceeef004bbcbdb78812'/>
<id>urn:sha1:2092e6be82ec71ecbf5a8ceeef004bbcbdb78812</id>
<content type='text'>
Both WARN_ON() and WARN_ON_SMP() should be able to be used in
an if statement.

	if (WARN_ON_SMP(foo)) { ... }

Because WARN_ON_SMP() is defined as a do { } while (0) on UP,
it can not be used this way.

Convert it to the same form that WARN_ON() is, even when
CONFIG_SMP is off.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Cc: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
LKML-Reference: &lt;20110317192208.444147791@goodmis.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
