Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Nov 2013 18:40:00 +0000 (10:40 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Nov 2013 18:40:00 +0000 (10:40 -0800)
Pull irq cleanups from Ingo Molnar:
 "This is a multi-arch cleanup series from Thomas Gleixner, which we
  kept to near the end of the merge window, to not interfere with
  architecture updates.

  This series (motivated by the -rt kernel) unifies more aspects of IRQ
  handling and generalizes PREEMPT_ACTIVE"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  preempt: Make PREEMPT_ACTIVE generic
  sparc: Use preempt_schedule_irq
  ia64: Use preempt_schedule_irq
  m32r: Use preempt_schedule_irq
  hardirq: Make hardirq bits generic
  m68k: Simplify low level interrupt handling code
  genirq: Prevent spurious detection for unconditionally polled interrupts

1  2 
arch/sparc/include/asm/thread_info_64.h
arch/sparc/kernel/rtrap_64.S
include/linux/sched.h

@@@ -111,8 -111,6 +111,6 @@@ struct thread_info 
  #define THREAD_SHIFT PAGE_SHIFT
  #endif /* PAGE_SHIFT == 13 */
  
- #define PREEMPT_ACTIVE                0x10000000
  /*
   * macros/functions for gaining access to the thread information structure
   */
@@@ -192,7 -190,7 +190,7 @@@ register struct thread_info *current_th
  #define TIF_UNALIGNED         5       /* allowed to do unaligned accesses */
  /* flag bit 6 is available */
  #define TIF_32BIT             7       /* 32-bit binary */
 -/* flag bit 8 is available */
 +#define TIF_NOHZ              8       /* in adaptive nohz mode */
  #define TIF_SECCOMP           9       /* secure computing */
  #define TIF_SYSCALL_AUDIT     10      /* syscall auditing active */
  #define TIF_SYSCALL_TRACEPOINT        11      /* syscall tracepoint instrumentation */
  #define _TIF_NEED_RESCHED     (1<<TIF_NEED_RESCHED)
  #define _TIF_UNALIGNED                (1<<TIF_UNALIGNED)
  #define _TIF_32BIT            (1<<TIF_32BIT)
 +#define _TIF_NOHZ             (1<<TIF_NOHZ)
  #define _TIF_SECCOMP          (1<<TIF_SECCOMP)
  #define _TIF_SYSCALL_AUDIT    (1<<TIF_SYSCALL_AUDIT)
  #define _TIF_SYSCALL_TRACEPOINT       (1<<TIF_SYSCALL_TRACEPOINT)
  #define               RTRAP_PSTATE_IRQOFF     (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV)
  #define               RTRAP_PSTATE_AG_IRQOFF  (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG)
  
 +#ifdef CONFIG_CONTEXT_TRACKING
 +# define SCHEDULE_USER schedule_user
 +#else
 +# define SCHEDULE_USER schedule
 +#endif
 +
                .text
                .align                  32
  __handle_preemption:
 -              call                    schedule
 +              call                    SCHEDULE_USER
                 wrpr                   %g0, RTRAP_PSTATE, %pstate
                ba,pt                   %xcc, __handle_preemption_continue
                 wrpr                   %g0, RTRAP_PSTATE_IRQOFF, %pstate
@@@ -312,12 -306,10 +312,10 @@@ to_kernel
                 nop
                cmp                     %l4, 0
                bne,pn                  %xcc, kern_fpucheck
-                sethi                  %hi(PREEMPT_ACTIVE), %l6
-               stw                     %l6, [%g6 + TI_PRE_COUNT]
-               call                    schedule
+                nop
+               call                    preempt_schedule_irq
                 nop
                ba,pt                   %xcc, rtrap
-                stw                    %g0, [%g6 + TI_PRE_COUNT]
  #endif
  kern_fpucheck:        ldub                    [%g6 + TI_FPDEPTH], %l5
                brz,pt                  %l5, rt_continue
diff --combined include/linux/sched.h
@@@ -22,7 -22,7 +22,7 @@@ struct sched_param 
  #include <linux/errno.h>
  #include <linux/nodemask.h>
  #include <linux/mm_types.h>
- #include <linux/preempt.h>
+ #include <linux/preempt_mask.h>
  
  #include <asm/page.h>
  #include <asm/ptrace.h>
@@@ -286,14 -286,6 +286,14 @@@ static inline void lockup_detector_init
  }
  #endif
  
 +#ifdef CONFIG_DETECT_HUNG_TASK
 +void reset_hung_task_detector(void);
 +#else
 +static inline void reset_hung_task_detector(void)
 +{
 +}
 +#endif
 +
  /* Attach to any functions which should be ignored in wchan output. */
  #define __sched               __attribute__((__section__(".sched.text")))
  
@@@ -331,10 -323,6 +331,10 @@@ static inline void arch_pick_mmap_layou
  extern void set_dumpable(struct mm_struct *mm, int value);
  extern int get_dumpable(struct mm_struct *mm);
  
 +#define SUID_DUMP_DISABLE     0       /* No setuid dumping */
 +#define SUID_DUMP_USER                1       /* Dump as user of process */
 +#define SUID_DUMP_ROOT                2       /* Dump as root */
 +
  /* mm flags */
  /* dumpable bits */
  #define MMF_DUMPABLE      0  /* core dump is permitted */
@@@ -1074,6 -1062,15 +1074,6 @@@ struct task_struct 
        struct hlist_head preempt_notifiers;
  #endif
  
 -      /*
 -       * fpu_counter contains the number of consecutive context switches
 -       * that the FPU is used. If this is over a threshold, the lazy fpu
 -       * saving becomes unlazy to save the trap. This is an unsigned char
 -       * so that after 256 times the counter wraps and the behavior turns
 -       * lazy again; this to deal with bursty apps that only use FPU for
 -       * a short time
 -       */
 -      unsigned char fpu_counter;
  #ifdef CONFIG_BLK_DEV_IO_TRACE
        unsigned int btrace_seq;
  #endif