aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 18:58:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 18:58:21 -0400
commit0195c00244dc2e9f522475868fa278c473ba7339 (patch)
treef97ca98ae64ede2c33ad3de05ed7bbfa4f4495ed /arch/mn10300
parentf21ce8f8447c8be8847dadcfdbcc76b0d7365fa5 (diff)
parent141124c02059eee9dbc5c86ea797b1ca888e77f7 (diff)
Merge tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system
Pull "Disintegrate and delete asm/system.h" from David Howells: "Here are a bunch of patches to disintegrate asm/system.h into a set of separate bits to relieve the problem of circular inclusion dependencies. I've built all the working defconfigs from all the arches that I can and made sure that they don't break. The reason for these patches is that I recently encountered a circular dependency problem that came about when I produced some patches to optimise get_order() by rewriting it to use ilog2(). This uses bitops - and on the SH arch asm/bitops.h drags in asm-generic/get_order.h by a circuituous route involving asm/system.h. The main difficulty seems to be asm/system.h. It holds a number of low level bits with no/few dependencies that are commonly used (eg. memory barriers) and a number of bits with more dependencies that aren't used in many places (eg. switch_to()). These patches break asm/system.h up into the following core pieces: (1) asm/barrier.h Move memory barriers here. This already done for MIPS and Alpha. (2) asm/switch_to.h Move switch_to() and related stuff here. (3) asm/exec.h Move arch_align_stack() here. Other process execution related bits could perhaps go here from asm/processor.h. (4) asm/cmpxchg.h Move xchg() and cmpxchg() here as they're full word atomic ops and frequently used by atomic_xchg() and atomic_cmpxchg(). (5) asm/bug.h Move die() and related bits. (6) asm/auxvec.h Move AT_VECTOR_SIZE_ARCH here. Other arch headers are created as needed on a per-arch basis." Fixed up some conflicts from other header file cleanups and moving code around that has happened in the meantime, so David's testing is somewhat weakened by that. We'll find out anything that got broken and fix it.. * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits) Delete all instances of asm/system.h Remove all #inclusions of asm/system.h Add #includes needed to permit the removal of asm/system.h Move all declarations of free_initmem() to linux/mm.h Disintegrate asm/system.h for OpenRISC Split arch_align_stack() out from asm-generic/system.h Split the switch_to() wrapper out of asm-generic/system.h Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h Create asm-generic/barrier.h Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h Disintegrate asm/system.h for Xtensa Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] Disintegrate asm/system.h for Tile Disintegrate asm/system.h for Sparc Disintegrate asm/system.h for SH Disintegrate asm/system.h for Score Disintegrate asm/system.h for S390 Disintegrate asm/system.h for PowerPC Disintegrate asm/system.h for PA-RISC Disintegrate asm/system.h for MN10300 ...
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/include/asm/atomic.h109
-rw-r--r--arch/mn10300/include/asm/barrier.h37
-rw-r--r--arch/mn10300/include/asm/cmpxchg.h115
-rw-r--r--arch/mn10300/include/asm/dma.h1
-rw-r--r--arch/mn10300/include/asm/exec.h16
-rw-r--r--arch/mn10300/include/asm/switch_to.h49
-rw-r--r--arch/mn10300/include/asm/system.h102
-rw-r--r--arch/mn10300/kernel/entry.S1
-rw-r--r--arch/mn10300/kernel/fpu.c1
-rw-r--r--arch/mn10300/kernel/gdb-io-serial.c1
-rw-r--r--arch/mn10300/kernel/gdb-io-ttysm.c1
-rw-r--r--arch/mn10300/kernel/gdb-stub.c1
-rw-r--r--arch/mn10300/kernel/mn10300-serial.c1
-rw-r--r--arch/mn10300/kernel/mn10300-watchdog.c1
-rw-r--r--arch/mn10300/kernel/process.c1
-rw-r--r--arch/mn10300/kernel/ptrace.c1
-rw-r--r--arch/mn10300/kernel/setup.c1
-rw-r--r--arch/mn10300/kernel/smp-low.S2
-rw-r--r--arch/mn10300/kernel/smp.c1
-rw-r--r--arch/mn10300/kernel/traps.c1
-rw-r--r--arch/mn10300/lib/bitops.c1
-rw-r--r--arch/mn10300/mm/fault.c1
-rw-r--r--arch/mn10300/mm/init.c1
-rw-r--r--arch/mn10300/mm/misalignment.c1
-rw-r--r--arch/mn10300/mm/pgtable.c1
-rw-r--r--arch/mn10300/mm/tlb-smp.c1
-rw-r--r--arch/mn10300/proc-mn2ws0050/proc-init.c1
27 files changed, 221 insertions, 229 deletions
diff --git a/arch/mn10300/include/asm/atomic.h b/arch/mn10300/include/asm/atomic.h
index b9a8f8461262..975e1841ca64 100644
--- a/arch/mn10300/include/asm/atomic.h
+++ b/arch/mn10300/include/asm/atomic.h
@@ -12,112 +12,7 @@
12#define _ASM_ATOMIC_H 12#define _ASM_ATOMIC_H
13 13
14#include <asm/irqflags.h> 14#include <asm/irqflags.h>
15 15#include <asm/cmpxchg.h>
16#ifndef __ASSEMBLY__
17
18#ifdef CONFIG_SMP
19#ifdef CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT
20static inline
21unsigned long __xchg(volatile unsigned long *m, unsigned long val)
22{
23 unsigned long status;
24 unsigned long oldval;
25
26 asm volatile(
27 "1: mov %4,(_AAR,%3) \n"
28 " mov (_ADR,%3),%1 \n"
29 " mov %5,(_ADR,%3) \n"
30 " mov (_ADR,%3),%0 \n" /* flush */
31 " mov (_ASR,%3),%0 \n"
32 " or %0,%0 \n"
33 " bne 1b \n"
34 : "=&r"(status), "=&r"(oldval), "=m"(*m)
35 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(m), "r"(val)
36 : "memory", "cc");
37
38 return oldval;
39}
40
41static inline unsigned long __cmpxchg(volatile unsigned long *m,
42 unsigned long old, unsigned long new)
43{
44 unsigned long status;
45 unsigned long oldval;
46
47 asm volatile(
48 "1: mov %4,(_AAR,%3) \n"
49 " mov (_ADR,%3),%1 \n"
50 " cmp %5,%1 \n"
51 " bne 2f \n"
52 " mov %6,(_ADR,%3) \n"
53 "2: mov (_ADR,%3),%0 \n" /* flush */
54 " mov (_ASR,%3),%0 \n"
55 " or %0,%0 \n"
56 " bne 1b \n"
57 : "=&r"(status), "=&r"(oldval), "=m"(*m)
58 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(m),
59 "r"(old), "r"(new)
60 : "memory", "cc");
61
62 return oldval;
63}
64#else /* CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT */
65#error "No SMP atomic operation support!"
66#endif /* CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT */
67
68#else /* CONFIG_SMP */
69
70/*
71 * Emulate xchg for non-SMP MN10300
72 */
73struct __xchg_dummy { unsigned long a[100]; };
74#define __xg(x) ((struct __xchg_dummy *)(x))
75
76static inline
77unsigned long __xchg(volatile unsigned long *m, unsigned long val)
78{
79 unsigned long oldval;
80 unsigned long flags;
81
82 flags = arch_local_cli_save();
83 oldval = *m;
84 *m = val;
85 arch_local_irq_restore(flags);
86 return oldval;
87}
88
89/*
90 * Emulate cmpxchg for non-SMP MN10300
91 */
92static inline unsigned long __cmpxchg(volatile unsigned long *m,
93 unsigned long old, unsigned long new)
94{
95 unsigned long oldval;
96 unsigned long flags;
97
98 flags = arch_local_cli_save();
99 oldval = *m;
100 if (oldval == old)
101 *m = new;
102 arch_local_irq_restore(flags);
103 return oldval;
104}
105
106#endif /* CONFIG_SMP */
107
108#define xchg(ptr, v) \
109 ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \
110 (unsigned long)(v)))
111
112#define cmpxchg(ptr, o, n) \
113 ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
114 (unsigned long)(o), \
115 (unsigned long)(n)))
116
117#define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))
118#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
119
120#endif /* !__ASSEMBLY__ */
121 16
122#ifndef CONFIG_SMP 17#ifndef CONFIG_SMP
123#include <asm-generic/atomic.h> 18#include <asm-generic/atomic.h>
@@ -269,6 +164,8 @@ static inline void atomic_dec(atomic_t *v)
269 c; \ 164 c; \
270}) 165})
271 166
167#define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))
168#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
272 169
273/** 170/**
274 * atomic_clear_mask - Atomically clear bits in memory 171 * atomic_clear_mask - Atomically clear bits in memory
diff --git a/arch/mn10300/include/asm/barrier.h b/arch/mn10300/include/asm/barrier.h
new file mode 100644
index 000000000000..2bd97a5c8af7
--- /dev/null
+++ b/arch/mn10300/include/asm/barrier.h
@@ -0,0 +1,37 @@
1/* MN10300 memory barrier definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11#ifndef _ASM_BARRIER_H
12#define _ASM_BARRIER_H
13
14#define nop() asm volatile ("nop")
15
16#define mb() asm volatile ("": : :"memory")
17#define rmb() mb()
18#define wmb() asm volatile ("": : :"memory")
19
20#ifdef CONFIG_SMP
21#define smp_mb() mb()
22#define smp_rmb() rmb()
23#define smp_wmb() wmb()
24#define set_mb(var, value) do { xchg(&var, value); } while (0)
25#else /* CONFIG_SMP */
26#define smp_mb() barrier()
27#define smp_rmb() barrier()
28#define smp_wmb() barrier()
29#define set_mb(var, value) do { var = value; mb(); } while (0)
30#endif /* CONFIG_SMP */
31
32#define set_wmb(var, value) do { var = value; wmb(); } while (0)
33
34#define read_barrier_depends() do {} while (0)
35#define smp_read_barrier_depends() do {} while (0)
36
37#endif /* _ASM_BARRIER_H */
diff --git a/arch/mn10300/include/asm/cmpxchg.h b/arch/mn10300/include/asm/cmpxchg.h
new file mode 100644
index 000000000000..97a4aaf387a6
--- /dev/null
+++ b/arch/mn10300/include/asm/cmpxchg.h
@@ -0,0 +1,115 @@
1/* MN10300 Atomic xchg/cmpxchg operations
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11#ifndef _ASM_CMPXCHG_H
12#define _ASM_CMPXCHG_H
13
14#include <asm/irqflags.h>
15
16#ifdef CONFIG_SMP
17#ifdef CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT
18static inline
19unsigned long __xchg(volatile unsigned long *m, unsigned long val)
20{
21 unsigned long status;
22 unsigned long oldval;
23
24 asm volatile(
25 "1: mov %4,(_AAR,%3) \n"
26 " mov (_ADR,%3),%1 \n"
27 " mov %5,(_ADR,%3) \n"
28 " mov (_ADR,%3),%0 \n" /* flush */
29 " mov (_ASR,%3),%0 \n"
30 " or %0,%0 \n"
31 " bne 1b \n"
32 : "=&r"(status), "=&r"(oldval), "=m"(*m)
33 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(m), "r"(val)
34 : "memory", "cc");
35
36 return oldval;
37}
38
39static inline unsigned long __cmpxchg(volatile unsigned long *m,
40 unsigned long old, unsigned long new)
41{
42 unsigned long status;
43 unsigned long oldval;
44
45 asm volatile(
46 "1: mov %4,(_AAR,%3) \n"
47 " mov (_ADR,%3),%1 \n"
48 " cmp %5,%1 \n"
49 " bne 2f \n"
50 " mov %6,(_ADR,%3) \n"
51 "2: mov (_ADR,%3),%0 \n" /* flush */
52 " mov (_ASR,%3),%0 \n"
53 " or %0,%0 \n"
54 " bne 1b \n"
55 : "=&r"(status), "=&r"(oldval), "=m"(*m)
56 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(m),
57 "r"(old), "r"(new)
58 : "memory", "cc");
59
60 return oldval;
61}
62#else /* CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT */
63#error "No SMP atomic operation support!"
64#endif /* CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT */
65
66#else /* CONFIG_SMP */
67
68/*
69 * Emulate xchg for non-SMP MN10300
70 */
71struct __xchg_dummy { unsigned long a[100]; };
72#define __xg(x) ((struct __xchg_dummy *)(x))
73
74static inline
75unsigned long __xchg(volatile unsigned long *m, unsigned long val)
76{
77 unsigned long oldval;
78 unsigned long flags;
79
80 flags = arch_local_cli_save();
81 oldval = *m;
82 *m = val;
83 arch_local_irq_restore(flags);
84 return oldval;
85}
86
87/*
88 * Emulate cmpxchg for non-SMP MN10300
89 */
90static inline unsigned long __cmpxchg(volatile unsigned long *m,
91 unsigned long old, unsigned long new)
92{
93 unsigned long oldval;
94 unsigned long flags;
95
96 flags = arch_local_cli_save();
97 oldval = *m;
98 if (oldval == old)
99 *m = new;
100 arch_local_irq_restore(flags);
101 return oldval;
102}
103
104#endif /* CONFIG_SMP */
105
106#define xchg(ptr, v) \
107 ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \
108 (unsigned long)(v)))
109
110#define cmpxchg(ptr, o, n) \
111 ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
112 (unsigned long)(o), \
113 (unsigned long)(n)))
114
115#endif /* _ASM_CMPXCHG_H */
diff --git a/arch/mn10300/include/asm/dma.h b/arch/mn10300/include/asm/dma.h
index 098df2e617ab..10b77d4628c2 100644
--- a/arch/mn10300/include/asm/dma.h
+++ b/arch/mn10300/include/asm/dma.h
@@ -11,7 +11,6 @@
11#ifndef _ASM_DMA_H 11#ifndef _ASM_DMA_H
12#define _ASM_DMA_H 12#define _ASM_DMA_H
13 13
14#include <asm/system.h>
15#include <linux/spinlock.h> 14#include <linux/spinlock.h>
16#include <asm/io.h> 15#include <asm/io.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
diff --git a/arch/mn10300/include/asm/exec.h b/arch/mn10300/include/asm/exec.h
new file mode 100644
index 000000000000..c74e367f4b9d
--- /dev/null
+++ b/arch/mn10300/include/asm/exec.h
@@ -0,0 +1,16 @@
1/* MN10300 process execution definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11#ifndef _ASM_EXEC_H
12#define _ASM_EXEC_H
13
14#define arch_align_stack(x) (x)
15
16#endif /* _ASM_EXEC_H */
diff --git a/arch/mn10300/include/asm/switch_to.h b/arch/mn10300/include/asm/switch_to.h
new file mode 100644
index 000000000000..393d311735c8
--- /dev/null
+++ b/arch/mn10300/include/asm/switch_to.h
@@ -0,0 +1,49 @@
1/* MN10300 task switching definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11#ifndef _ASM_SWITCH_TO_H
12#define _ASM_SWITCH_TO_H
13
14#include <asm/barrier.h>
15
16struct task_struct;
17struct thread_struct;
18
19#if !defined(CONFIG_LAZY_SAVE_FPU)
20struct fpu_state_struct;
21extern asmlinkage void fpu_save(struct fpu_state_struct *);
22#define switch_fpu(prev, next) \
23 do { \
24 if ((prev)->thread.fpu_flags & THREAD_HAS_FPU) { \
25 (prev)->thread.fpu_flags &= ~THREAD_HAS_FPU; \
26 (prev)->thread.uregs->epsw &= ~EPSW_FE; \
27 fpu_save(&(prev)->thread.fpu_state); \
28 } \
29 } while (0)
30#else
31#define switch_fpu(prev, next) do {} while (0)
32#endif
33
34/* context switching is now performed out-of-line in switch_to.S */
35extern asmlinkage
36struct task_struct *__switch_to(struct thread_struct *prev,
37 struct thread_struct *next,
38 struct task_struct *prev_task);
39
40#define switch_to(prev, next, last) \
41do { \
42 switch_fpu(prev, next); \
43 current->thread.wchan = (u_long) __builtin_return_address(0); \
44 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
45 mb(); \
46 current->thread.wchan = 0; \
47} while (0)
48
49#endif /* _ASM_SWITCH_TO_H */
diff --git a/arch/mn10300/include/asm/system.h b/arch/mn10300/include/asm/system.h
deleted file mode 100644
index 94b4c5e1491b..000000000000
--- a/arch/mn10300/include/asm/system.h
+++ /dev/null
@@ -1,102 +0,0 @@
1/* MN10300 System definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11#ifndef _ASM_SYSTEM_H
12#define _ASM_SYSTEM_H
13
14#include <asm/cpu-regs.h>
15#include <asm/intctl-regs.h>
16
17#ifdef __KERNEL__
18#ifndef __ASSEMBLY__
19
20#include <linux/kernel.h>
21#include <linux/irqflags.h>
22#include <linux/atomic.h>
23
24#if !defined(CONFIG_LAZY_SAVE_FPU)
25struct fpu_state_struct;
26extern asmlinkage void fpu_save(struct fpu_state_struct *);
27#define switch_fpu(prev, next) \
28 do { \
29 if ((prev)->thread.fpu_flags & THREAD_HAS_FPU) { \
30 (prev)->thread.fpu_flags &= ~THREAD_HAS_FPU; \
31 (prev)->thread.uregs->epsw &= ~EPSW_FE; \
32 fpu_save(&(prev)->thread.fpu_state); \
33 } \
34 } while (0)
35#else
36#define switch_fpu(prev, next) do {} while (0)
37#endif
38
39struct task_struct;
40struct thread_struct;
41
42extern asmlinkage
43struct task_struct *__switch_to(struct thread_struct *prev,
44 struct thread_struct *next,
45 struct task_struct *prev_task);
46
47/* context switching is now performed out-of-line in switch_to.S */
48#define switch_to(prev, next, last) \
49do { \
50 switch_fpu(prev, next); \
51 current->thread.wchan = (u_long) __builtin_return_address(0); \
52 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
53 mb(); \
54 current->thread.wchan = 0; \
55} while (0)
56
57#define arch_align_stack(x) (x)
58
59#define nop() asm volatile ("nop")
60
61/*
62 * Force strict CPU ordering.
63 * And yes, this is required on UP too when we're talking
64 * to devices.
65 *
66 * For now, "wmb()" doesn't actually do anything, as all
67 * Intel CPU's follow what Intel calls a *Processor Order*,
68 * in which all writes are seen in the program order even
69 * outside the CPU.
70 *
71 * I expect future Intel CPU's to have a weaker ordering,
72 * but I'd also expect them to finally get their act together
73 * and add some real memory barriers if so.
74 *
75 * Some non intel clones support out of order store. wmb() ceases to be a
76 * nop for these.
77 */
78
79#define mb() asm volatile ("": : :"memory")
80#define rmb() mb()
81#define wmb() asm volatile ("": : :"memory")
82
83#ifdef CONFIG_SMP
84#define smp_mb() mb()
85#define smp_rmb() rmb()
86#define smp_wmb() wmb()
87#define set_mb(var, value) do { xchg(&var, value); } while (0)
88#else /* CONFIG_SMP */
89#define smp_mb() barrier()
90#define smp_rmb() barrier()
91#define smp_wmb() barrier()
92#define set_mb(var, value) do { var = value; mb(); } while (0)
93#endif /* CONFIG_SMP */
94
95#define set_wmb(var, value) do { var = value; wmb(); } while (0)
96
97#define read_barrier_depends() do {} while (0)
98#define smp_read_barrier_depends() do {} while (0)
99
100#endif /* !__ASSEMBLY__ */
101#endif /* __KERNEL__ */
102#endif /* _ASM_SYSTEM_H */
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index 3e3620d9fc45..8e11f9f48999 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -15,7 +15,6 @@
15#include <linux/sys.h> 15#include <linux/sys.h>
16#include <linux/linkage.h> 16#include <linux/linkage.h>
17#include <asm/smp.h> 17#include <asm/smp.h>
18#include <asm/system.h>
19#include <asm/irqflags.h> 18#include <asm/irqflags.h>
20#include <asm/thread_info.h> 19#include <asm/thread_info.h>
21#include <asm/intctl-regs.h> 20#include <asm/intctl-regs.h>
diff --git a/arch/mn10300/kernel/fpu.c b/arch/mn10300/kernel/fpu.c
index bb5fa7df6c44..064fa194de2b 100644
--- a/arch/mn10300/kernel/fpu.c
+++ b/arch/mn10300/kernel/fpu.c
@@ -12,7 +12,6 @@
12#include <asm/fpu.h> 12#include <asm/fpu.h>
13#include <asm/elf.h> 13#include <asm/elf.h>
14#include <asm/exceptions.h> 14#include <asm/exceptions.h>
15#include <asm/system.h>
16 15
17#ifdef CONFIG_LAZY_SAVE_FPU 16#ifdef CONFIG_LAZY_SAVE_FPU
18struct task_struct *fpu_state_owner; 17struct task_struct *fpu_state_owner;
diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c
index f28dc99c6f72..df51242744cc 100644
--- a/arch/mn10300/kernel/gdb-io-serial.c
+++ b/arch/mn10300/kernel/gdb-io-serial.c
@@ -18,7 +18,6 @@
18#include <linux/nmi.h> 18#include <linux/nmi.h>
19 19
20#include <asm/pgtable.h> 20#include <asm/pgtable.h>
21#include <asm/system.h>
22#include <asm/gdb-stub.h> 21#include <asm/gdb-stub.h>
23#include <asm/exceptions.h> 22#include <asm/exceptions.h>
24#include <asm/serial-regs.h> 23#include <asm/serial-regs.h>
diff --git a/arch/mn10300/kernel/gdb-io-ttysm.c b/arch/mn10300/kernel/gdb-io-ttysm.c
index c859cacbb9c3..caae8cac9db1 100644
--- a/arch/mn10300/kernel/gdb-io-ttysm.c
+++ b/arch/mn10300/kernel/gdb-io-ttysm.c
@@ -17,7 +17,6 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/tty.h> 18#include <linux/tty.h>
19#include <asm/pgtable.h> 19#include <asm/pgtable.h>
20#include <asm/system.h>
21#include <asm/gdb-stub.h> 20#include <asm/gdb-stub.h>
22#include <asm/exceptions.h> 21#include <asm/exceptions.h>
23#include <unit/clock.h> 22#include <unit/clock.h>
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c
index 522eb8a9b60d..a128c57b586b 100644
--- a/arch/mn10300/kernel/gdb-stub.c
+++ b/arch/mn10300/kernel/gdb-stub.c
@@ -130,7 +130,6 @@
130#include <linux/bug.h> 130#include <linux/bug.h>
131 131
132#include <asm/pgtable.h> 132#include <asm/pgtable.h>
133#include <asm/system.h>
134#include <asm/gdb-stub.h> 133#include <asm/gdb-stub.h>
135#include <asm/exceptions.h> 134#include <asm/exceptions.h>
136#include <asm/debugger.h> 135#include <asm/debugger.h>
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c
index 94901c56baf1..339cef4c8256 100644
--- a/arch/mn10300/kernel/mn10300-serial.c
+++ b/arch/mn10300/kernel/mn10300-serial.c
@@ -36,7 +36,6 @@ static const char serial_revdate[] = "2007-11-06";
36#include <linux/console.h> 36#include <linux/console.h>
37#include <linux/sysrq.h> 37#include <linux/sysrq.h>
38 38
39#include <asm/system.h>
40#include <asm/io.h> 39#include <asm/io.h>
41#include <asm/irq.h> 40#include <asm/irq.h>
42#include <asm/bitops.h> 41#include <asm/bitops.h>
diff --git a/arch/mn10300/kernel/mn10300-watchdog.c b/arch/mn10300/kernel/mn10300-watchdog.c
index a45f0c7549a6..db64a7166c09 100644
--- a/arch/mn10300/kernel/mn10300-watchdog.c
+++ b/arch/mn10300/kernel/mn10300-watchdog.c
@@ -18,7 +18,6 @@
18#include <linux/kernel_stat.h> 18#include <linux/kernel_stat.h>
19#include <linux/nmi.h> 19#include <linux/nmi.h>
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <asm/system.h>
22#include <linux/atomic.h> 21#include <linux/atomic.h>
23#include <asm/intctl-regs.h> 22#include <asm/intctl-regs.h>
24#include <asm/rtc-regs.h> 23#include <asm/rtc-regs.h>
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index cac401d37f75..14707f25153b 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -27,7 +27,6 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/system.h>
31#include <asm/io.h> 30#include <asm/io.h>
32#include <asm/processor.h> 31#include <asm/processor.h>
33#include <asm/mmu_context.h> 32#include <asm/mmu_context.h>
diff --git a/arch/mn10300/kernel/ptrace.c b/arch/mn10300/kernel/ptrace.c
index 5c0b07e61006..5bd58514e739 100644
--- a/arch/mn10300/kernel/ptrace.c
+++ b/arch/mn10300/kernel/ptrace.c
@@ -21,7 +21,6 @@
21#include <linux/tracehook.h> 21#include <linux/tracehook.h>
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/system.h>
25#include <asm/processor.h> 24#include <asm/processor.h>
26#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
27#include <asm/fpu.h> 26#include <asm/fpu.h>
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c
index 9e7a3209a3e1..33c3bd1e5c6d 100644
--- a/arch/mn10300/kernel/setup.c
+++ b/arch/mn10300/kernel/setup.c
@@ -26,7 +26,6 @@
26#include <asm/processor.h> 26#include <asm/processor.h>
27#include <linux/console.h> 27#include <linux/console.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/system.h>
30#include <asm/setup.h> 29#include <asm/setup.h>
31#include <asm/io.h> 30#include <asm/io.h>
32#include <asm/smp.h> 31#include <asm/smp.h>
diff --git a/arch/mn10300/kernel/smp-low.S b/arch/mn10300/kernel/smp-low.S
index 72938cefc05e..71f1b2faaa0b 100644
--- a/arch/mn10300/kernel/smp-low.S
+++ b/arch/mn10300/kernel/smp-low.S
@@ -13,9 +13,9 @@
13#include <linux/sys.h> 13#include <linux/sys.h>
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <asm/smp.h> 15#include <asm/smp.h>
16#include <asm/system.h>
17#include <asm/thread_info.h> 16#include <asm/thread_info.h>
18#include <asm/cpu-regs.h> 17#include <asm/cpu-regs.h>
18#include <asm/intctl-regs.h>
19#include <proc/smp-regs.h> 19#include <proc/smp-regs.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/frame.inc> 21#include <asm/frame.inc>
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
index 9242e9fcc564..910dddf65e44 100644
--- a/arch/mn10300/kernel/smp.c
+++ b/arch/mn10300/kernel/smp.c
@@ -25,7 +25,6 @@
25#include <linux/profile.h> 25#include <linux/profile.h>
26#include <linux/smp.h> 26#include <linux/smp.h>
27#include <asm/tlbflush.h> 27#include <asm/tlbflush.h>
28#include <asm/system.h>
29#include <asm/bitops.h> 28#include <asm/bitops.h>
30#include <asm/processor.h> 29#include <asm/processor.h>
31#include <asm/bug.h> 30#include <asm/bug.h>
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c
index 9220a75a7b43..94a9c6d53e1b 100644
--- a/arch/mn10300/kernel/traps.c
+++ b/arch/mn10300/kernel/traps.c
@@ -27,7 +27,6 @@
27#include <linux/bug.h> 27#include <linux/bug.h>
28#include <linux/irq.h> 28#include <linux/irq.h>
29#include <asm/processor.h> 29#include <asm/processor.h>
30#include <asm/system.h>
31#include <linux/uaccess.h> 30#include <linux/uaccess.h>
32#include <asm/io.h> 31#include <asm/io.h>
33#include <linux/atomic.h> 32#include <linux/atomic.h>
diff --git a/arch/mn10300/lib/bitops.c b/arch/mn10300/lib/bitops.c
index a66c6cdaf442..37309cdb7584 100644
--- a/arch/mn10300/lib/bitops.c
+++ b/arch/mn10300/lib/bitops.c
@@ -10,7 +10,6 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <asm/bitops.h> 12#include <asm/bitops.h>
13#include <asm/system.h>
14 13
15/* 14/*
16 * try flipping a bit using BSET and BCLR 15 * try flipping a bit using BSET and BCLR
diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c
index 0945409a8022..90f346f7392d 100644
--- a/arch/mn10300/mm/fault.c
+++ b/arch/mn10300/mm/fault.c
@@ -24,7 +24,6 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/vt_kern.h> /* For unblank_screen() */ 25#include <linux/vt_kern.h> /* For unblank_screen() */
26 26
27#include <asm/system.h>
28#include <asm/uaccess.h> 27#include <asm/uaccess.h>
29#include <asm/pgalloc.h> 28#include <asm/pgalloc.h>
30#include <asm/hardirq.h> 29#include <asm/hardirq.h>
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c
index 13801824e3ee..e57e5bc23562 100644
--- a/arch/mn10300/mm/init.c
+++ b/arch/mn10300/mm/init.c
@@ -29,7 +29,6 @@
29#include <linux/gfp.h> 29#include <linux/gfp.h>
30 30
31#include <asm/processor.h> 31#include <asm/processor.h>
32#include <asm/system.h>
33#include <asm/uaccess.h> 32#include <asm/uaccess.h>
34#include <asm/pgtable.h> 33#include <asm/pgtable.h>
35#include <asm/pgalloc.h> 34#include <asm/pgalloc.h>
diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c
index f9bb8cb1c14a..b9920b1edd5a 100644
--- a/arch/mn10300/mm/misalignment.c
+++ b/arch/mn10300/mm/misalignment.c
@@ -23,7 +23,6 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <asm/processor.h> 25#include <asm/processor.h>
26#include <asm/system.h>
27#include <asm/uaccess.h> 26#include <asm/uaccess.h>
28#include <asm/io.h> 27#include <asm/io.h>
29#include <linux/atomic.h> 28#include <linux/atomic.h>
diff --git a/arch/mn10300/mm/pgtable.c b/arch/mn10300/mm/pgtable.c
index 450f7ba3f8f2..4ebf117c3285 100644
--- a/arch/mn10300/mm/pgtable.c
+++ b/arch/mn10300/mm/pgtable.c
@@ -21,7 +21,6 @@
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/quicklist.h> 22#include <linux/quicklist.h>
23 23
24#include <asm/system.h>
25#include <asm/pgtable.h> 24#include <asm/pgtable.h>
26#include <asm/pgalloc.h> 25#include <asm/pgalloc.h>
27#include <asm/tlb.h> 26#include <asm/tlb.h>
diff --git a/arch/mn10300/mm/tlb-smp.c b/arch/mn10300/mm/tlb-smp.c
index 9a777498a916..3e57faf04083 100644
--- a/arch/mn10300/mm/tlb-smp.c
+++ b/arch/mn10300/mm/tlb-smp.c
@@ -24,7 +24,6 @@
24#include <linux/profile.h> 24#include <linux/profile.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <asm/tlbflush.h> 26#include <asm/tlbflush.h>
27#include <asm/system.h>
28#include <asm/bitops.h> 27#include <asm/bitops.h>
29#include <asm/processor.h> 28#include <asm/processor.h>
30#include <asm/bug.h> 29#include <asm/bug.h>
diff --git a/arch/mn10300/proc-mn2ws0050/proc-init.c b/arch/mn10300/proc-mn2ws0050/proc-init.c
index fe6e24906ffc..ee6d03dbc8d8 100644
--- a/arch/mn10300/proc-mn2ws0050/proc-init.c
+++ b/arch/mn10300/proc-mn2ws0050/proc-init.c
@@ -15,7 +15,6 @@
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16 16
17#include <asm/processor.h> 17#include <asm/processor.h>
18#include <asm/system.h>
19#include <asm/uaccess.h> 18#include <asm/uaccess.h>
20#include <asm/io.h> 19#include <asm/io.h>
21#include <linux/atomic.h> 20#include <linux/atomic.h>