Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Sep 2015 19:24:10 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Sep 2015 19:24:10 +0000 (12:24 -0700)
Pull ARM fixes from Russell King:
 "A number of fixes for the merge window, fixing a number of cases
  missed when testing the uaccess code, particularly cases which only
  show up with certain compiler versions"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8431/1: fix alignement of __bug_table section entries
  arm/xen: Enable user access to the kernel before issuing a privcmd call
  ARM: domains: add memory dependencies to get_domain/set_domain
  ARM: domains: thread_info.h no longer needs asm/domains.h
  ARM: uaccess: fix undefined instruction on ARMv7M/noMMU
  ARM: uaccess: remove unneeded uaccess_save_and_disable macro
  ARM: swpan: fix nwfpe for uaccess changes
  ARM: 8429/1: disable GCC SRA optimization

1  2 
arch/arm/include/asm/assembler.h
arch/arm/include/asm/thread_info.h
arch/arm/kernel/process.c

        .endm
  #endif
  
 -      .macro asm_trace_hardirqs_off
 +      .macro asm_trace_hardirqs_off, save=1
  #if defined(CONFIG_TRACE_IRQFLAGS)
 +      .if \save
        stmdb   sp!, {r0-r3, ip, lr}
 +      .endif
        bl      trace_hardirqs_off
 +      .if \save
        ldmia   sp!, {r0-r3, ip, lr}
 +      .endif
  #endif
        .endm
  
 -      .macro asm_trace_hardirqs_on_cond, cond
 +      .macro asm_trace_hardirqs_on, cond=al, save=1
  #if defined(CONFIG_TRACE_IRQFLAGS)
        /*
         * actually the registers should be pushed and pop'd conditionally, but
         * after bl the flags are certainly clobbered
         */
 +      .if \save
        stmdb   sp!, {r0-r3, ip, lr}
 +      .endif
        bl\cond trace_hardirqs_on
 +      .if \save
        ldmia   sp!, {r0-r3, ip, lr}
 +      .endif
  #endif
        .endm
  
 -      .macro asm_trace_hardirqs_on
 -      asm_trace_hardirqs_on_cond al
 -      .endm
 -
 -      .macro disable_irq
 +      .macro disable_irq, save=1
        disable_irq_notrace
 -      asm_trace_hardirqs_off
 +      asm_trace_hardirqs_off \save
        .endm
  
        .macro enable_irq
  
        .macro restore_irqs, oldcpsr
        tst     \oldcpsr, #PSR_I_BIT
 -      asm_trace_hardirqs_on_cond eq
 +      asm_trace_hardirqs_on cond=eq
        restore_irqs_notrace \oldcpsr
        .endm
  
@@@ -491,11 -487,6 +491,6 @@@ THUMB(    orr     \reg , \reg , #PSR_T_BIT        
  #endif
        .endm
  
-       .macro  uaccess_save_and_disable, tmp
-       uaccess_save \tmp
-       uaccess_disable \tmp
-       .endm
        .irp    c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
        .macro  ret\c, reg
  #if __LINUX_ARM_ARCH__ < 6
@@@ -25,7 -25,6 +25,6 @@@
  struct task_struct;
  
  #include <asm/types.h>
- #include <asm/domain.h>
  
  typedef unsigned long mm_segment_t;
  
@@@ -133,18 -132,22 +132,18 @@@ extern int vfp_restore_user_hwstate(str
  
  /*
   * thread information flags:
 - *  TIF_SYSCALL_TRACE - syscall trace active
 - *  TIF_SYSCAL_AUDIT  - syscall auditing active
 - *  TIF_SIGPENDING    - signal pending
 - *  TIF_NEED_RESCHED  - rescheduling necessary
 - *  TIF_NOTIFY_RESUME - callback before returning to user
   *  TIF_USEDFPU               - FPU was used by this task this quantum (SMP)
   *  TIF_POLLING_NRFLAG        - true if poll_idle() is polling TIF_NEED_RESCHED
   */
 -#define TIF_SIGPENDING                0
 -#define TIF_NEED_RESCHED      1
 +#define TIF_SIGPENDING                0       /* signal pending */
 +#define TIF_NEED_RESCHED      1       /* rescheduling necessary */
  #define TIF_NOTIFY_RESUME     2       /* callback before returning to user */
 -#define TIF_UPROBE            7
 -#define TIF_SYSCALL_TRACE     8
 -#define TIF_SYSCALL_AUDIT     9
 -#define TIF_SYSCALL_TRACEPOINT        10
 -#define TIF_SECCOMP           11      /* seccomp syscall filtering active */
 +#define TIF_UPROBE            3       /* breakpointed or singlestepping */
 +#define TIF_SYSCALL_TRACE     4       /* syscall trace active */
 +#define TIF_SYSCALL_AUDIT     5       /* syscall auditing active */
 +#define TIF_SYSCALL_TRACEPOINT        6       /* syscall tracepoint instrumentation */
 +#define TIF_SECCOMP           7       /* seccomp syscall filtering active */
 +
  #define TIF_NOHZ              12      /* in adaptive nohz mode */
  #define TIF_USING_IWMMXT      17
  #define TIF_MEMDIE            18      /* is terminating due to OOM killer */
@@@ -91,6 -91,13 +91,6 @@@ void arch_cpu_idle_exit(void
        ledtrig_cpu(CPU_LED_IDLE_END);
  }
  
 -#ifdef CONFIG_HOTPLUG_CPU
 -void arch_cpu_idle_dead(void)
 -{
 -      cpu_die();
 -}
 -#endif
 -
  void __show_regs(struct pt_regs *regs)
  {
        unsigned long flags;
@@@ -226,6 -233,7 +226,7 @@@ copy_thread(unsigned long clone_flags, 
  
        memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save));
  
+ #ifdef CONFIG_CPU_USE_DOMAINS
        /*
         * Copy the initial value of the domain access control register
         * from the current thread: thread->addr_limit will have been
         * kernel/fork.c
         */
        thread->cpu_domain = get_domain();
+ #endif
  
        if (likely(!(p->flags & PF_KTHREAD))) {
                *childregs = *current_pt_regs();