Merge branches 'fiq' (early part), 'fixes', 'l2c' (early part) and 'misc' into for...
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 2 Oct 2014 20:47:02 +0000 (21:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 2 Oct 2014 20:47:02 +0000 (21:47 +0100)
41 files changed:
arch/arm/Makefile
arch/arm/boot/bootp/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/configs/ep93xx_defconfig
arch/arm/configs/versatile_defconfig
arch/arm/crypto/sha1-armv7-neon.S
arch/arm/include/asm/cacheflush.h
arch/arm/include/asm/ftrace.h
arch/arm/include/asm/smp.h
arch/arm/include/asm/syscall.h
arch/arm/include/asm/tls.h
arch/arm/kernel/atags_parse.c
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S
arch/arm/kernel/fiq.c
arch/arm/kernel/hw_breakpoint.c
arch/arm/kernel/irq.c
arch/arm/kernel/kprobes-test.c
arch/arm/kernel/kprobes-test.h
arch/arm/kernel/perf_event_cpu.c
arch/arm/kernel/process.c
arch/arm/kernel/return_address.c
arch/arm/kernel/setup.c
arch/arm/kernel/smp.c
arch/arm/kernel/traps.c
arch/arm/kernel/unwind.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/mach-sa1100/Kconfig
arch/arm/mach-sa1100/h3xxx.c
arch/arm/mm/alignment.c
arch/arm/mm/idmap.c
arch/arm/mm/init.c
arch/arm/mm/mmu.c
arch/arm/mm/proc-v7-3level.S
arch/arm/mm/proc-v7.S
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/init.c
crypto/Kconfig
include/asm-generic/vmlinux.lds.h
kernel/gcov/Kconfig

index 0ce9d0f71f2a318c240e60ab019d155dc94e6925..12bfc1fa51f009f3a59536545f38b560b5b3f48e 100644 (file)
@@ -157,6 +157,7 @@ machine-$(CONFIG_ARCH_EBSA110)              += ebsa110
 machine-$(CONFIG_ARCH_EFM32)           += efm32
 machine-$(CONFIG_ARCH_EP93XX)          += ep93xx
 machine-$(CONFIG_ARCH_EXYNOS)          += exynos
+machine-$(CONFIG_ARCH_FOOTBRIDGE)      += footbridge
 machine-$(CONFIG_ARCH_GEMINI)          += gemini
 machine-$(CONFIG_ARCH_HIGHBANK)                += highbank
 machine-$(CONFIG_ARCH_HISI)            += hisi
@@ -205,7 +206,6 @@ machine-$(CONFIG_ARCH_VEXPRESS)             += vexpress
 machine-$(CONFIG_ARCH_VT8500)          += vt8500
 machine-$(CONFIG_ARCH_W90X900)         += w90x900
 machine-$(CONFIG_ARCH_ZYNQ)            += zynq
-machine-$(CONFIG_FOOTBRIDGE)           += footbridge
 machine-$(CONFIG_PLAT_SPEAR)           += spear
 
 # Platform directory name.  This list is sorted alphanumerically
index c394e305447c504ed3884a6e894c35afad48eb42..5761f0039133ff33dc8bd96a61e2d2c355f59682 100644 (file)
@@ -5,6 +5,8 @@
 # architecture-specific flags and dependencies.
 #
 
+GCOV_PROFILE   := n
+
 LDFLAGS_bootp  :=-p --no-undefined -X \
                 --defsym initrd_phys=$(INITRD_PHYS) \
                 --defsym params_phys=$(PARAMS_PHYS) -T
index 76a50ecae1c3b592cc120f9fb8b463299926deab..3ea230aa94b7e061f53b2b4cea9f867bb6c6aa17 100644 (file)
@@ -37,6 +37,8 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y)
 OBJS           += hyp-stub.o
 endif
 
+GCOV_PROFILE           := n
+
 #
 # Architecture dependencies
 #
index 1b650c85bdd082320986e19c8458790db6abb612..72233b9c9d07a36bf08d815aedf4d4a867d9152a 100644 (file)
@@ -107,5 +107,6 @@ CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_LIBCRC32C=y
index d52b4ffe2012ccdcf9c54b728113f49b1a1e05d2..ea49d37564daa18348de2c0afbcbc5f643ae9917 100644 (file)
@@ -82,5 +82,6 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_PL01X=y
 CONFIG_FONTS=y
 CONFIG_FONT_ACORN_8x8=y
index 50013c0e2864d8a24ca7efc6a8da3f1e8b37f9c6..dcd01f3f0bb00e987fdc18ab78449679dfd9f724 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/linkage.h>
-
+#include <asm/assembler.h>
 
 .syntax unified
 .code   32
 #define RT3 r12
 
 #define W0 q0
-#define W1 q1
+#define W1 q7
 #define W2 q2
 #define W3 q3
 #define W4 q4
-#define W5 q5
-#define W6 q6
-#define W7 q7
+#define W5 q6
+#define W6 q5
+#define W7 q1
 
 #define tmp0 q8
 #define tmp1 q9
 #define qK3 q14
 #define qK4 q15
 
+#ifdef CONFIG_CPU_BIG_ENDIAN
+#define ARM_LE(code...)
+#else
+#define ARM_LE(code...)                code
+#endif
 
 /* Round function macros. */
 
 #define W_PRECALC_00_15() \
        add       RWK, sp, #(WK_offs(0));                       \
        \
-       vld1.32   {tmp0, tmp1}, [RDATA]!;                       \
      vrev32.8  W0, tmp0;             /* big => little */     \
-       vld1.32   {tmp2, tmp3}, [RDATA]!;                       \
+       vld1.32   {W0, W7}, [RDATA]!;                           \
ARM_LE(vrev32.8  W0, W0;      )       /* big => little */     \
+       vld1.32   {W6, W5}, [RDATA]!;                           \
        vadd.u32  tmp0, W0, curK;                               \
      vrev32.8  W7, tmp1;             /* big => little */     \
      vrev32.8  W6, tmp2;             /* big => little */     \
ARM_LE(vrev32.8  W7, W7;      )       /* big => little */     \
ARM_LE(vrev32.8  W6, W6;      )       /* big => little */     \
        vadd.u32  tmp1, W7, curK;                               \
      vrev32.8  W5, tmp3;             /* big => little */     \
ARM_LE(vrev32.8  W5, W5;      )       /* big => little */     \
        vadd.u32  tmp2, W6, curK;                               \
        vst1.32   {tmp0, tmp1}, [RWK]!;                         \
        vadd.u32  tmp3, W5, curK;                               \
        vst1.32   {tmp2, tmp3}, [RWK];                          \
 
 #define WPRECALC_00_15_0(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
-       vld1.32   {tmp0, tmp1}, [RDATA]!;                       \
+       vld1.32   {W0, W7}, [RDATA]!;                           \
 
 #define WPRECALC_00_15_1(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
        add       RWK, sp, #(WK_offs(0));                       \
 
 #define WPRECALC_00_15_2(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
      vrev32.8  W0, tmp0;             /* big => little */     \
ARM_LE(vrev32.8  W0, W0;      )       /* big => little */     \
 
 #define WPRECALC_00_15_3(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
-       vld1.32   {tmp2, tmp3}, [RDATA]!;                       \
+       vld1.32   {W6, W5}, [RDATA]!;                           \
 
 #define WPRECALC_00_15_4(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
        vadd.u32  tmp0, W0, curK;                               \
 
 #define WPRECALC_00_15_5(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
      vrev32.8  W7, tmp1;             /* big => little */     \
ARM_LE(vrev32.8  W7, W7;      )       /* big => little */     \
 
 #define WPRECALC_00_15_6(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
      vrev32.8  W6, tmp2;             /* big => little */     \
ARM_LE(vrev32.8  W6, W6;      )       /* big => little */     \
 
 #define WPRECALC_00_15_7(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
        vadd.u32  tmp1, W7, curK;                               \
 
 #define WPRECALC_00_15_8(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
      vrev32.8  W5, tmp3;             /* big => little */     \
ARM_LE(vrev32.8  W5, W5;      )       /* big => little */     \
 
 #define WPRECALC_00_15_9(i,W,W_m04,W_m08,W_m12,W_m16,W_m20,W_m24,W_m28) \
        vadd.u32  tmp2, W6, curK;                               \
index 79ecb4f34ffb34f25037f829a6227ea69b7a9fc8..10e78d00a0bb348a8e77aa8f04b484a6b2195bfd 100644 (file)
@@ -466,6 +466,7 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size)
  */
 #define v7_exit_coherency_flush(level) \
        asm volatile( \
+       ".arch  armv7-a \n\t" \
        "stmfd  sp!, {fp, ip} \n\t" \
        "mrc    p15, 0, r0, c1, c0, 0   @ get SCTLR \n\t" \
        "bic    r0, r0, #"__stringify(CR_C)" \n\t" \
index 39eb16b0066f2e4acb7464f1a3766fba9c7ddeeb..bfe2a2f5a644e80a9f80f71b49d727604c41e728 100644 (file)
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
 
 #else
 
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
 {
        return NULL;
 }
index 2ec765c39ab4f25340b6b4f06b0325fc31d8ad75..18f5a554134fe88174e99c0e5dd6de473e91e200 100644 (file)
@@ -48,12 +48,6 @@ extern void smp_init_cpus(void);
  */
 extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
 
-/*
- * Boot a secondary CPU, and assign it the specified idle task.
- * This also gives us the initial stack to use for this CPU.
- */
-extern int boot_secondary(unsigned int cpu, struct task_struct *);
-
 /*
  * Called from platform specific assembly code, this is the
  * secondary CPU entry point.
index 4651f6999b7de9351de6259ab5b184a1898b32c1..e86c985b8c7ac3e564239457134e18574870d701 100644 (file)
@@ -63,8 +63,8 @@ static inline void syscall_get_arguments(struct task_struct *task,
        if (i + n > SYSCALL_MAX_ARGS) {
                unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i;
                unsigned int n_bad = n + i - SYSCALL_MAX_ARGS;
-               pr_warning("%s called with max args %d, handling only %d\n",
-                          __func__, i + n, SYSCALL_MAX_ARGS);
+               pr_warn("%s called with max args %d, handling only %d\n",
+                       __func__, i + n, SYSCALL_MAX_ARGS);
                memset(args_bad, 0, n_bad * sizeof(args[0]));
                n = SYSCALL_MAX_ARGS - i;
        }
@@ -88,8 +88,8 @@ static inline void syscall_set_arguments(struct task_struct *task,
                return;
 
        if (i + n > SYSCALL_MAX_ARGS) {
-               pr_warning("%s called with max args %d, handling only %d\n",
-                          __func__, i + n, SYSCALL_MAX_ARGS);
+               pr_warn("%s called with max args %d, handling only %d\n",
+                       __func__, i + n, SYSCALL_MAX_ARGS);
                n = SYSCALL_MAX_ARGS - i;
        }
 
index 36172adda9d0a9314473b00b8f01126a714a8b5b..5f833f7adba1abdc8620a11020cb2c80dec24d26 100644 (file)
@@ -81,6 +81,7 @@ static inline void set_tls(unsigned long val)
                        asm("mcr p15, 0, %0, c13, c0, 3"
                            : : "r" (val));
                } else {
+#ifdef CONFIG_KUSER_HELPERS
                        /*
                         * User space must never try to access this
                         * directly.  Expect your app to break
@@ -89,6 +90,7 @@ static inline void set_tls(unsigned long val)
                         * entry-armv.S for details)
                         */
                        *((unsigned int *)0xffff0ff0) = val;
+#endif
                }
 
        }
index 7807ef58a2abb88be8e452a47d2e4586168f63c2..528f8af2addb2a194de2d578032db1781a69dc7c 100644 (file)
@@ -130,7 +130,7 @@ static int __init parse_tag_cmdline(const struct tag *tag)
        strlcat(default_command_line, tag->u.cmdline.cmdline,
                COMMAND_LINE_SIZE);
 #elif defined(CONFIG_CMDLINE_FORCE)
-       pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");
+       pr_warn("Ignoring tag cmdline (using the default kernel command line)\n");
 #else
        strlcpy(default_command_line, tag->u.cmdline.cmdline,
                COMMAND_LINE_SIZE);
index 36276cdccfbc71e9e69de18fe21a00ac25ddbd07..2f5555d307b345b7e0191adb7d7f02fe49ab887b 100644 (file)
@@ -146,7 +146,7 @@ ENDPROC(__und_invalid)
 #define SPFIX(code...)
 #endif
 
-       .macro  svc_entry, stack_hole=0
+       .macro  svc_entry, stack_hole=0, trace=1
  UNWIND(.fnstart               )
  UNWIND(.save {r0 - pc}                )
        sub     sp, sp, #(S_FRAME_SIZE + \stack_hole - 4)
@@ -182,9 +182,11 @@ ENDPROC(__und_invalid)
        @
        stmia   r7, {r2 - r6}
 
+       .if \trace
 #ifdef CONFIG_TRACE_IRQFLAGS
        bl      trace_hardirqs_off
 #endif
+       .endif
        .endm
 
        .align  5
@@ -294,6 +296,15 @@ __pabt_svc:
  UNWIND(.fnend         )
 ENDPROC(__pabt_svc)
 
+       .align  5
+__fiq_svc:
+       svc_entry trace=0
+       mov     r0, sp                          @ struct pt_regs *regs
+       bl      handle_fiq_as_nmi
+       svc_exit_via_fiq
+ UNWIND(.fnend         )
+ENDPROC(__fiq_svc)
+
        .align  5
 .LCcralign:
        .word   cr_alignment
@@ -304,6 +315,46 @@ ENDPROC(__pabt_svc)
 .LCfp:
        .word   fp_enter
 
+/*
+ * Abort mode handlers
+ */
+
+@
+@ Taking a FIQ in abort mode is similar to taking a FIQ in SVC mode
+@ and reuses the same macros. However in abort mode we must also
+@ save/restore lr_abt and spsr_abt to make nested aborts safe.
+@
+       .align 5
+__fiq_abt:
+       svc_entry trace=0
+
+ ARM(  msr     cpsr_c, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( mov    r0, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( msr    cpsr_c, r0 )
+       mov     r1, lr          @ Save lr_abt
+       mrs     r2, spsr        @ Save spsr_abt, abort is now safe
+ ARM(  msr     cpsr_c, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( mov    r0, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( msr    cpsr_c, r0 )
+       stmfd   sp!, {r1 - r2}
+
+       add     r0, sp, #8                      @ struct pt_regs *regs
+       bl      handle_fiq_as_nmi
+
+       ldmfd   sp!, {r1 - r2}
+ ARM(  msr     cpsr_c, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( mov    r0, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( msr    cpsr_c, r0 )
+       mov     lr, r1          @ Restore lr_abt, abort is unsafe
+       msr     spsr_cxsf, r2   @ Restore spsr_abt
+ ARM(  msr     cpsr_c, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( mov    r0, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
+ THUMB( msr    cpsr_c, r0 )
+
+       svc_exit_via_fiq
+ UNWIND(.fnend         )
+ENDPROC(__fiq_abt)
+
 /*
  * User mode handlers
  *
@@ -314,13 +365,16 @@ ENDPROC(__pabt_svc)
 #error "sizeof(struct pt_regs) must be a multiple of 8"
 #endif
 
-       .macro  usr_entry
+       .macro  usr_entry, trace=1
  UNWIND(.fnstart       )
  UNWIND(.cantunwind    )       @ don't unwind the user space
        sub     sp, sp, #S_FRAME_SIZE
  ARM(  stmib   sp, {r1 - r12}  )
  THUMB(        stmia   sp, {r0 - r12}  )
 
+ ATRAP(        mrc     p15, 0, r7, c1, c0, 0)
+ ATRAP(        ldr     r8, .LCcralign)
+
        ldmia   r0, {r3 - r5}
        add     r0, sp, #S_PC           @ here for interlock avoidance
        mov     r6, #-1                 @  ""  ""     ""        ""
@@ -328,6 +382,8 @@ ENDPROC(__pabt_svc)
        str     r3, [sp]                @ save the "real" r0 copied
                                        @ from the exception stack
 
+ ATRAP(        ldr     r8, [r8, #0])
+
        @
        @ We are now ready to fill in the remaining blanks on the stack:
        @
@@ -341,20 +397,21 @@ ENDPROC(__pabt_svc)
  ARM(  stmdb   r0, {sp, lr}^                   )
  THUMB(        store_user_sp_lr r0, r1, S_SP - S_PC    )
 
-       @
        @ Enable the alignment trap while in kernel mode
-       @
-       alignment_trap r0, .LCcralign
+ ATRAP(        teq     r8, r7)
+ ATRAP( mcrne  p15, 0, r8, c1, c0, 0)
 
        @
        @ Clear FP to mark the first stack frame
        @
        zero_fp
 
+       .if     \trace
 #ifdef CONFIG_IRQSOFF_TRACER
        bl      trace_hardirqs_off
 #endif
        ct_user_exit save = 0
+       .endif
        .endm
 
        .macro  kuser_cmpxchg_check
@@ -683,6 +740,17 @@ ENTRY(ret_from_exception)
 ENDPROC(__pabt_usr)
 ENDPROC(ret_from_exception)
 
+       .align  5
+__fiq_usr:
+       usr_entry trace=0
+       kuser_cmpxchg_check
+       mov     r0, sp                          @ struct pt_regs *regs
+       bl      handle_fiq_as_nmi
+       get_thread_info tsk
+       restore_user_regs fast = 0, offset = 0
+ UNWIND(.fnend         )
+ENDPROC(__fiq_usr)
+
 /*
  * Register switch for ARMv3 and ARMv4 processors
  * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
@@ -1118,17 +1186,29 @@ vector_addrexcptn:
        b       vector_addrexcptn
 
 /*=============================================================================
- * Undefined FIQs
+ * FIQ "NMI" handler
  *-----------------------------------------------------------------------------
- * Enter in FIQ mode, spsr = ANY CPSR, lr = ANY PC
- * MUST PRESERVE SVC SPSR, but need to switch to SVC mode to show our msg.
- * Basically to switch modes, we *HAVE* to clobber one register...  brain
- * damage alert!  I don't think that we can execute any code in here in any
- * other mode than FIQ...  Ok you can switch to another mode, but you can't
- * get out of that mode without clobbering one register.
+ * Handle a FIQ using the SVC stack allowing FIQ act like NMI on x86
+ * systems.
  */
-vector_fiq:
-       subs    pc, lr, #4
+       vector_stub     fiq, FIQ_MODE, 4
+
+       .long   __fiq_usr                       @  0  (USR_26 / USR_32)
+       .long   __fiq_svc                       @  1  (FIQ_26 / FIQ_32)
+       .long   __fiq_svc                       @  2  (IRQ_26 / IRQ_32)
+       .long   __fiq_svc                       @  3  (SVC_26 / SVC_32)
+       .long   __fiq_svc                       @  4
+       .long   __fiq_svc                       @  5
+       .long   __fiq_svc                       @  6
+       .long   __fiq_abt                       @  7
+       .long   __fiq_svc                       @  8
+       .long   __fiq_svc                       @  9
+       .long   __fiq_svc                       @  a
+       .long   __fiq_svc                       @  b
+       .long   __fiq_svc                       @  c
+       .long   __fiq_svc                       @  d
+       .long   __fiq_svc                       @  e
+       .long   __fiq_svc                       @  f
 
        .globl  vector_fiq_offset
        .equ    vector_fiq_offset, vector_fiq
index e52fe5a2d8439e36dc2e75bc3f5eb1a6df5ec752..6bb09d4abdea6356a575de475e0809765c3ee19e 100644 (file)
@@ -366,7 +366,7 @@ ENTRY(vector_swi)
        str     r0, [sp, #S_OLD_R0]             @ Save OLD_R0
 #endif
        zero_fp
-       alignment_trap ip, __cr_alignment
+       alignment_trap r10, ip, __cr_alignment
        enable_irq
        ct_user_exit
        get_thread_info tsk
index 2fdf8679b46e19d1d9e9b0b9c3d196b7c0edbccb..4176df721bf09bace95bad96d1c194e5b6b7a038 100644 (file)
 #endif
        .endm
 
-       .macro  alignment_trap, rtemp, label
 #ifdef CONFIG_ALIGNMENT_TRAP
-       ldr     \rtemp, \label
-       ldr     \rtemp, [\rtemp]
-       mcr     p15, 0, \rtemp, c1, c0
+#define ATRAP(x...) x
+#else
+#define ATRAP(x...)
+#endif
+
+       .macro  alignment_trap, rtmp1, rtmp2, label
+#ifdef CONFIG_ALIGNMENT_TRAP
+       mrc     p15, 0, \rtmp2, c1, c0, 0
+       ldr     \rtmp1, \label
+       ldr     \rtmp1, [\rtmp1]
+       teq     \rtmp1, \rtmp2
+       mcrne   p15, 0, \rtmp1, c1, c0, 0
 #endif
        .endm
 
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
        .endm
 
+       @
+       @ svc_exit_via_fiq - like svc_exit but switches to FIQ mode before exit
+       @
+       @ This macro acts in a similar manner to svc_exit but switches to FIQ
+       @ mode to restore the final part of the register state.
+       @
+       @ We cannot use the normal svc_exit procedure because that would
+       @ clobber spsr_svc (FIQ could be delivered during the first few
+       @ instructions of vector_swi meaning its contents have not been
+       @ saved anywhere).
+       @
+       @ Note that, unlike svc_exit, this macro also does not allow a caller
+       @ supplied rpsr. This is because the FIQ exceptions are not re-entrant
+       @ and the handlers cannot call into the scheduler (meaning the value
+       @ on the stack remains correct).
+       @
+       .macro  svc_exit_via_fiq
+       mov     r0, sp
+       ldmib   r0, {r1 - r14}  @ abort is deadly from here onward (it will
+                               @ clobber state restored below)
+       msr     cpsr_c, #FIQ_MODE | PSR_I_BIT | PSR_F_BIT
+       add     r8, r0, #S_PC
+       ldr     r9, [r0, #S_PSR]
+       msr     spsr_cxsf, r9
+       ldr     r0, [r0, #S_R0]
+       ldmia   r8, {pc}^
+       .endm
+
        .macro  restore_user_regs, fast = 0, offset = 0
        ldr     r1, [sp, #\offset + S_PSR]      @ get calling cpsr
        ldr     lr, [sp, #\offset + S_PC]!      @ get pc
        rfeia   sp!
        .endm
 
+       @
+       @ svc_exit_via_fiq - like svc_exit but switches to FIQ mode before exit
+       @
+       @ For full details see non-Thumb implementation above.
+       @
+       .macro  svc_exit_via_fiq
+       add     r0, sp, #S_R2
+       ldr     lr, [sp, #S_LR]
+       ldr     sp, [sp, #S_SP] @ abort is deadly from here onward (it will
+                               @ clobber state restored below)
+       ldmia   r0, {r2 - r12}
+       mov     r1, #FIQ_MODE | PSR_I_BIT | PSR_F_BIT
+       msr     cpsr_c, r1
+       sub     r0, #S_R2
+       add     r8, r0, #S_PC
+       ldmia   r0, {r0 - r1}
+       rfeia   r8
+       .endm
+
 #ifdef CONFIG_CPU_V7M
        /*
         * Note we don't need to do clrex here as clearing the local monitor is
index 918875d96d5dc598985c7dce050e0a1785637b49..b37752a966521b64faa3dd9fb612d5e7b3e1a5b1 100644 (file)
@@ -52,7 +52,8 @@
                (unsigned)&vector_fiq_offset;           \
        })
 
-static unsigned long no_fiq_insn;
+static unsigned long dfl_fiq_insn;
+static struct pt_regs dfl_fiq_regs;
 
 /* Default reacquire function
  * - we always relinquish FIQ control
@@ -60,8 +61,15 @@ static unsigned long no_fiq_insn;
  */
 static int fiq_def_op(void *ref, int relinquish)
 {
-       if (!relinquish)
-               set_fiq_handler(&no_fiq_insn, sizeof(no_fiq_insn));
+       if (!relinquish) {
+               /* Restore default handler and registers */
+               local_fiq_disable();
+               set_fiq_regs(&dfl_fiq_regs);
+               set_fiq_handler(&dfl_fiq_insn, sizeof(dfl_fiq_insn));
+               local_fiq_enable();
+
+               /* FIXME: notify irq controller to standard enable FIQs */
+       }
 
        return 0;
 }
@@ -150,6 +158,7 @@ EXPORT_SYMBOL(disable_fiq);
 void __init init_FIQ(int start)
 {
        unsigned offset = FIQ_OFFSET;
-       no_fiq_insn = *(unsigned long *)(0xffff0000 + offset);
+       dfl_fiq_insn = *(unsigned long *)(0xffff0000 + offset);
+       get_fiq_regs(&dfl_fiq_regs);
        fiq_start = start;
 }
index 4d963fb66e3f0bce4590e5885415916be9aba866..b5b452f90f761bd2a6961ddb774cda920894e5af 100644 (file)
@@ -113,8 +113,8 @@ static u32 read_wb_reg(int n)
        GEN_READ_WB_REG_CASES(ARM_OP2_WVR, val);
        GEN_READ_WB_REG_CASES(ARM_OP2_WCR, val);
        default:
-               pr_warning("attempt to read from unknown breakpoint "
-                               "register %d\n", n);
+               pr_warn("attempt to read from unknown breakpoint register %d\n",
+                       n);
        }
 
        return val;
@@ -128,8 +128,8 @@ static void write_wb_reg(int n, u32 val)
        GEN_WRITE_WB_REG_CASES(ARM_OP2_WVR, val);
        GEN_WRITE_WB_REG_CASES(ARM_OP2_WCR, val);
        default:
-               pr_warning("attempt to write to unknown breakpoint "
-                               "register %d\n", n);
+               pr_warn("attempt to write to unknown breakpoint register %d\n",
+                       n);
        }
        isb();
 }
@@ -292,7 +292,7 @@ int hw_breakpoint_slots(int type)
        case TYPE_DATA:
                return get_num_wrps();
        default:
-               pr_warning("unknown slot type: %d\n", type);
+               pr_warn("unknown slot type: %d\n", type);
                return 0;
        }
 }
@@ -365,7 +365,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
        }
 
        if (i == max_slots) {
-               pr_warning("Can't find any breakpoint slot\n");
+               pr_warn("Can't find any breakpoint slot\n");
                return -EBUSY;
        }
 
@@ -417,7 +417,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
        }
 
        if (i == max_slots) {
-               pr_warning("Can't find any breakpoint slot\n");
+               pr_warn("Can't find any breakpoint slot\n");
                return;
        }
 
@@ -894,8 +894,8 @@ static int debug_reg_trap(struct pt_regs *regs, unsigned int instr)
 {
        int cpu = smp_processor_id();
 
-       pr_warning("Debug register access (0x%x) caused undefined instruction on CPU %d\n",
-                  instr, cpu);
+       pr_warn("Debug register access (0x%x) caused undefined instruction on CPU %d\n",
+               instr, cpu);
 
        /* Set the error flag for this CPU and skip the faulting instruction. */
        cpumask_set_cpu(cpu, &debug_err_mask);
index 5c4d38e32a5128a48ce20cc9d2757465e4e7b935..88de943eebd627786a72b6debf58e1d96d7545eb 100644 (file)
@@ -205,8 +205,8 @@ void migrate_irqs(void)
                raw_spin_unlock(&desc->lock);
 
                if (affinity_broken && printk_ratelimit())
-                       pr_warning("IRQ%u no longer affine to CPU%u\n", i,
-                               smp_processor_id());
+                       pr_warn("IRQ%u no longer affine to CPU%u\n",
+                               i, smp_processor_id());
        }
 
        local_irq_restore(flags);
index 08d731294bcdda819fdc7cfe1e12cd4bf525a771..b206d7790c7790af1a4c740c5d1c65c43b7f45c5 100644 (file)
  *
  *     @ TESTCASE_START
  *     bl      __kprobes_test_case_start
- *     @ start of inline data...
+ *     .pushsection .rodata
+ *     "10:
  *     .ascii "mov r0, r7"     @ text title for test case
  *     .byte   0
- *     .align  2, 0
+ *     .popsection
+ *     @ start of inline data...
+ *     .word   10b             @ pointer to title in .rodata section
  *
  *     @ TEST_ARG_REG
  *     .byte   ARG_TYPE_REG
@@ -971,7 +974,7 @@ void __naked __kprobes_test_case_start(void)
        __asm__ __volatile__ (
                "stmdb  sp!, {r4-r11}                           \n\t"
                "sub    sp, sp, #"__stringify(TEST_MEMORY_SIZE)"\n\t"
-               "bic    r0, lr, #1  @ r0 = inline title string  \n\t"
+               "bic    r0, lr, #1  @ r0 = inline data          \n\t"
                "mov    r1, sp                                  \n\t"
                "bl     kprobes_test_case_start                 \n\t"
                "bx     r0                                      \n\t"
@@ -1349,15 +1352,14 @@ static unsigned long next_instruction(unsigned long pc)
        return pc + 4;
 }
 
-static uintptr_t __used kprobes_test_case_start(const char *title, void *stack)
+static uintptr_t __used kprobes_test_case_start(const char **title, void *stack)
 {
        struct test_arg *args;
        struct test_arg_end *end_arg;
        unsigned long test_code;
 
-       args = (struct test_arg *)PTR_ALIGN(title + strlen(title) + 1, 4);
-
-       current_title = title;
+       current_title = *title++;
+       args = (struct test_arg *)title;
        current_args = args;
        current_stack = stack;
 
index eecc90a0fd912e7a0de0a50c7a707df8864d59a3..4430990e90e7aaf309d67dbad363490aced5a413 100644 (file)
@@ -111,11 +111,14 @@ struct test_arg_end {
 #define TESTCASE_START(title)                                  \
        __asm__ __volatile__ (                                  \
        "bl     __kprobes_test_case_start               \n\t"   \
+       ".pushsection .rodata                           \n\t"   \
+       "10:                                            \n\t"   \
        /* don't use .asciz here as 'title' may be */           \
        /* multiple strings to be concatenated.  */             \
        ".ascii "#title"                                \n\t"   \
        ".byte  0                                       \n\t"   \
-       ".align 2, 0                                    \n\t"
+       ".popsection                                    \n\t"   \
+       ".word  10b                                     \n\t"
 
 #define        TEST_ARG_REG(reg, val)                                  \
        ".byte  "__stringify(ARG_TYPE_REG)"             \n\t"   \
index 4bf4cce759fe1cf6d56f25c6d4141124709c7a33..eb2c4d55666b49776d45281de430c8af8b0790cc 100644 (file)
@@ -146,8 +146,8 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
                         * continue. Otherwise, continue without this interrupt.
                         */
                        if (irq_set_affinity(irq, cpumask_of(i)) && irqs > 1) {
-                               pr_warning("unable to set irq affinity (irq=%d, cpu=%u)\n",
-                                           irq, i);
+                               pr_warn("unable to set irq affinity (irq=%d, cpu=%u)\n",
+                                       irq, i);
                                continue;
                        }
 
index a35f6ebbd2c2bddecf8f5b63a04e612ad5d38c75..a0a691d1cbeee0e675e3d18674b15fc1f1224342 100644 (file)
@@ -306,7 +306,6 @@ void __show_regs(struct pt_regs *regs)
 
 void show_regs(struct pt_regs * regs)
 {
-       printk("\n");
        __show_regs(regs);
        dump_stack();
 }
@@ -474,19 +473,57 @@ int in_gate_area_no_mm(unsigned long addr)
 
 const char *arch_vma_name(struct vm_area_struct *vma)
 {
-       return is_gate_vma(vma) ? "[vectors]" :
-               (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ?
-                "[sigpage]" : NULL;
+       return is_gate_vma(vma) ? "[vectors]" : NULL;
+}
+
+/* If possible, provide a placement hint at a random offset from the
+ * stack for the signal page.
+ */
+static unsigned long sigpage_addr(const struct mm_struct *mm,
+                                 unsigned int npages)
+{
+       unsigned long offset;
+       unsigned long first;
+       unsigned long last;
+       unsigned long addr;
+       unsigned int slots;
+
+       first = PAGE_ALIGN(mm->start_stack);
+
+       last = TASK_SIZE - (npages << PAGE_SHIFT);
+
+       /* No room after stack? */
+       if (first > last)
+               return 0;
+
+       /* Just enough room? */
+       if (first == last)
+               return first;
+
+       slots = ((last - first) >> PAGE_SHIFT) + 1;
+
+       offset = get_random_int() % slots;
+
+       addr = first + (offset << PAGE_SHIFT);
+
+       return addr;
 }
 
 static struct page *signal_page;
 extern struct page *get_signal_page(void);
 
+static const struct vm_special_mapping sigpage_mapping = {
+       .name = "[sigpage]",
+       .pages = &signal_page,
+};
+
 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
 {
        struct mm_struct *mm = current->mm;
+       struct vm_area_struct *vma;
        unsigned long addr;
-       int ret;
+       unsigned long hint;
+       int ret = 0;
 
        if (!signal_page)
                signal_page = get_signal_page();
@@ -494,18 +531,23 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
                return -ENOMEM;
 
        down_write(&mm->mmap_sem);
-       addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
+       hint = sigpage_addr(mm, 1);
+       addr = get_unmapped_area(NULL, hint, PAGE_SIZE, 0, 0);
        if (IS_ERR_VALUE(addr)) {
                ret = addr;
                goto up_fail;
        }
 
-       ret = install_special_mapping(mm, addr, PAGE_SIZE,
+       vma = _install_special_mapping(mm, addr, PAGE_SIZE,
                VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
-               &signal_page);
+               &sigpage_mapping);
+
+       if (IS_ERR(vma)) {
+               ret = PTR_ERR(vma);
+               goto up_fail;
+       }
 
-       if (ret == 0)
-               mm->context.sigpage = addr;
+       mm->context.sigpage = addr;
 
  up_fail:
        up_write(&mm->mmap_sem);
index fafedd86885ddeb22c232a373239dd17ba620d3a..98ea4b7eb406604c6a37f2b34b77b75215d38d23 100644 (file)
@@ -59,15 +59,6 @@ void *return_address(unsigned int level)
 
 #else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
 
-#if defined(CONFIG_ARM_UNWIND)
-#warning "TODO: return_address should use unwind tables"
-#endif
-
-void *return_address(unsigned int level)
-{
-       return NULL;
-}
-
 #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
 
 EXPORT_SYMBOL_GPL(return_address);
index 84db893dedc27c9b79edb3d3a8845f3c39e0c859..c03106378b4927cc7b5fa64bf2265aca81237a62 100644 (file)
@@ -133,6 +133,7 @@ struct stack {
        u32 irq[3];
        u32 abt[3];
        u32 und[3];
+       u32 fiq[3];
 } ____cacheline_aligned;
 
 #ifndef CONFIG_CPU_V7M
@@ -470,7 +471,10 @@ void notrace cpu_init(void)
        "msr    cpsr_c, %5\n\t"
        "add    r14, %0, %6\n\t"
        "mov    sp, r14\n\t"
-       "msr    cpsr_c, %7"
+       "msr    cpsr_c, %7\n\t"
+       "add    r14, %0, %8\n\t"
+       "mov    sp, r14\n\t"
+       "msr    cpsr_c, %9"
            :
            : "r" (stk),
              PLC (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
@@ -479,6 +483,8 @@ void notrace cpu_init(void)
              "I" (offsetof(struct stack, abt[0])),
              PLC (PSR_F_BIT | PSR_I_BIT | UND_MODE),
              "I" (offsetof(struct stack, und[0])),
+             PLC (PSR_F_BIT | PSR_I_BIT | FIQ_MODE),
+             "I" (offsetof(struct stack, fiq[0])),
              PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
            : "r14");
 #endif
index 9388a3d479e1372279d67e95ba637b91f73c679f..39c74a2c3df9c7370fe2ca9cf2b67ea6dd8985fd 100644 (file)
@@ -95,6 +95,9 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
 {
        int ret;
 
+       if (!smp_ops.smp_boot_secondary)
+               return -ENOSYS;
+
        /*
         * We need to tell the secondary core where to find
         * its stack and the page tables.
@@ -113,7 +116,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
        /*
         * Now bring the CPU into our world.
         */
-       ret = boot_secondary(cpu, idle);
+       ret = smp_ops.smp_boot_secondary(cpu, idle);
        if (ret == 0) {
                /*
                 * CPU was successfully started, wait for it
@@ -142,13 +145,6 @@ void __init smp_init_cpus(void)
                smp_ops.smp_init_cpus();
 }
 
-int boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
-       if (smp_ops.smp_boot_secondary)
-               return smp_ops.smp_boot_secondary(cpu, idle);
-       return -ENOSYS;
-}
-
 int platform_can_cpu_hotplug(void)
 {
 #ifdef CONFIG_HOTPLUG_CPU
@@ -650,7 +646,7 @@ void smp_send_stop(void)
                udelay(1);
 
        if (num_online_cpus() > 1)
-               pr_warning("SMP: failed to stop secondary CPUs\n");
+               pr_warn("SMP: failed to stop secondary CPUs\n");
 }
 
 /*
index a964c9f40f875882e3bf4d722eb7290074981709..0c8b10801d36ad6a25806892ea283c7b93d28f61 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/irq.h>
 
 #include <linux/atomic.h>
 #include <asm/cacheflush.h>
@@ -460,10 +461,29 @@ die_sig:
        arm_notify_die("Oops - undefined instruction", regs, &info, 0, 6);
 }
 
-asmlinkage void do_unexp_fiq (struct pt_regs *regs)
+/*
+ * Handle FIQ similarly to NMI on x86 systems.
+ *
+ * The runtime environment for NMIs is extremely restrictive
+ * (NMIs can pre-empt critical sections meaning almost all locking is
+ * forbidden) meaning this default FIQ handling must only be used in
+ * circumstances where non-maskability improves robustness, such as
+ * watchdog or debug logic.
+ *
+ * This handler is not appropriate for general purpose use in drivers
+ * platform code and can be overrideen using set_fiq_handler.
+ */
+asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs)
 {
-       printk("Hmm.  Unexpected FIQ received, but trying to continue\n");
-       printk("You may have a hardware problem...\n");
+       struct pt_regs *old_regs = set_irq_regs(regs);
+
+       nmi_enter();
+
+       /* nop. FIQ handlers for special arch/arm features can be added here. */
+
+       nmi_exit();
+
+       set_irq_regs(old_regs);
 }
 
 /*
index a61a1dfbb0db50ac44c1ca5a48ca7e71153e9b9b..cbb85c5fabf9376821f2769e78d94d4d5363174e 100644 (file)
@@ -157,7 +157,7 @@ static const struct unwind_idx *search_index(unsigned long addr,
        if (likely(start->addr_offset <= addr_prel31))
                return start;
        else {
-               pr_warning("unwind: Unknown symbol address %08lx\n", addr);
+               pr_warn("unwind: Unknown symbol address %08lx\n", addr);
                return NULL;
        }
 }
@@ -225,7 +225,7 @@ static unsigned long unwind_get_byte(struct unwind_ctrl_block *ctrl)
        unsigned long ret;
 
        if (ctrl->entries <= 0) {
-               pr_warning("unwind: Corrupt unwind table\n");
+               pr_warn("unwind: Corrupt unwind table\n");
                return 0;
        }
 
@@ -333,8 +333,8 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
                insn = (insn << 8) | unwind_get_byte(ctrl);
                mask = insn & 0x0fff;
                if (mask == 0) {
-                       pr_warning("unwind: 'Refuse to unwind' instruction %04lx\n",
-                                  insn);
+                       pr_warn("unwind: 'Refuse to unwind' instruction %04lx\n",
+                               insn);
                        return -URC_FAILURE;
                }
 
@@ -357,8 +357,8 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
                unsigned long mask = unwind_get_byte(ctrl);
 
                if (mask == 0 || mask & 0xf0) {
-                       pr_warning("unwind: Spare encoding %04lx\n",
-                              (insn << 8) | mask);
+                       pr_warn("unwind: Spare encoding %04lx\n",
+                               (insn << 8) | mask);
                        return -URC_FAILURE;
                }
 
@@ -370,7 +370,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
 
                ctrl->vrs[SP] += 0x204 + (uleb128 << 2);
        } else {
-               pr_warning("unwind: Unhandled instruction %02lx\n", insn);
+               pr_warn("unwind: Unhandled instruction %02lx\n", insn);
                return -URC_FAILURE;
        }
 
@@ -403,7 +403,7 @@ int unwind_frame(struct stackframe *frame)
 
        idx = unwind_find_idx(frame->pc);
        if (!idx) {
-               pr_warning("unwind: Index not found %08lx\n", frame->pc);
+               pr_warn("unwind: Index not found %08lx\n", frame->pc);
                return -URC_FAILURE;
        }
 
@@ -422,8 +422,8 @@ int unwind_frame(struct stackframe *frame)
                /* only personality routine 0 supported in the index */
                ctrl.insn = &idx->insn;
        else {
-               pr_warning("unwind: Unsupported personality routine %08lx in the index at %p\n",
-                          idx->insn, idx);
+               pr_warn("unwind: Unsupported personality routine %08lx in the index at %p\n",
+                       idx->insn, idx);
                return -URC_FAILURE;
        }
 
@@ -435,8 +435,8 @@ int unwind_frame(struct stackframe *frame)
                ctrl.byte = 1;
                ctrl.entries = 1 + ((*ctrl.insn & 0x00ff0000) >> 16);
        } else {
-               pr_warning("unwind: Unsupported personality routine %08lx at %p\n",
-                          *ctrl.insn, ctrl.insn);
+               pr_warn("unwind: Unsupported personality routine %08lx at %p\n",
+                       *ctrl.insn, ctrl.insn);
                return -URC_FAILURE;
        }
 
index 6f57cb94367fed3697ae3628bcc5b16fc9f8a5be..8e95aa47457a56761b4a84bcc5ad8a657fac8c66 100644 (file)
@@ -219,8 +219,8 @@ SECTIONS
        __data_loc = ALIGN(4);          /* location in binary */
        . = PAGE_OFFSET + TEXT_OFFSET;
 #else
-       __init_end = .;
        . = ALIGN(THREAD_SIZE);
+       __init_end = .;
        __data_loc = .;
 #endif
 
index 04f9784ff0edab68132d31bc15110935a4b60883..c6f6ed1cbed08a7f0ebfa40d670ab95b7b1b2d88 100644 (file)
@@ -58,6 +58,7 @@ config SA1100_H3100
        bool "Compaq iPAQ H3100"
        select ARM_SA1110_CPUFREQ
        select HTC_EGPIO
+       select MFD_IPAQ_MICRO
        help
          Say Y here if you intend to run this kernel on the Compaq iPAQ
          H3100 handheld computer.  Information about this machine and the
@@ -69,6 +70,7 @@ config SA1100_H3600
        bool "Compaq iPAQ H3600/H3700"
        select ARM_SA1110_CPUFREQ
        select HTC_EGPIO
+       select MFD_IPAQ_MICRO
        help
          Say Y here if you intend to run this kernel on the Compaq iPAQ
          H3600 handheld computer.  Information about this machine and the
index c79bf467fb7f8efea5b70f7e2d278e3f30c52864..b1d4faa12f9af4a8f736947521cd6e3987648326 100644 (file)
@@ -25,6 +25,7 @@
 #include <asm/mach/map.h>
 
 #include <mach/h3xxx.h>
+#include <mach/irqs.h>
 
 #include "generic.h"
 
@@ -244,9 +245,23 @@ static struct platform_device h3xxx_keys = {
        },
 };
 
+static struct resource h3xxx_micro_resources[] = {
+       DEFINE_RES_MEM(0x80010000, SZ_4K),
+       DEFINE_RES_MEM(0x80020000, SZ_4K),
+       DEFINE_RES_IRQ(IRQ_Ser1UART),
+};
+
+struct platform_device h3xxx_micro_asic = {
+       .name = "ipaq-h3xxx-micro",
+       .id = -1,
+       .resource = h3xxx_micro_resources,
+       .num_resources = ARRAY_SIZE(h3xxx_micro_resources),
+};
+
 static struct platform_device *h3xxx_devices[] = {
        &h3xxx_egpio,
        &h3xxx_keys,
+       &h3xxx_micro_asic,
 };
 
 void __init h3xxx_mach_init(void)
index 0c1ab49e5f7b7aca6d35d7be575061b8d248a7c9..83792f4324ead79f82587b25226ecc65732293fc 100644 (file)
@@ -41,6 +41,7 @@
  * This code is not portable to processors with late data abort handling.
  */
 #define CODING_BITS(i) (i & 0x0e000000)
+#define COND_BITS(i)   (i & 0xf0000000)
 
 #define LDST_I_BIT(i)  (i & (1 << 26))         /* Immediate constant   */
 #define LDST_P_BIT(i)  (i & (1 << 24))         /* Preindex             */
@@ -821,6 +822,8 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
                break;
 
        case 0x04000000:        /* ldr or str immediate */
+               if (COND_BITS(instr) == 0xf0000000) /* NEON VLDn, VSTn */
+                       goto bad;
                offset.un = OFFSET_BITS(instr);
                handler = do_alignment_ldrstr;
                break;
index c447ec70e8687ac1c4c02d00bd5597b66ce8f8dd..e7a81cebbb2eda6bac1c7d7283d8fff8d593dc54 100644 (file)
@@ -27,7 +27,7 @@ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
        if (pud_none_or_clear_bad(pud) || (pud_val(*pud) & L_PGD_SWAPPER)) {
                pmd = pmd_alloc_one(&init_mm, addr);
                if (!pmd) {
-                       pr_warning("Failed to allocate identity pmd.\n");
+                       pr_warn("Failed to allocate identity pmd.\n");
                        return;
                }
                /*
index 659c75d808dc28baf4755a0d2e3f062265cab3c9..9221645dd192dbbfc0b0ae479642583487f99c76 100644 (file)
@@ -636,6 +636,11 @@ static int keep_initrd;
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
        if (!keep_initrd) {
+               if (start == initrd_start)
+                       start = round_down(start, PAGE_SIZE);
+               if (end == initrd_end)
+                       end = round_up(end, PAGE_SIZE);
+
                poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
                free_reserved_area((void *)start, (void *)end, -1, "initrd");
        }
index 8348ed6b2efe436e9ed138ce10b1f67b438453e5..9f98cec7fe1e1855dc5fcede8b0e24e88d09c3b3 100644 (file)
@@ -223,13 +223,13 @@ early_param("ecc", early_ecc);
 
 static int __init early_cachepolicy(char *p)
 {
-       pr_warning("cachepolicy kernel parameter not supported without cp15\n");
+       pr_warn("cachepolicy kernel parameter not supported without cp15\n");
 }
 early_param("cachepolicy", early_cachepolicy);
 
 static int __init noalign_setup(char *__unused)
 {
-       pr_warning("noalign kernel parameter not supported without cp15\n");
+       pr_warn("noalign kernel parameter not supported without cp15\n");
 }
 __setup("noalign", noalign_setup);
 
index b64e67c7f176a97072b342a168db19b292cad4a5..d3daed0ae0ad92ff9aefe4ad1e6e151c9e2a855a 100644 (file)
@@ -157,9 +157,9 @@ ENDPROC(cpu_v7_set_pte_ext)
         *  TFR   EV X F   IHD LR    S
         * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM
         * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced
-        *   11    0 110    1  0011 1100 .111 1101 < we want
+        *   11    0 110    0  0011 1100 .111 1101 < we want
         */
        .align  2
        .type   v7_crval, #object
 v7_crval:
-       crval   clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c
+       crval   clear=0x0122c302, mmuset=0x30c03c7d, ucset=0x00c01c7c
index b5d67db2089779c9a1ba1580ec078ee9bce07dad..b3a947863ac7bb7e38d47b7a640d698b55a34bbc 100644 (file)
@@ -570,7 +570,7 @@ __v7_ca15mp_proc_info:
 __v7_b15mp_proc_info:
        .long   0x420f00f0
        .long   0xff0ffff0
-       __v7_proc __v7_b15mp_setup, hwcaps = HWCAP_IDIV
+       __v7_proc __v7_b15mp_setup
        .size   __v7_b15mp_proc_info, . - __v7_b15mp_proc_info
 
        /*
index 97f0c0429dfa647fc9e07eb349768b4ebc750e71..edf8715ba39b5b3486776afd1cdccd90666a8702 100644 (file)
@@ -97,9 +97,9 @@ SECTIONS
 
        PERCPU_SECTION(64)
 
+       . = ALIGN(PAGE_SIZE);
        __init_end = .;
 
-       . = ALIGN(PAGE_SIZE);
        _data = .;
        _sdata = .;
        RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
index a83061f37e431be889442a954864faa9cbfcebb6..adf5e07677d8e377208abc659d4f519a9c3a10f4 100644 (file)
@@ -333,8 +333,14 @@ static int keep_initrd;
 
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
-       if (!keep_initrd)
+       if (!keep_initrd) {
+               if (start == initrd_start)
+                       start = round_down(start, PAGE_SIZE);
+               if (end == initrd_end)
+                       end = round_up(end, PAGE_SIZE);
+
                free_reserved_area((void *)start, (void *)end, 0, "initrd");
+       }
 }
 
 static int __init keepinitrd_setup(char *__unused)
index 00b5906f57b783232b689af4693d1a9e39b2ad39..77daef031db5df6d91855d56433546b5db61fa9d 100644 (file)
@@ -543,7 +543,7 @@ config CRYPTO_SHA1_ARM
 
 config CRYPTO_SHA1_ARM_NEON
        tristate "SHA1 digest algorithm (ARM NEON)"
-       depends on ARM && KERNEL_MODE_NEON && !CPU_BIG_ENDIAN
+       depends on ARM && KERNEL_MODE_NEON
        select CRYPTO_SHA1_ARM
        select CRYPTO_SHA1
        select CRYPTO_HASH
@@ -603,7 +603,7 @@ config CRYPTO_SHA512_SPARC64
 
 config CRYPTO_SHA512_ARM_NEON
        tristate "SHA384 and SHA512 digest algorithm (ARM NEON)"
-       depends on ARM && KERNEL_MODE_NEON && !CPU_BIG_ENDIAN
+       depends on ARM && KERNEL_MODE_NEON
        select CRYPTO_SHA512
        select CRYPTO_HASH
        help
index 5ba0360663a7daae3df0f063e6901d7990a381d8..aa70cbda327c1feee026b8e2e1196db9b081ef0c 100644 (file)
@@ -40,6 +40,8 @@
  * }
  *
  * [__init_begin, __init_end] is the init section that may be freed after init
+ *     // __init_begin and __init_end should be page aligned, so that we can
+ *     // free the whole .init memory
  * [_stext, _etext] is the text section
  * [_sdata, _edata] is the data section
  *
index d04ce8ac4399260c8e127bd800a5a12dc91f5044..cf66c5c8458e66aef61834e977e55999b442360a 100644 (file)
@@ -35,7 +35,7 @@ config GCOV_KERNEL
 config GCOV_PROFILE_ALL
        bool "Profile entire Kernel"
        depends on GCOV_KERNEL
-       depends on SUPERH || S390 || X86 || PPC || MICROBLAZE
+       depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM
        default n
        ---help---
        This options activates profiling for the entire kernel.