Skip to content

Commit

Permalink
Add #includes needed to permit the removal of asm/system.h
Browse files Browse the repository at this point in the history
asm/system.h is a cause of circular dependency problems because it contains
commonly used primitive stuff like barrier definitions and uncommonly used
stuff like switch_to() that might require MMU definitions.

asm/system.h has been disintegrated by this point on all arches into the
following common segments:

 (1) asm/barrier.h

     Moved memory barrier definitions here.

 (2) asm/cmpxchg.h

     Moved xchg() and cmpxchg() here.  #included in asm/atomic.h.

 (3) asm/bug.h

     Moved die() and similar here.

 (4) asm/exec.h

     Moved arch_align_stack() here.

 (5) asm/elf.h

     Moved AT_VECTOR_SIZE_ARCH here.

 (6) asm/switch_to.h

     Moved switch_to() here.

Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Mar 28, 2012
1 parent 49a7f04 commit 96f951e
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/misc/sgi-gru/gru_instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern void gru_wait_abort_proc(void *cb);
*((volatile unsigned long *)(p)) = v; /* force st.rel */ \
} while (0)
#elif defined(CONFIG_X86_64)
#include <asm/cacheflush.h>
#define __flush_cache(p) clflush(p)
#define gru_ordered_store_ulong(p, v) \
do { \
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/crystalhd/bc_dts_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#ifndef _BC_DTS_DEFS_H_
#define _BC_DTS_DEFS_H_

#include <linux/types.h>

/* BIT Mask */
#define BC_BIT(_x) (1 << (_x))

Expand Down
1 change: 1 addition & 0 deletions fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/uaccess.h>
#include <asm/param.h>
#include <asm/page.h>
#include <asm/exec.h>

static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs);
static int load_elf_library(struct file *);
Expand Down
1 change: 1 addition & 0 deletions fs/binfmt_elf_fdpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <asm/uaccess.h>
#include <asm/param.h>
#include <asm/pgalloc.h>
#include <asm/exec.h>

typedef char *elf_caddr_t;

Expand Down
1 change: 1 addition & 0 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
#include <asm/exec.h>

#include <trace/events/task.h>
#include "internal.h"
Expand Down
2 changes: 1 addition & 1 deletion include/asm-generic/bitops/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define _ASM_GENERIC_BITOPS_ATOMIC_H_

#include <asm/types.h>
#include <asm/system.h>
#include <linux/irqflags.h>

#ifdef CONFIG_SMP
#include <asm/spinlock.h>
Expand Down
3 changes: 1 addition & 2 deletions include/linux/llist.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
*/

#include <linux/kernel.h>
#include <asm/system.h>
#include <asm/processor.h>
#include <asm/cmpxchg.h>

struct llist_head {
struct llist_node *first;
Expand Down
1 change: 1 addition & 0 deletions include/linux/mtd/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <asm/unaligned.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/barrier.h>

#ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
#define map_bankwidth(map) 1
Expand Down
1 change: 1 addition & 0 deletions include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <linux/kernel.h>
#include <linux/stringify.h>
#include <linux/bottom_half.h>
#include <asm/barrier.h>

#include <asm/system.h>

Expand Down
1 change: 1 addition & 0 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#include <linux/init_task.h>
#include <linux/binfmts.h>

#include <asm/switch_to.h>
#include <asm/tlb.h>
#include <asm/irq_regs.h>
#include <asm/mutex.h>
Expand Down

0 comments on commit 96f951e

Please sign in to comment.