[PATCH] ARM SMP: Add basic support Integrator/CP platform
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 18 Jun 2005 09:15:46 +0000 (10:15 +0100)
committerRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 18 Jun 2005 09:15:46 +0000 (10:15 +0100)
Add basic SMP support for the Integrator/CP platform.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-integrator/Makefile
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/leds.c

index 158daaf9e3b03ec1eb8a53aba1b2c73bc57776ec..ebb255bdce8aa7ed6c85f25b95a639e30b6e551c 100644 (file)
@@ -12,3 +12,4 @@ obj-$(CONFIG_LEDS)                    += leds.o
 obj-$(CONFIG_PCI)                      += pci_v3.o pci.o
 obj-$(CONFIG_CPU_FREQ_INTEGRATOR)      += cpu.o
 obj-$(CONFIG_INTEGRATOR_IMPD1)         += impd1.o
+obj-$(CONFIG_SMP)                      += platsmp.o headsmp.o
index bd17b5154311f4a1a8540f0dc105ba9996eec862..d302f0405fd2fa3be49a4692fcc9af4a354946e1 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 #include <linux/sched.h>
+#include <linux/smp.h>
 
 #include <asm/hardware.h>
 #include <asm/irq.h>
@@ -221,7 +222,24 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
         */
        timer1->TimerClear = 1;
 
-       timer_tick(regs);
+       /*
+        * the clock tick routines are only processed on the
+        * primary CPU
+        */
+       if (hard_smp_processor_id() == 0) {
+               nmi_tick();
+               timer_tick(regs);
+#ifdef CONFIG_SMP
+               smp_send_timer();
+#endif
+       }
+
+#ifdef CONFIG_SMP
+       /*
+        * this is the ARM equivalent of the APIC timer interrupt
+        */
+       update_process_times(user_mode(regs));
+#endif /* CONFIG_SMP */
 
        write_sequnlock(&xtime_lock);
 
index d2c0ab21150c1cbedd3397d4b3b9854b258f2aaf..f1436e683b493f380b73814e433f5460ac1bea0f 100644 (file)
@@ -22,6 +22,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/spinlock.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
@@ -85,4 +87,4 @@ static int __init leds_init(void)
        return 0;
 }
 
-__initcall(leds_init);
+core_initcall(leds_init);