Merge branch 'misc' into devel
Russell King [Thu, 6 Jan 2011 22:32:52 +0000 (22:32 +0000)]
Conflicts:
arch/arm/Kconfig
arch/arm/common/Makefile
arch/arm/kernel/Makefile
arch/arm/kernel/smp.c

32 files changed:
1  2 
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/include/asm/system.h
arch/arm/include/asm/traps.h
arch/arm/kernel/Makefile
arch/arm/kernel/entry-armv.S
arch/arm/kernel/head.S
arch/arm/kernel/irq.c
arch/arm/kernel/smp.c
arch/arm/kernel/smp_twd.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/mach-bcmring/core.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-pxa/Kconfig
arch/arm/mach-realview/core.c
arch/arm/mach-realview/platsmp.c
arch/arm/mach-s3c2412/Kconfig
arch/arm/mach-s5pv310/include/mach/smp.h
arch/arm/mach-s5pv310/platsmp.c
arch/arm/mach-tegra/platsmp.c
arch/arm/mach-ux500/platsmp.c
arch/arm/mach-versatile/core.c
arch/arm/mach-vexpress/ct-ca9x4.c
arch/arm/mach-vexpress/platsmp.c
arch/arm/mach-vexpress/v2m.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/proc-macros.S
arch/arm/mm/proc-v7.S
arch/sh/Kconfig
arch/sh/kernel/cpu/sh4/clock-sh4-202.c
arch/sh/kernel/cpu/sh4a/clock-sh7724.c

@@@ -236,8 -235,7 +240,8 @@@ config ARCH_INTEGRATO
  config ARCH_REALVIEW
        bool "ARM Ltd. RealView family"
        select ARM_AMBA
-       select COMMON_CLKDEV
+       select CLKDEV_LOOKUP
 +      select HAVE_SCHED_CLOCK
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
@@@ -251,8 -249,7 +255,8 @@@ config ARCH_VERSATIL
        bool "ARM Ltd. Versatile family"
        select ARM_AMBA
        select ARM_VIC
-       select COMMON_CLKDEV
+       select CLKDEV_LOOKUP
 +      select HAVE_SCHED_CLOCK
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
@@@ -266,10 -263,9 +270,10 @@@ config ARCH_VEXPRES
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_AMBA
        select ARM_TIMER_SP804
-       select COMMON_CLKDEV
+       select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
 +      select HAVE_SCHED_CLOCK
        select ICST
        select PLAT_VERSATILE
        help
@@@ -441,7 -438,7 +446,8 @@@ config ARCH_IXP4X
        select CPU_XSCALE
        select GENERIC_GPIO
        select GENERIC_CLOCKEVENTS
 +      select HAVE_SCHED_CLOCK
+       select MIGHT_HAVE_PCI
        select DMABOUNCE if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
@@@ -515,9 -512,8 +521,9 @@@ config ARCH_MM
        bool "Marvell PXA168/910/MMP2"
        depends on MMU
        select ARCH_REQUIRE_GPIOLIB
-       select COMMON_CLKDEV
+       select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
 +      select HAVE_SCHED_CLOCK
        select TICK_ONESHOT
        select PLAT_PXA
        select SPARSE_IRQ
@@@ -570,12 -566,11 +576,12 @@@ config ARCH_NUC93
  
  config ARCH_TEGRA
        bool "NVIDIA Tegra"
++      select CLKDEV_LOOKUP
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
        select HAVE_CLK
 -      select CLKDEV_LOOKUP
 +      select HAVE_SCHED_CLOCK
-       select COMMON_CLKDEV
        select ARCH_HAS_BARRIERS if CACHE_L2X0
        select ARCH_HAS_CPUFREQ
        help
@@@ -595,10 -590,9 +601,10 @@@ config ARCH_PX
        depends on MMU
        select ARCH_MTD_XIP
        select ARCH_HAS_CPUFREQ
-       select COMMON_CLKDEV
+       select CLKDEV_LOOKUP
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 +      select HAVE_SCHED_CLOCK
        select TICK_ONESHOT
        select PLAT_PXA
        select SPARSE_IRQ
@@@ -1335,8 -1322,8 +1347,8 @@@ config H
        default 100
  
  config THUMB2_KERNEL
-       bool "Compile the kernel in Thumb-2 mode"
+       bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)"
 -      depends on CPU_V7 && EXPERIMENTAL
 +      depends on CPU_V7 && !CPU_V6 && EXPERIMENTAL
        select AEABI
        select ARM_ASM_UNIFIED
        help
Simple merge
Simple merge
Simple merge
@@@ -29,8 -29,7 +29,8 @@@ obj-$(CONFIG_MODULES)         += armksyms.o mo
  obj-$(CONFIG_ARTHUR)          += arthur.o
  obj-$(CONFIG_ISA_DMA)         += dma-isa.o
  obj-$(CONFIG_PCI)             += bios32.o isa.o
 +obj-$(CONFIG_HAVE_SCHED_CLOCK)        += sched_clock.o
- obj-$(CONFIG_SMP)             += smp.o
+ obj-$(CONFIG_SMP)             += smp.o smp_tlb.o
  obj-$(CONFIG_HAVE_ARM_SCU)    += smp_scu.o
  obj-$(CONFIG_HAVE_ARM_TWD)    += smp_twd.o
  obj-$(CONFIG_DYNAMIC_FTRACE)  += ftrace.o
Simple merge
@@@ -89,8 -88,12 +89,13 @@@ ENTRY(stext
        beq     __error_p                       @ yes, error 'p'
        bl      __lookup_machine_type           @ r5=machinfo
        movs    r8, r5                          @ invalid machine (r5=0)?
 + THUMB( it    eq )            @ force fixup-able long branch encoding
        beq     __error_a                       @ yes, error 'a'
+       /*
+        * r1 = machine no, r2 = atags,
+        * r8 = machinfo, r9 = cpuid, r10 = procinfo
+        */
        bl      __vet_atags
  #ifdef CONFIG_SMP_ON_UP
        bl      __fixup_smp
@@@ -408,18 -407,24 +413,25 @@@ __fixup_smp
  
  __fixup_smp_on_up:
        adr     r0, 1f
-       ldmia   r0, {r3, r6, r7}
+       ldmia   r0, {r3 - r5}
        sub     r3, r0, r3
-       add     r6, r6, r3
-       add     r7, r7, r3
- 2:    cmp     r6, r7
-       ldmia   r6!, {r0, r4}
-       strlo   r4, [r0, r3]
-       blo     2b
-       mov     pc, lr
+       add     r4, r4, r3
+       add     r5, r5, r3
+ 2:    cmp     r4, r5
+       movhs   pc, lr
+       ldmia   r4!, {r0, r6}
+  ARM( str     r6, [r0, r3]    )
+  THUMB(       add     r0, r0, r3      )
+ #ifdef __ARMEB__
+  THUMB(       mov     r6, r6, ror #16 )       @ Convert word order for big-endian.
+ #endif
+  THUMB(       strh    r6, [r0], #2    )       @ For Thumb-2, store as two halfwords
+  THUMB(       mov     r6, r6, lsr #16 )       @ to be robust against misaligned r3.
+  THUMB(       strh    r6, [r0]        )
+       b       2b
  ENDPROC(__fixup_smp)
  
 +      .align
  1:    .word   .
        .word   __smpalt_begin
        .word   __smpalt_end
  #include <linux/list.h>
  #include <linux/kallsyms.h>
  #include <linux/proc_fs.h>
 +#include <linux/ftrace.h>
  
  #include <asm/system.h>
+ #include <asm/mach/arch.h>
  #include <asm/mach/irq.h>
  #include <asm/mach/time.h>
  
@@@ -537,71 -582,44 +582,44 @@@ static void ipi_cpu_stop(unsigned int c
  
  /*
   * Main handler for inter-processor interrupts
-  *
-  * For ARM, the ipimask now only identifies a single
-  * category of IPI (Bit 1 IPIs have been replaced by a
-  * different mechanism):
-  *
-  *  Bit 0 - Inter-processor function call
   */
- asmlinkage void __exception_irq_entry do_IPI(struct pt_regs *regs)
 -asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs)
++asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
  {
        unsigned int cpu = smp_processor_id();
-       struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
        struct pt_regs *old_regs = set_irq_regs(regs);
  
-       ipi->ipi_count++;
-       for (;;) {
-               unsigned long msgs;
+       if (ipinr >= IPI_TIMER && ipinr < IPI_TIMER + NR_IPI)
+               __inc_irq_stat(cpu, ipi_irqs[ipinr - IPI_TIMER]);
  
-               spin_lock(&ipi->lock);
-               msgs = ipi->bits;
-               ipi->bits = 0;
-               spin_unlock(&ipi->lock);
-               if (!msgs)
-                       break;
-               do {
-                       unsigned nextmsg;
-                       nextmsg = msgs & -msgs;
-                       msgs &= ~nextmsg;
-                       nextmsg = ffz(~nextmsg);
-                       switch (nextmsg) {
-                       case IPI_TIMER:
-                               ipi_timer();
-                               break;
+       switch (ipinr) {
+       case IPI_TIMER:
+               ipi_timer();
+               break;
  
-                       case IPI_RESCHEDULE:
-                               /*
-                                * nothing more to do - eveything is
-                                * done on the interrupt return path
-                                */
-                               break;
+       case IPI_RESCHEDULE:
+               /*
+                * nothing more to do - eveything is
+                * done on the interrupt return path
+                */
+               break;
  
-                       case IPI_CALL_FUNC:
-                               generic_smp_call_function_interrupt();
-                               break;
+       case IPI_CALL_FUNC:
+               generic_smp_call_function_interrupt();
+               break;
  
-                       case IPI_CALL_FUNC_SINGLE:
-                               generic_smp_call_function_single_interrupt();
-                               break;
+       case IPI_CALL_FUNC_SINGLE:
+               generic_smp_call_function_single_interrupt();
+               break;
  
-                       case IPI_CPU_STOP:
-                               ipi_cpu_stop(cpu);
-                               break;
+       case IPI_CPU_STOP:
+               ipi_cpu_stop(cpu);
+               break;
  
-                       default:
-                               printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
-                                      cpu, nextmsg);
-                               break;
-                       }
-               } while (msgs);
+       default:
+               printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
+                      cpu, ipinr);
+               break;
        }
        set_irq_regs(old_regs);
  }
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
  
  #include <asm/hardware/gic.h>
  
- #include <mach/clkdev.h>
  #include <mach/platform.h>
  #include <mach/irqs.h>
 -#include <plat/timer-sp.h>
 +#include <asm/hardware/timer-sp.h>
  
 -#include "core.h"
 +#include <plat/sched_clock.h>
  
 -/* used by entry-macro.S and platsmp.c */
 -void __iomem *gic_cpu_base_addr;
 +#include "core.h"
  
  #ifdef CONFIG_ZONE_DMA
  /*
Simple merge
Simple merge
@@@ -7,8 -7,9 +7,7 @@@
  #define ASM_ARCH_SMP_H __FILE__
  
  #include <asm/hardware/gic.h>
- #include <asm/smp_mpidr.h>
  
 -extern void __iomem *gic_cpu_base_addr;
 -
  /*
   * We use IRQ1 as the IPI
   */
Simple merge
Simple merge
Simple merge
  #include <asm/mach/irq.h>
  #include <asm/mach/time.h>
  #include <asm/mach/map.h>
- #include <mach/clkdev.h>
  #include <mach/hardware.h>
  #include <mach/platform.h>
 -#include <plat/timer-sp.h>
 +#include <asm/hardware/timer-sp.h>
 +
 +#include <plat/sched_clock.h>
  
  #include "core.h"
  
  #include <asm/pmu.h>
  #include <asm/smp_twd.h>
  
- #include <mach/clkdev.h>
  #include <mach/ct-ca9x4.h>
  
 -#include <plat/timer-sp.h>
 +#include <asm/hardware/timer-sp.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
Simple merge
  #include <asm/mach/map.h>
  #include <asm/mach/time.h>
  #include <asm/hardware/arm_timer.h>
 +#include <asm/hardware/timer-sp.h>
  
- #include <mach/clkdev.h>
  #include <mach/motherboard.h>
  
 -#include <plat/timer-sp.h>
 +#include <plat/sched_clock.h>
  
  #include "core.h"
  
Simple merge
Simple merge
Simple merge
diff --cc arch/sh/Kconfig
Simple merge