aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-06-18 00:54:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-18 14:10:59 -0400
commit2603efa31a0377eeaa06723bded8a1d644dd4901 (patch)
tree717894107d06b5ac5a3dfa19fb602555c366b92e /include/asm-generic
parenta1f42beb8e287482d1a802731d4fb7e2bdc2c703 (diff)
bug.h: Fix up powerpc build regression.
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 <sfr@canb.auug.org.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bug.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 9f02005f217a..506ec19a3736 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -2,7 +2,6 @@
2#define _ASM_GENERIC_BUG_H 2#define _ASM_GENERIC_BUG_H
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <linux/kernel.h>
6 5
7#ifdef CONFIG_BUG 6#ifdef CONFIG_BUG
8 7
@@ -32,6 +31,9 @@ struct bug_entry {
32 31
33#endif /* CONFIG_GENERIC_BUG */ 32#endif /* CONFIG_GENERIC_BUG */
34 33
34#ifndef __ASSEMBLY__
35#include <linux/kernel.h>
36
35/* 37/*
36 * Don't use BUG() or BUG_ON() unless there's really no way out; one 38 * Don't use BUG() or BUG_ON() unless there's really no way out; one
37 * example might be detecting data structure corruption in the middle 39 * example might be detecting data structure corruption in the middle
@@ -61,7 +63,6 @@ struct bug_entry {
61 * to provide better diagnostics. 63 * to provide better diagnostics.
62 */ 64 */
63#ifndef __WARN_TAINT 65#ifndef __WARN_TAINT
64#ifndef __ASSEMBLY__
65extern __printf(3, 4) 66extern __printf(3, 4)
66void warn_slowpath_fmt(const char *file, const int line, 67void warn_slowpath_fmt(const char *file, const int line,
67 const char *fmt, ...); 68 const char *fmt, ...);
@@ -70,7 +71,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
70 const char *fmt, ...); 71 const char *fmt, ...);
71extern void warn_slowpath_null(const char *file, const int line); 72extern void warn_slowpath_null(const char *file, const int line);
72#define WANT_WARN_ON_SLOWPATH 73#define WANT_WARN_ON_SLOWPATH
73#endif
74#define __WARN() warn_slowpath_null(__FILE__, __LINE__) 74#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
75#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg) 75#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
76#define __WARN_printf_taint(taint, arg...) \ 76#define __WARN_printf_taint(taint, arg...) \
@@ -203,4 +203,6 @@ extern void warn_slowpath_null(const char *file, const int line);
203# define WARN_ON_SMP(x) ({0;}) 203# define WARN_ON_SMP(x) ({0;})
204#endif 204#endif
205 205
206#endif /* __ASSEMBLY__ */
207
206#endif 208#endif