diff options
author | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2012-03-28 13:30:03 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-03-28 13:30:03 -0400 |
commit | 8978bfd2288adaa24d39fa15f57eb9e24ffeca12 (patch) | |
tree | a932d224f63890b38bbf29ca1fd468949c1e544c /arch | |
parent | bd119c69239322caafdb64517a806037d0d0c70a (diff) |
Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
Disintegrate asm/system.h for Unicore32. (Compilation successful)
The implementation details are not changed, but only splitted.
BTW, some codestyles are adjusted.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/unicore32/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/unicore32/include/asm/barrier.h | 28 | ||||
-rw-r--r-- | arch/unicore32/include/asm/bug.h | 27 | ||||
-rw-r--r-- | arch/unicore32/include/asm/cmpxchg.h | 61 | ||||
-rw-r--r-- | arch/unicore32/include/asm/exec.h | 15 | ||||
-rw-r--r-- | arch/unicore32/include/asm/hwdef-copro.h | 48 | ||||
-rw-r--r-- | arch/unicore32/include/asm/io.h | 1 | ||||
-rw-r--r-- | arch/unicore32/include/asm/switch_to.h | 30 | ||||
-rw-r--r-- | arch/unicore32/include/asm/system.h | 166 | ||||
-rw-r--r-- | arch/unicore32/include/asm/uaccess.h | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/dma.c | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/unicore32/kernel/hibernate.c | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/irq.c | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/ksyms.c | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/setup.h | 3 | ||||
-rw-r--r-- | arch/unicore32/kernel/traps.c | 1 | ||||
-rw-r--r-- | arch/unicore32/mm/alignment.c | 2 | ||||
-rw-r--r-- | arch/unicore32/mm/fault.c | 1 | ||||
-rw-r--r-- | arch/unicore32/mm/flush.c | 1 | ||||
-rw-r--r-- | arch/unicore32/mm/mm.h | 5 |
22 files changed, 225 insertions, 173 deletions
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index ca113d6999c5..34b789b71115 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
@@ -3,7 +3,6 @@ include include/asm-generic/Kbuild.asm | |||
3 | generic-y += atomic.h | 3 | generic-y += atomic.h |
4 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
5 | generic-y += bitsperlong.h | 5 | generic-y += bitsperlong.h |
6 | generic-y += bug.h | ||
7 | generic-y += bugs.h | 6 | generic-y += bugs.h |
8 | generic-y += cputime.h | 7 | generic-y += cputime.h |
9 | generic-y += current.h | 8 | generic-y += current.h |
diff --git a/arch/unicore32/include/asm/barrier.h b/arch/unicore32/include/asm/barrier.h new file mode 100644 index 000000000000..a6620e5336b6 --- /dev/null +++ b/arch/unicore32/include/asm/barrier.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Memory barrier implementations for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_BARRIER_H__ | ||
11 | #define __UNICORE_BARRIER_H__ | ||
12 | |||
13 | #define isb() __asm__ __volatile__ ("" : : : "memory") | ||
14 | #define dsb() __asm__ __volatile__ ("" : : : "memory") | ||
15 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
16 | |||
17 | #define mb() barrier() | ||
18 | #define rmb() barrier() | ||
19 | #define wmb() barrier() | ||
20 | #define smp_mb() barrier() | ||
21 | #define smp_rmb() barrier() | ||
22 | #define smp_wmb() barrier() | ||
23 | #define read_barrier_depends() do { } while (0) | ||
24 | #define smp_read_barrier_depends() do { } while (0) | ||
25 | |||
26 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
27 | |||
28 | #endif /* __UNICORE_BARRIER_H__ */ | ||
diff --git a/arch/unicore32/include/asm/bug.h b/arch/unicore32/include/asm/bug.h new file mode 100644 index 000000000000..b1ff8cadb086 --- /dev/null +++ b/arch/unicore32/include/asm/bug.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Bug handling for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_BUG_H__ | ||
11 | #define __UNICORE_BUG_H__ | ||
12 | |||
13 | #include <asm-generic/bug.h> | ||
14 | |||
15 | struct pt_regs; | ||
16 | struct siginfo; | ||
17 | |||
18 | extern void die(const char *msg, struct pt_regs *regs, int err); | ||
19 | extern void uc32_notify_die(const char *str, struct pt_regs *regs, | ||
20 | struct siginfo *info, unsigned long err, unsigned long trap); | ||
21 | |||
22 | extern asmlinkage void __backtrace(void); | ||
23 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | ||
24 | |||
25 | extern void __show_regs(struct pt_regs *); | ||
26 | |||
27 | #endif /* __UNICORE_BUG_H__ */ | ||
diff --git a/arch/unicore32/include/asm/cmpxchg.h b/arch/unicore32/include/asm/cmpxchg.h new file mode 100644 index 000000000000..df4d5acfd19f --- /dev/null +++ b/arch/unicore32/include/asm/cmpxchg.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Atomics xchg/cmpxchg for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_CMPXCHG_H__ | ||
11 | #define __UNICORE_CMPXCHG_H__ | ||
12 | |||
13 | /* | ||
14 | * Generate a link failure on undefined symbol if the pointer points to a value | ||
15 | * of unsupported size. | ||
16 | */ | ||
17 | extern void __xchg_bad_pointer(void); | ||
18 | |||
19 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | ||
20 | int size) | ||
21 | { | ||
22 | unsigned long ret; | ||
23 | |||
24 | switch (size) { | ||
25 | case 1: | ||
26 | asm volatile("swapb %0, %1, [%2]" | ||
27 | : "=&r" (ret) | ||
28 | : "r" (x), "r" (ptr) | ||
29 | : "memory", "cc"); | ||
30 | break; | ||
31 | case 4: | ||
32 | asm volatile("swapw %0, %1, [%2]" | ||
33 | : "=&r" (ret) | ||
34 | : "r" (x), "r" (ptr) | ||
35 | : "memory", "cc"); | ||
36 | break; | ||
37 | default: | ||
38 | ret = __xchg_bad_pointer(); | ||
39 | } | ||
40 | |||
41 | return ret; | ||
42 | } | ||
43 | |||
44 | #define xchg(ptr, x) \ | ||
45 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | ||
46 | |||
47 | #include <asm-generic/cmpxchg-local.h> | ||
48 | |||
49 | /* | ||
50 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
51 | * them available. | ||
52 | */ | ||
53 | #define cmpxchg_local(ptr, o, n) \ | ||
54 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), \ | ||
55 | (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr)))) | ||
56 | #define cmpxchg64_local(ptr, o, n) \ | ||
57 | __cmpxchg64_local_generic((ptr), (o), (n)) | ||
58 | |||
59 | #include <asm-generic/cmpxchg.h> | ||
60 | |||
61 | #endif /* __UNICORE_CMPXCHG_H__ */ | ||
diff --git a/arch/unicore32/include/asm/exec.h b/arch/unicore32/include/asm/exec.h new file mode 100644 index 000000000000..06d1f0f57888 --- /dev/null +++ b/arch/unicore32/include/asm/exec.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Process execution bits for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_EXEC_H__ | ||
11 | #define __UNICORE_EXEC_H__ | ||
12 | |||
13 | #define arch_align_stack(x) (x) | ||
14 | |||
15 | #endif /* __UNICORE_EXEC_H__ */ | ||
diff --git a/arch/unicore32/include/asm/hwdef-copro.h b/arch/unicore32/include/asm/hwdef-copro.h new file mode 100644 index 000000000000..a3292f039a68 --- /dev/null +++ b/arch/unicore32/include/asm/hwdef-copro.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Co-processor register definitions for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_HWDEF_COPRO_H__ | ||
11 | #define __UNICORE_HWDEF_COPRO_H__ | ||
12 | |||
13 | /* | ||
14 | * Control Register bits (CP#0 CR1) | ||
15 | */ | ||
16 | #define CR_M (1 << 0) /* MMU enable */ | ||
17 | #define CR_A (1 << 1) /* Alignment abort enable */ | ||
18 | #define CR_D (1 << 2) /* Dcache enable */ | ||
19 | #define CR_I (1 << 3) /* Icache enable */ | ||
20 | #define CR_B (1 << 4) /* Dcache write mechanism: write back */ | ||
21 | #define CR_T (1 << 5) /* Burst enable */ | ||
22 | #define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ | ||
23 | |||
24 | #ifndef __ASSEMBLY__ | ||
25 | |||
26 | #define vectors_high() (cr_alignment & CR_V) | ||
27 | |||
28 | extern unsigned long cr_no_alignment; /* defined in entry.S */ | ||
29 | extern unsigned long cr_alignment; /* defined in entry.S */ | ||
30 | |||
31 | static inline unsigned int get_cr(void) | ||
32 | { | ||
33 | unsigned int val; | ||
34 | asm("movc %0, p0.c1, #0" : "=r" (val) : : "cc"); | ||
35 | return val; | ||
36 | } | ||
37 | |||
38 | static inline void set_cr(unsigned int val) | ||
39 | { | ||
40 | asm volatile("movc p0.c1, %0, #0" : : "r" (val) : "cc"); | ||
41 | isb(); | ||
42 | } | ||
43 | |||
44 | extern void adjust_cr(unsigned long mask, unsigned long set); | ||
45 | |||
46 | #endif /* __ASSEMBLY__ */ | ||
47 | |||
48 | #endif /* __UNICORE_HWDEF_COPRO_H__ */ | ||
diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h index adddf6d64077..39decb6e6f57 100644 --- a/arch/unicore32/include/asm/io.h +++ b/arch/unicore32/include/asm/io.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
19 | #include <asm/system.h> | ||
20 | 19 | ||
21 | #define PCI_IOBASE PKUNITY_PCILIO_BASE | 20 | #define PCI_IOBASE PKUNITY_PCILIO_BASE |
22 | #include <asm-generic/io.h> | 21 | #include <asm-generic/io.h> |
diff --git a/arch/unicore32/include/asm/switch_to.h b/arch/unicore32/include/asm/switch_to.h new file mode 100644 index 000000000000..39572d2bd692 --- /dev/null +++ b/arch/unicore32/include/asm/switch_to.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Task switching for PKUnity SoC and UniCore ISA | ||
3 | * | ||
4 | * Copyright (C) 2001-2012 GUAN Xue-tao | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __UNICORE_SWITCH_TO_H__ | ||
11 | #define __UNICORE_SWITCH_TO_H__ | ||
12 | |||
13 | struct task_struct; | ||
14 | struct thread_info; | ||
15 | |||
16 | /* | ||
17 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
18 | * `prev' will never be the same as `next'. schedule() itself | ||
19 | * contains the memory barrier to tell GCC not to cache `current'. | ||
20 | */ | ||
21 | extern struct task_struct *__switch_to(struct task_struct *, | ||
22 | struct thread_info *, struct thread_info *); | ||
23 | |||
24 | #define switch_to(prev, next, last) \ | ||
25 | do { \ | ||
26 | last = __switch_to(prev, task_thread_info(prev), \ | ||
27 | task_thread_info(next)); \ | ||
28 | } while (0) | ||
29 | |||
30 | #endif /* __UNICORE_SWITCH_TO_H__ */ | ||
diff --git a/arch/unicore32/include/asm/system.h b/arch/unicore32/include/asm/system.h index 246b71c17fda..a7f40578587c 100644 --- a/arch/unicore32/include/asm/system.h +++ b/arch/unicore32/include/asm/system.h | |||
@@ -1,161 +1,5 @@ | |||
1 | /* | 1 | /* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */ |
2 | * linux/arch/unicore32/include/asm/system.h | 2 | #include <asm/barrier.h> |
3 | * | 3 | #include <asm/cmpxchg.h> |
4 | * Code specific to PKUnity SoC and UniCore ISA | 4 | #include <asm/exec.h> |
5 | * | 5 | #include <asm/switch_to.h> |
6 | * Copyright (C) 2001-2010 GUAN Xue-tao | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __UNICORE_SYSTEM_H__ | ||
13 | #define __UNICORE_SYSTEM_H__ | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | /* | ||
18 | * CR1 bits (CP#0 CR1) | ||
19 | */ | ||
20 | #define CR_M (1 << 0) /* MMU enable */ | ||
21 | #define CR_A (1 << 1) /* Alignment abort enable */ | ||
22 | #define CR_D (1 << 2) /* Dcache enable */ | ||
23 | #define CR_I (1 << 3) /* Icache enable */ | ||
24 | #define CR_B (1 << 4) /* Dcache write mechanism: write back */ | ||
25 | #define CR_T (1 << 5) /* Burst enable */ | ||
26 | #define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ | ||
27 | |||
28 | #ifndef __ASSEMBLY__ | ||
29 | |||
30 | #include <linux/linkage.h> | ||
31 | #include <linux/irqflags.h> | ||
32 | |||
33 | struct thread_info; | ||
34 | struct task_struct; | ||
35 | |||
36 | struct pt_regs; | ||
37 | |||
38 | void die(const char *msg, struct pt_regs *regs, int err); | ||
39 | |||
40 | struct siginfo; | ||
41 | void uc32_notify_die(const char *str, struct pt_regs *regs, | ||
42 | struct siginfo *info, unsigned long err, unsigned long trap); | ||
43 | |||
44 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
45 | struct pt_regs *), | ||
46 | int sig, int code, const char *name); | ||
47 | |||
48 | #define xchg(ptr, x) \ | ||
49 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | ||
50 | |||
51 | extern asmlinkage void __backtrace(void); | ||
52 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | ||
53 | |||
54 | struct mm_struct; | ||
55 | extern void show_pte(struct mm_struct *mm, unsigned long addr); | ||
56 | extern void __show_regs(struct pt_regs *); | ||
57 | |||
58 | extern int cpu_architecture(void); | ||
59 | extern void cpu_init(void); | ||
60 | |||
61 | #define vectors_high() (cr_alignment & CR_V) | ||
62 | |||
63 | #define isb() __asm__ __volatile__ ("" : : : "memory") | ||
64 | #define dsb() __asm__ __volatile__ ("" : : : "memory") | ||
65 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
66 | |||
67 | #define mb() barrier() | ||
68 | #define rmb() barrier() | ||
69 | #define wmb() barrier() | ||
70 | #define smp_mb() barrier() | ||
71 | #define smp_rmb() barrier() | ||
72 | #define smp_wmb() barrier() | ||
73 | #define read_barrier_depends() do { } while (0) | ||
74 | #define smp_read_barrier_depends() do { } while (0) | ||
75 | |||
76 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
77 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
78 | |||
79 | extern unsigned long cr_no_alignment; /* defined in entry-unicore.S */ | ||
80 | extern unsigned long cr_alignment; /* defined in entry-unicore.S */ | ||
81 | |||
82 | static inline unsigned int get_cr(void) | ||
83 | { | ||
84 | unsigned int val; | ||
85 | asm("movc %0, p0.c1, #0" : "=r" (val) : : "cc"); | ||
86 | return val; | ||
87 | } | ||
88 | |||
89 | static inline void set_cr(unsigned int val) | ||
90 | { | ||
91 | asm volatile("movc p0.c1, %0, #0 @set CR" | ||
92 | : : "r" (val) : "cc"); | ||
93 | isb(); | ||
94 | } | ||
95 | |||
96 | extern void adjust_cr(unsigned long mask, unsigned long set); | ||
97 | |||
98 | /* | ||
99 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
100 | * `prev' will never be the same as `next'. schedule() itself | ||
101 | * contains the memory barrier to tell GCC not to cache `current'. | ||
102 | */ | ||
103 | extern struct task_struct *__switch_to(struct task_struct *, | ||
104 | struct thread_info *, struct thread_info *); | ||
105 | extern void panic(const char *fmt, ...); | ||
106 | |||
107 | #define switch_to(prev, next, last) \ | ||
108 | do { \ | ||
109 | last = __switch_to(prev, \ | ||
110 | task_thread_info(prev), task_thread_info(next)); \ | ||
111 | } while (0) | ||
112 | |||
113 | static inline unsigned long | ||
114 | __xchg(unsigned long x, volatile void *ptr, int size) | ||
115 | { | ||
116 | unsigned long ret; | ||
117 | |||
118 | switch (size) { | ||
119 | case 1: | ||
120 | asm volatile("@ __xchg1\n" | ||
121 | " swapb %0, %1, [%2]" | ||
122 | : "=&r" (ret) | ||
123 | : "r" (x), "r" (ptr) | ||
124 | : "memory", "cc"); | ||
125 | break; | ||
126 | case 4: | ||
127 | asm volatile("@ __xchg4\n" | ||
128 | " swapw %0, %1, [%2]" | ||
129 | : "=&r" (ret) | ||
130 | : "r" (x), "r" (ptr) | ||
131 | : "memory", "cc"); | ||
132 | break; | ||
133 | default: | ||
134 | panic("xchg: bad data size: ptr 0x%p, size %d\n", | ||
135 | ptr, size); | ||
136 | } | ||
137 | |||
138 | return ret; | ||
139 | } | ||
140 | |||
141 | #include <asm-generic/cmpxchg-local.h> | ||
142 | |||
143 | /* | ||
144 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
145 | * them available. | ||
146 | */ | ||
147 | #define cmpxchg_local(ptr, o, n) \ | ||
148 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), \ | ||
149 | (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr)))) | ||
150 | #define cmpxchg64_local(ptr, o, n) \ | ||
151 | __cmpxchg64_local_generic((ptr), (o), (n)) | ||
152 | |||
153 | #include <asm-generic/cmpxchg.h> | ||
154 | |||
155 | #endif /* __ASSEMBLY__ */ | ||
156 | |||
157 | #define arch_align_stack(x) (x) | ||
158 | |||
159 | #endif /* __KERNEL__ */ | ||
160 | |||
161 | #endif | ||
diff --git a/arch/unicore32/include/asm/uaccess.h b/arch/unicore32/include/asm/uaccess.h index 2acda503a6d9..897e11ad8124 100644 --- a/arch/unicore32/include/asm/uaccess.h +++ b/arch/unicore32/include/asm/uaccess.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | 17 | ||
18 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
19 | #include <asm/system.h> | ||
20 | 19 | ||
21 | #define __copy_from_user __copy_from_user | 20 | #define __copy_from_user __copy_from_user |
22 | #define __copy_to_user __copy_to_user | 21 | #define __copy_to_user __copy_to_user |
diff --git a/arch/unicore32/kernel/dma.c b/arch/unicore32/kernel/dma.c index ae441bc3122c..ed2d4d78d9c4 100644 --- a/arch/unicore32/kernel/dma.c +++ b/arch/unicore32/kernel/dma.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include <asm/system.h> | ||
22 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
23 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
24 | #include <mach/dma.h> | 23 | #include <mach/dma.h> |
diff --git a/arch/unicore32/kernel/head.S b/arch/unicore32/kernel/head.S index 8caf322e110d..e8f0b98c02ee 100644 --- a/arch/unicore32/kernel/head.S +++ b/arch/unicore32/kernel/head.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <generated/asm-offsets.h> | 17 | #include <generated/asm-offsets.h> |
18 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/system.h> | 20 | #include <asm/hwdef-copro.h> |
21 | #include <asm/pgtable-hwdef.h> | 21 | #include <asm/pgtable-hwdef.h> |
22 | 22 | ||
23 | #if (PHYS_OFFSET & 0x003fffff) | 23 | #if (PHYS_OFFSET & 0x003fffff) |
diff --git a/arch/unicore32/kernel/hibernate.c b/arch/unicore32/kernel/hibernate.c index 7d0f0b7983a0..d75ef8b6cb56 100644 --- a/arch/unicore32/kernel/hibernate.c +++ b/arch/unicore32/kernel/hibernate.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/suspend.h> | 15 | #include <linux/suspend.h> |
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | 17 | ||
18 | #include <asm/system.h> | ||
19 | #include <asm/page.h> | 18 | #include <asm/page.h> |
20 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
21 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
diff --git a/arch/unicore32/kernel/irq.c b/arch/unicore32/kernel/irq.c index d4efa7d679ff..0be5ccd7ccd2 100644 --- a/arch/unicore32/kernel/irq.c +++ b/arch/unicore32/kernel/irq.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | 28 | ||
29 | #include <asm/system.h> | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | 30 | ||
32 | #include "setup.h" | 31 | #include "setup.h" |
diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index d98bd812cae1..d285d71cbe35 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | 21 | ||
22 | #include <asm/checksum.h> | 22 | #include <asm/checksum.h> |
23 | #include <asm/system.h> | ||
24 | 23 | ||
25 | #include "ksyms.h" | 24 | #include "ksyms.h" |
26 | 25 | ||
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index 52edc2b62873..1b3f152bb9c5 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
36 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
37 | #include <asm/system.h> | ||
38 | #include <asm/stacktrace.h> | 37 | #include <asm/stacktrace.h> |
39 | 38 | ||
40 | #include "setup.h" | 39 | #include "setup.h" |
diff --git a/arch/unicore32/kernel/setup.h b/arch/unicore32/kernel/setup.h index dcd1306eb5c6..f23955028a18 100644 --- a/arch/unicore32/kernel/setup.h +++ b/arch/unicore32/kernel/setup.h | |||
@@ -12,8 +12,11 @@ | |||
12 | #ifndef __UNICORE_KERNEL_SETUP_H__ | 12 | #ifndef __UNICORE_KERNEL_SETUP_H__ |
13 | #define __UNICORE_KERNEL_SETUP_H__ | 13 | #define __UNICORE_KERNEL_SETUP_H__ |
14 | 14 | ||
15 | #include <asm/hwdef-copro.h> | ||
16 | |||
15 | extern void paging_init(void); | 17 | extern void paging_init(void); |
16 | extern void puv3_core_init(void); | 18 | extern void puv3_core_init(void); |
19 | extern void cpu_init(void); | ||
17 | 20 | ||
18 | extern void puv3_ps2_init(void); | 21 | extern void puv3_ps2_init(void); |
19 | extern void pci_puv3_preinit(void); | 22 | extern void pci_puv3_preinit(void); |
diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c index b9a26465e728..2054f0d4db13 100644 --- a/arch/unicore32/kernel/traps.c +++ b/arch/unicore32/kernel/traps.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
27 | 27 | ||
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/system.h> | ||
30 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
31 | 30 | ||
32 | #include "setup.h" | 31 | #include "setup.h" |
diff --git a/arch/unicore32/mm/alignment.c b/arch/unicore32/mm/alignment.c index 28f576d733ee..de7dc5fdd58b 100644 --- a/arch/unicore32/mm/alignment.c +++ b/arch/unicore32/mm/alignment.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | #include <asm/unaligned.h> | 25 | #include <asm/unaligned.h> |
26 | 26 | ||
27 | #include "mm.h" | ||
28 | |||
27 | #define CODING_BITS(i) (i & 0xe0000120) | 29 | #define CODING_BITS(i) (i & 0xe0000120) |
28 | 30 | ||
29 | #define LDST_P_BIT(i) (i & (1 << 28)) /* Preindex */ | 31 | #define LDST_P_BIT(i) (i & (1 << 28)) /* Preindex */ |
diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index 283aa4b50b7a..2eeb9c04cab0 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/unicore32/mm/fault.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <asm/system.h> | ||
24 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
25 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
26 | 25 | ||
diff --git a/arch/unicore32/mm/flush.c b/arch/unicore32/mm/flush.c index 93478cc8b26d..6d4c096ffa2a 100644 --- a/arch/unicore32/mm/flush.c +++ b/arch/unicore32/mm/flush.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | 15 | ||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/system.h> | ||
18 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
19 | 18 | ||
20 | void flush_cache_mm(struct mm_struct *mm) | 19 | void flush_cache_mm(struct mm_struct *mm) |
diff --git a/arch/unicore32/mm/mm.h b/arch/unicore32/mm/mm.h index 3296bca0f1f7..05c7f532eee2 100644 --- a/arch/unicore32/mm/mm.h +++ b/arch/unicore32/mm/mm.h | |||
@@ -9,6 +9,8 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <asm/hwdef-copro.h> | ||
13 | |||
12 | /* the upper-most page table pointer */ | 14 | /* the upper-most page table pointer */ |
13 | extern pmd_t *top_pmd; | 15 | extern pmd_t *top_pmd; |
14 | extern int sysctl_overcommit_memory; | 16 | extern int sysctl_overcommit_memory; |
@@ -34,6 +36,9 @@ struct mem_type { | |||
34 | const struct mem_type *get_mem_type(unsigned int type); | 36 | const struct mem_type *get_mem_type(unsigned int type); |
35 | 37 | ||
36 | extern void __flush_dcache_page(struct address_space *, struct page *); | 38 | extern void __flush_dcache_page(struct address_space *, struct page *); |
39 | extern void hook_fault_code(int nr, int (*fn) | ||
40 | (unsigned long, unsigned int, struct pt_regs *), | ||
41 | int sig, int code, const char *name); | ||
37 | 42 | ||
38 | void __init bootmem_init(void); | 43 | void __init bootmem_init(void); |
39 | void uc32_mm_memblock_reserve(void); | 44 | void uc32_mm_memblock_reserve(void); |