Skip to content

Commit

Permalink
kernel/bounds: avoid circular dependencies in generated headers
Browse files Browse the repository at this point in the history
<linux/spinlock.h> has heavy dependencies on other header files.
It triggers circular dependencies in generated headers on IA64, at
least:

  CC      kernel/bounds.s
In file included from /home/space/kas/git/public/linux/arch/ia64/include/asm/thread_info.h:9:0,
                 from include/linux/thread_info.h:54,
                 from include/asm-generic/preempt.h:4,
                 from arch/ia64/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from kernel/bounds.c:14:
/home/space/kas/git/public/linux/arch/ia64/include/asm/asm-offsets.h:1:35: fatal error: generated/asm-offsets.h: No such file or directory
compilation terminated.

Let's replace <linux/spinlock.h> with <linux/spinlock_types.h>, it's
enough to find out size of spinlock_t.

Signed-off-by: Kirill A. Shutemov <[email protected]>
Reported-and-Tested-by: Tony Luck <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
kiryl authored and aegl committed Nov 19, 2013
1 parent dec8e46 commit 24b9fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/bounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <linux/kbuild.h>
#include <linux/page_cgroup.h>
#include <linux/log2.h>
#include <linux/spinlock.h>
#include <linux/spinlock_types.h>

void foo(void)
{
Expand Down

0 comments on commit 24b9fdc

Please sign in to comment.