diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-05-17 14:51:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-17 14:51:24 -0400 |
commit | 5dd8816aeb1f068ade0349a22009ff7a66f25413 (patch) | |
tree | c56ff327b1dfa8868b4208aea9ac4158e3bfe308 /arch/arm/kernel | |
parent | f03cc4fd927357bd4b3cea1a053b9f9d8f1731cc (diff) | |
parent | 0c056c50a6218e0e577817c16ba8851af593d742 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 8 | ||||
-rw-r--r-- | arch/arm/kernel/dma-isa.c | 23 | ||||
-rw-r--r-- | arch/arm/kernel/head-nommu.S | 4 | ||||
-rw-r--r-- | arch/arm/kernel/head.S | 8 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 37 |
5 files changed, 51 insertions, 29 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index b324dcac1c56..396efba9bacd 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -95,5 +95,13 @@ int main(void) | |||
95 | DEFINE(SYS_ERROR0, 0x9f0000); | 95 | DEFINE(SYS_ERROR0, 0x9f0000); |
96 | BLANK(); | 96 | BLANK(); |
97 | DEFINE(SIZEOF_MACHINE_DESC, sizeof(struct machine_desc)); | 97 | DEFINE(SIZEOF_MACHINE_DESC, sizeof(struct machine_desc)); |
98 | DEFINE(MACHINFO_TYPE, offsetof(struct machine_desc, nr)); | ||
99 | DEFINE(MACHINFO_NAME, offsetof(struct machine_desc, name)); | ||
100 | DEFINE(MACHINFO_PHYSIO, offsetof(struct machine_desc, phys_io)); | ||
101 | DEFINE(MACHINFO_PGOFFIO, offsetof(struct machine_desc, io_pg_offst)); | ||
102 | BLANK(); | ||
103 | DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list)); | ||
104 | DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); | ||
105 | DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags)); | ||
98 | return 0; | 106 | return 0; |
99 | } | 107 | } |
diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c index 03532769a97f..0a3e9ad297d8 100644 --- a/arch/arm/kernel/dma-isa.c +++ b/arch/arm/kernel/dma-isa.c | |||
@@ -143,12 +143,23 @@ static struct dma_ops isa_dma_ops = { | |||
143 | .residue = isa_get_dma_residue, | 143 | .residue = isa_get_dma_residue, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct resource dma_resources[] = { | 146 | static struct resource dma_resources[] = { { |
147 | { "dma1", 0x0000, 0x000f }, | 147 | .name = "dma1", |
148 | { "dma low page", 0x0080, 0x008f }, | 148 | .start = 0x0000, |
149 | { "dma2", 0x00c0, 0x00df }, | 149 | .end = 0x000f |
150 | { "dma high page", 0x0480, 0x048f } | 150 | }, { |
151 | }; | 151 | .name = "dma low page", |
152 | .start = 0x0080, | ||
153 | .end = 0x008f | ||
154 | }, { | ||
155 | .name = "dma2", | ||
156 | .start = 0x00c0, | ||
157 | .end = 0x00df | ||
158 | }, { | ||
159 | .name = "dma high page", | ||
160 | .start = 0x0480, | ||
161 | .end = 0x048f | ||
162 | } }; | ||
152 | 163 | ||
153 | void __init isa_init_dma(dma_t *dma) | 164 | void __init isa_init_dma(dma_t *dma) |
154 | { | 165 | { |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 0bea65864051..adf62e5eaad7 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -20,12 +20,10 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/procinfo.h> | 21 | #include <asm/procinfo.h> |
22 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
23 | #include <asm/asm-offsets.h> | ||
23 | #include <asm/thread_info.h> | 24 | #include <asm/thread_info.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | 26 | ||
26 | #define PROCINFO_INITFUNC 12 | ||
27 | #define MACHINFO_TYPE 0 | ||
28 | |||
29 | /* | 27 | /* |
30 | * Kernel startup entry point. | 28 | * Kernel startup entry point. |
31 | * --------------------------- | 29 | * --------------------------- |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 04b66a9328ef..04f7344e356a 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -24,14 +24,6 @@ | |||
24 | #include <asm/thread_info.h> | 24 | #include <asm/thread_info.h> |
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | 26 | ||
27 | #define PROCINFO_MMUFLAGS 8 | ||
28 | #define PROCINFO_INITFUNC 12 | ||
29 | |||
30 | #define MACHINFO_TYPE 0 | ||
31 | #define MACHINFO_PHYSIO 4 | ||
32 | #define MACHINFO_PGOFFIO 8 | ||
33 | #define MACHINFO_NAME 12 | ||
34 | |||
35 | #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) | 27 | #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) |
36 | 28 | ||
37 | /* | 29 | /* |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 1ff75cee4b0d..7df6e1aaa323 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -264,8 +264,12 @@ void show_fpregs(struct user_fp *regs) | |||
264 | /* | 264 | /* |
265 | * Task structure and kernel stack allocation. | 265 | * Task structure and kernel stack allocation. |
266 | */ | 266 | */ |
267 | static unsigned long *thread_info_head; | 267 | struct thread_info_list { |
268 | static unsigned int nr_thread_info; | 268 | unsigned long *head; |
269 | unsigned int nr; | ||
270 | }; | ||
271 | |||
272 | static DEFINE_PER_CPU(struct thread_info_list, thread_info_list) = { NULL, 0 }; | ||
269 | 273 | ||
270 | #define EXTRA_TASK_STRUCT 4 | 274 | #define EXTRA_TASK_STRUCT 4 |
271 | 275 | ||
@@ -274,12 +278,15 @@ struct thread_info *alloc_thread_info(struct task_struct *task) | |||
274 | struct thread_info *thread = NULL; | 278 | struct thread_info *thread = NULL; |
275 | 279 | ||
276 | if (EXTRA_TASK_STRUCT) { | 280 | if (EXTRA_TASK_STRUCT) { |
277 | unsigned long *p = thread_info_head; | 281 | struct thread_info_list *th = &get_cpu_var(thread_info_list); |
282 | unsigned long *p = th->head; | ||
278 | 283 | ||
279 | if (p) { | 284 | if (p) { |
280 | thread_info_head = (unsigned long *)p[0]; | 285 | th->head = (unsigned long *)p[0]; |
281 | nr_thread_info -= 1; | 286 | th->nr -= 1; |
282 | } | 287 | } |
288 | put_cpu_var(thread_info_list); | ||
289 | |||
283 | thread = (struct thread_info *)p; | 290 | thread = (struct thread_info *)p; |
284 | } | 291 | } |
285 | 292 | ||
@@ -300,13 +307,19 @@ struct thread_info *alloc_thread_info(struct task_struct *task) | |||
300 | 307 | ||
301 | void free_thread_info(struct thread_info *thread) | 308 | void free_thread_info(struct thread_info *thread) |
302 | { | 309 | { |
303 | if (EXTRA_TASK_STRUCT && nr_thread_info < EXTRA_TASK_STRUCT) { | 310 | if (EXTRA_TASK_STRUCT) { |
304 | unsigned long *p = (unsigned long *)thread; | 311 | struct thread_info_list *th = &get_cpu_var(thread_info_list); |
305 | p[0] = (unsigned long)thread_info_head; | 312 | if (th->nr < EXTRA_TASK_STRUCT) { |
306 | thread_info_head = p; | 313 | unsigned long *p = (unsigned long *)thread; |
307 | nr_thread_info += 1; | 314 | p[0] = (unsigned long)th->head; |
308 | } else | 315 | th->head = p; |
309 | free_pages((unsigned long)thread, THREAD_SIZE_ORDER); | 316 | th->nr += 1; |
317 | put_cpu_var(thread_info_list); | ||
318 | return; | ||
319 | } | ||
320 | put_cpu_var(thread_info_list); | ||
321 | } | ||
322 | free_pages((unsigned long)thread, THREAD_SIZE_ORDER); | ||
310 | } | 323 | } |
311 | 324 | ||
312 | /* | 325 | /* |