aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-10-25 08:59:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-10-28 05:15:31 -0400
commitc97d4869a23c439d2bc23cb26c1147c099f9ff78 (patch)
treef49760ef0b4a183dcd17ad77b7059e3163ec37ca /arch/arm
parent858cbcdd4f7a235f609249b9ca681b7ec5d786a3 (diff)
[ARM] Fix SMP irqflags support
The IRQ changes a while back broke the build for SMP machines. Fix up the SMP code to use set_irq_regs/get_irq_regs as appropriate. Also, fix a warning in arch/arm/kernel/time.c where 'regs' becomes unused for SMP builds. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/smp.c20
-rw-r--r--arch/arm/kernel/time.c3
2 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 421329f5e18e..a07d202143c3 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -7,6 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/module.h>
10#include <linux/delay.h> 11#include <linux/delay.h>
11#include <linux/init.h> 12#include <linux/init.h>
12#include <linux/spinlock.h> 13#include <linux/spinlock.h>
@@ -19,6 +20,7 @@
19#include <linux/cpu.h> 20#include <linux/cpu.h>
20#include <linux/smp.h> 21#include <linux/smp.h>
21#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/irq.h>
22 24
23#include <asm/atomic.h> 25#include <asm/atomic.h>
24#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
@@ -474,25 +476,26 @@ void show_local_irqs(struct seq_file *p)
474 seq_putc(p, '\n'); 476 seq_putc(p, '\n');
475} 477}
476 478
477static void ipi_timer(struct pt_regs *regs) 479static void ipi_timer(void)
478{ 480{
479 int user = user_mode(regs);
480
481 irq_enter(); 481 irq_enter();
482 profile_tick(CPU_PROFILING, regs); 482 profile_tick(CPU_PROFILING);
483 update_process_times(user); 483 update_process_times(user_mode(get_irq_regs()));
484 irq_exit(); 484 irq_exit();
485} 485}
486 486
487#ifdef CONFIG_LOCAL_TIMERS 487#ifdef CONFIG_LOCAL_TIMERS
488asmlinkage void do_local_timer(struct pt_regs *regs) 488asmlinkage void do_local_timer(struct pt_regs *regs)
489{ 489{
490 struct pt_regs *old_regs = set_irq_regs(regs);
490 int cpu = smp_processor_id(); 491 int cpu = smp_processor_id();
491 492
492 if (local_timer_ack()) { 493 if (local_timer_ack()) {
493 irq_stat[cpu].local_timer_irqs++; 494 irq_stat[cpu].local_timer_irqs++;
494 ipi_timer(regs); 495 ipi_timer();
495 } 496 }
497
498 set_irq_regs(old_regs);
496} 499}
497#endif 500#endif
498 501
@@ -551,6 +554,7 @@ asmlinkage void do_IPI(struct pt_regs *regs)
551{ 554{
552 unsigned int cpu = smp_processor_id(); 555 unsigned int cpu = smp_processor_id();
553 struct ipi_data *ipi = &per_cpu(ipi_data, cpu); 556 struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
557 struct pt_regs *old_regs = set_irq_regs(regs);
554 558
555 ipi->ipi_count++; 559 ipi->ipi_count++;
556 560
@@ -574,7 +578,7 @@ asmlinkage void do_IPI(struct pt_regs *regs)
574 578
575 switch (nextmsg) { 579 switch (nextmsg) {
576 case IPI_TIMER: 580 case IPI_TIMER:
577 ipi_timer(regs); 581 ipi_timer();
578 break; 582 break;
579 583
580 case IPI_RESCHEDULE: 584 case IPI_RESCHEDULE:
@@ -599,6 +603,8 @@ asmlinkage void do_IPI(struct pt_regs *regs)
599 } 603 }
600 } while (msgs); 604 } while (msgs);
601 } 605 }
606
607 set_irq_regs(old_regs);
602} 608}
603 609
604void smp_send_reschedule(int cpu) 610void smp_send_reschedule(int cpu)
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index c03cab5c4c79..0c5a6091a93c 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -327,13 +327,12 @@ EXPORT_SYMBOL(restore_time_delta);
327 */ 327 */
328void timer_tick(void) 328void timer_tick(void)
329{ 329{
330 struct pt_regs *regs = get_irq_regs();
331 profile_tick(CPU_PROFILING); 330 profile_tick(CPU_PROFILING);
332 do_leds(); 331 do_leds();
333 do_set_rtc(); 332 do_set_rtc();
334 do_timer(1); 333 do_timer(1);
335#ifndef CONFIG_SMP 334#ifndef CONFIG_SMP
336 update_process_times(user_mode(regs)); 335 update_process_times(user_mode(get_irq_regs()));
337#endif 336#endif
338} 337}
339 338