diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-11-10 09:29:07 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-11-10 09:29:07 -0500 |
commit | 8a87a0b6313109d2fea87b1271d497c954ce2ca8 (patch) | |
tree | 1b7ae51ff681e27118590e9cab4bf0ce38f5d80e /arch/arm/kernel | |
parent | e6a04466ba965875a6132700fabb2f2c0249c41a (diff) | |
parent | 3b44f137b9a846c5452d9e6e1271b79b1dbcc942 (diff) |
Merge by hand (whitespace conflicts in libata.h)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/armksyms.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 7 | ||||
-rw-r--r-- | arch/arm/kernel/irq.c | 3 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 20 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 47 |
5 files changed, 67 insertions, 14 deletions
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 7b17a87a3311..7a3261f0bf79 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/in6.h> | 14 | #include <linux/in6.h> |
14 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |
@@ -126,6 +127,9 @@ EXPORT_SYMBOL(__put_user_2); | |||
126 | EXPORT_SYMBOL(__put_user_4); | 127 | EXPORT_SYMBOL(__put_user_4); |
127 | EXPORT_SYMBOL(__put_user_8); | 128 | EXPORT_SYMBOL(__put_user_8); |
128 | 129 | ||
130 | /* crypto hash */ | ||
131 | EXPORT_SYMBOL(sha_transform); | ||
132 | |||
129 | /* gcc lib functions */ | 133 | /* gcc lib functions */ |
130 | EXPORT_SYMBOL(__ashldi3); | 134 | EXPORT_SYMBOL(__ashldi3); |
131 | EXPORT_SYMBOL(__ashrdi3); | 135 | EXPORT_SYMBOL(__ashrdi3); |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index a511ec5b11a3..d9fb819bf7cc 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -47,6 +47,13 @@ | |||
47 | movne r0, sp | 47 | movne r0, sp |
48 | adrne lr, 1b | 48 | adrne lr, 1b |
49 | bne do_IPI | 49 | bne do_IPI |
50 | |||
51 | #ifdef CONFIG_LOCAL_TIMERS | ||
52 | test_for_ltirq r0, r6, r5, lr | ||
53 | movne r0, sp | ||
54 | adrne lr, 1b | ||
55 | bne do_local_timer | ||
56 | #endif | ||
50 | #endif | 57 | #endif |
51 | 58 | ||
52 | .endm | 59 | .endm |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 9def4404e1f2..d7099dbbb879 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -264,6 +264,7 @@ unlock: | |||
264 | #endif | 264 | #endif |
265 | #ifdef CONFIG_SMP | 265 | #ifdef CONFIG_SMP |
266 | show_ipi_list(p); | 266 | show_ipi_list(p); |
267 | show_local_irqs(p); | ||
267 | #endif | 268 | #endif |
268 | seq_printf(p, "Err: %10lu\n", irq_err_count); | 269 | seq_printf(p, "Err: %10lu\n", irq_err_count); |
269 | } | 270 | } |
@@ -995,7 +996,7 @@ void __init init_irq_proc(void) | |||
995 | struct proc_dir_entry *dir; | 996 | struct proc_dir_entry *dir; |
996 | int irq; | 997 | int irq; |
997 | 998 | ||
998 | dir = proc_mkdir("irq", 0); | 999 | dir = proc_mkdir("irq", NULL); |
999 | if (!dir) | 1000 | if (!dir) |
1000 | return; | 1001 | return; |
1001 | 1002 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index ba298277becd..30494aab829a 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -86,12 +86,16 @@ EXPORT_SYMBOL(pm_power_off); | |||
86 | */ | 86 | */ |
87 | void default_idle(void) | 87 | void default_idle(void) |
88 | { | 88 | { |
89 | local_irq_disable(); | 89 | if (hlt_counter) |
90 | if (!need_resched() && !hlt_counter) { | 90 | cpu_relax(); |
91 | timer_dyn_reprogram(); | 91 | else { |
92 | arch_idle(); | 92 | local_irq_disable(); |
93 | if (!need_resched()) { | ||
94 | timer_dyn_reprogram(); | ||
95 | arch_idle(); | ||
96 | } | ||
97 | local_irq_enable(); | ||
93 | } | 98 | } |
94 | local_irq_enable(); | ||
95 | } | 99 | } |
96 | 100 | ||
97 | /* | 101 | /* |
@@ -116,13 +120,13 @@ void cpu_idle(void) | |||
116 | 120 | ||
117 | if (!idle) | 121 | if (!idle) |
118 | idle = default_idle; | 122 | idle = default_idle; |
119 | preempt_disable(); | ||
120 | leds_event(led_idle_start); | 123 | leds_event(led_idle_start); |
121 | while (!need_resched()) | 124 | while (!need_resched()) |
122 | idle(); | 125 | idle(); |
123 | leds_event(led_idle_end); | 126 | leds_event(led_idle_end); |
124 | preempt_enable(); | 127 | preempt_enable_no_resched(); |
125 | schedule(); | 128 | schedule(); |
129 | preempt_disable(); | ||
126 | } | 130 | } |
127 | } | 131 | } |
128 | 132 | ||
@@ -355,7 +359,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, | |||
355 | struct thread_info *thread = p->thread_info; | 359 | struct thread_info *thread = p->thread_info; |
356 | struct pt_regs *childregs; | 360 | struct pt_regs *childregs; |
357 | 361 | ||
358 | childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1; | 362 | childregs = (void *)thread + THREAD_START_SP - sizeof(*regs); |
359 | *childregs = *regs; | 363 | *childregs = *regs; |
360 | childregs->ARM_r0 = 0; | 364 | childregs->ARM_r0 = 0; |
361 | childregs->ARM_sp = stack_start; | 365 | childregs->ARM_sp = stack_start; |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index edb5a406922f..e55ea952f7aa 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -142,7 +142,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
142 | ret = -EIO; | 142 | ret = -EIO; |
143 | } | 143 | } |
144 | 144 | ||
145 | secondary_data.stack = 0; | 145 | secondary_data.stack = NULL; |
146 | secondary_data.pgdir = 0; | 146 | secondary_data.pgdir = 0; |
147 | 147 | ||
148 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); | 148 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); |
@@ -185,6 +185,11 @@ int __cpuexit __cpu_disable(void) | |||
185 | migrate_irqs(); | 185 | migrate_irqs(); |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Stop the local timer for this CPU. | ||
189 | */ | ||
190 | local_timer_stop(cpu); | ||
191 | |||
192 | /* | ||
188 | * Flush user cache and TLB mappings, and then remove this CPU | 193 | * Flush user cache and TLB mappings, and then remove this CPU |
189 | * from the vm mask set of all processes. | 194 | * from the vm mask set of all processes. |
190 | */ | 195 | */ |
@@ -251,7 +256,9 @@ void __cpuexit cpu_die(void) | |||
251 | asmlinkage void __cpuinit secondary_start_kernel(void) | 256 | asmlinkage void __cpuinit secondary_start_kernel(void) |
252 | { | 257 | { |
253 | struct mm_struct *mm = &init_mm; | 258 | struct mm_struct *mm = &init_mm; |
254 | unsigned int cpu = smp_processor_id(); | 259 | unsigned int cpu; |
260 | |||
261 | cpu = smp_processor_id(); | ||
255 | 262 | ||
256 | printk("CPU%u: Booted secondary processor\n", cpu); | 263 | printk("CPU%u: Booted secondary processor\n", cpu); |
257 | 264 | ||
@@ -268,6 +275,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
268 | local_flush_tlb_all(); | 275 | local_flush_tlb_all(); |
269 | 276 | ||
270 | cpu_init(); | 277 | cpu_init(); |
278 | preempt_disable(); | ||
271 | 279 | ||
272 | /* | 280 | /* |
273 | * Give the platform a chance to do its own initialisation. | 281 | * Give the platform a chance to do its own initialisation. |
@@ -290,6 +298,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
290 | cpu_set(cpu, cpu_online_map); | 298 | cpu_set(cpu, cpu_online_map); |
291 | 299 | ||
292 | /* | 300 | /* |
301 | * Setup local timer for this CPU. | ||
302 | */ | ||
303 | local_timer_setup(cpu); | ||
304 | |||
305 | /* | ||
293 | * OK, it's off to the idle thread for us | 306 | * OK, it's off to the idle thread for us |
294 | */ | 307 | */ |
295 | cpu_idle(); | 308 | cpu_idle(); |
@@ -359,8 +372,8 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) | |||
359 | * You must not call this function with disabled interrupts, from a | 372 | * You must not call this function with disabled interrupts, from a |
360 | * hardware interrupt handler, nor from a bottom half handler. | 373 | * hardware interrupt handler, nor from a bottom half handler. |
361 | */ | 374 | */ |
362 | int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry, | 375 | static int smp_call_function_on_cpu(void (*func)(void *info), void *info, |
363 | int wait, cpumask_t callmap) | 376 | int retry, int wait, cpumask_t callmap) |
364 | { | 377 | { |
365 | struct smp_call_struct data; | 378 | struct smp_call_struct data; |
366 | unsigned long timeout; | 379 | unsigned long timeout; |
@@ -454,6 +467,18 @@ void show_ipi_list(struct seq_file *p) | |||
454 | seq_putc(p, '\n'); | 467 | seq_putc(p, '\n'); |
455 | } | 468 | } |
456 | 469 | ||
470 | void show_local_irqs(struct seq_file *p) | ||
471 | { | ||
472 | unsigned int cpu; | ||
473 | |||
474 | seq_printf(p, "LOC: "); | ||
475 | |||
476 | for_each_present_cpu(cpu) | ||
477 | seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs); | ||
478 | |||
479 | seq_putc(p, '\n'); | ||
480 | } | ||
481 | |||
457 | static void ipi_timer(struct pt_regs *regs) | 482 | static void ipi_timer(struct pt_regs *regs) |
458 | { | 483 | { |
459 | int user = user_mode(regs); | 484 | int user = user_mode(regs); |
@@ -464,6 +489,18 @@ static void ipi_timer(struct pt_regs *regs) | |||
464 | irq_exit(); | 489 | irq_exit(); |
465 | } | 490 | } |
466 | 491 | ||
492 | #ifdef CONFIG_LOCAL_TIMERS | ||
493 | asmlinkage void do_local_timer(struct pt_regs *regs) | ||
494 | { | ||
495 | int cpu = smp_processor_id(); | ||
496 | |||
497 | if (local_timer_ack()) { | ||
498 | irq_stat[cpu].local_timer_irqs++; | ||
499 | ipi_timer(regs); | ||
500 | } | ||
501 | } | ||
502 | #endif | ||
503 | |||
467 | /* | 504 | /* |
468 | * ipi_call_function - handle IPI from smp_call_function() | 505 | * ipi_call_function - handle IPI from smp_call_function() |
469 | * | 506 | * |
@@ -515,7 +552,7 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
515 | * | 552 | * |
516 | * Bit 0 - Inter-processor function call | 553 | * Bit 0 - Inter-processor function call |
517 | */ | 554 | */ |
518 | void do_IPI(struct pt_regs *regs) | 555 | asmlinkage void do_IPI(struct pt_regs *regs) |
519 | { | 556 | { |
520 | unsigned int cpu = smp_processor_id(); | 557 | unsigned int cpu = smp_processor_id(); |
521 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 558 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |