Commit 2603efa3 authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a1f42beb
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define _ASM_GENERIC_BUG_H #define _ASM_GENERIC_BUG_H
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/kernel.h>
#ifdef CONFIG_BUG #ifdef CONFIG_BUG
...@@ -32,6 +31,9 @@ struct bug_entry { ...@@ -32,6 +31,9 @@ struct bug_entry {
#endif /* CONFIG_GENERIC_BUG */ #endif /* CONFIG_GENERIC_BUG */
#ifndef __ASSEMBLY__
#include <linux/kernel.h>
/* /*
* Don't use BUG() or BUG_ON() unless there's really no way out; one * Don't use BUG() or BUG_ON() unless there's really no way out; one
* example might be detecting data structure corruption in the middle * example might be detecting data structure corruption in the middle
...@@ -61,7 +63,6 @@ struct bug_entry { ...@@ -61,7 +63,6 @@ struct bug_entry {
* to provide better diagnostics. * to provide better diagnostics.
*/ */
#ifndef __WARN_TAINT #ifndef __WARN_TAINT
#ifndef __ASSEMBLY__
extern __printf(3, 4) extern __printf(3, 4)
void warn_slowpath_fmt(const char *file, const int line, void warn_slowpath_fmt(const char *file, const int line,
const char *fmt, ...); const char *fmt, ...);
...@@ -70,7 +71,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint, ...@@ -70,7 +71,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
const char *fmt, ...); const char *fmt, ...);
extern void warn_slowpath_null(const char *file, const int line); extern void warn_slowpath_null(const char *file, const int line);
#define WANT_WARN_ON_SLOWPATH #define WANT_WARN_ON_SLOWPATH
#endif
#define __WARN() warn_slowpath_null(__FILE__, __LINE__) #define __WARN() warn_slowpath_null(__FILE__, __LINE__)
#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg) #define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
#define __WARN_printf_taint(taint, arg...) \ #define __WARN_printf_taint(taint, arg...) \
...@@ -203,4 +203,6 @@ extern void warn_slowpath_null(const char *file, const int line); ...@@ -203,4 +203,6 @@ extern void warn_slowpath_null(const char *file, const int line);
# define WARN_ON_SMP(x) ({0;}) # define WARN_ON_SMP(x) ({0;})
#endif #endif
#endif /* __ASSEMBLY__ */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment