aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-01 14:22:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-01 09:58:13 -0400
commit16a8016372c42c7628eb4a39d75386a461e8c5d0 (patch)
tree94ed1fab5b073d66be50a876ad81104eeb73c732 /arch
parent8af4efac26e1805c76144ad44118157239308d35 (diff)
sanitize tsk_is_polling()
Make default just return 0. The current default (checking TIF_POLLING_NRFLAG) is taken to architectures that need it; ones that don't do polling in their idle threads don't need to defined TIF_POLLING_NRFLAG at all. ia64 defined both TS_POLLING (used by its tsk_is_polling()) and TIF_POLLING_NRFLAG (not used at all). Killed the latter... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/thread_info.h2
-rw-r--r--arch/arm/include/asm/thread_info.h2
-rw-r--r--arch/avr32/include/asm/thread_info.h4
-rw-r--r--arch/blackfin/include/asm/thread_info.h3
-rw-r--r--arch/c6x/include/asm/thread_info.h1
-rw-r--r--arch/c6x/kernel/asm-offsets.c1
-rw-r--r--arch/cris/include/asm/thread_info.h2
-rw-r--r--arch/frv/include/asm/thread_info.h2
-rw-r--r--arch/h8300/include/asm/thread_info.h3
-rw-r--r--arch/hexagon/include/asm/thread_info.h2
-rw-r--r--arch/ia64/include/asm/thread_info.h2
-rw-r--r--arch/m32r/include/asm/thread_info.h2
-rw-r--r--arch/microblaze/include/asm/thread_info.h1
-rw-r--r--arch/mips/include/asm/thread_info.h2
-rw-r--r--arch/mn10300/include/asm/thread_info.h2
-rw-r--r--arch/openrisc/include/asm/thread_info.h2
-rw-r--r--arch/parisc/include/asm/thread_info.h2
-rw-r--r--arch/powerpc/include/asm/thread_info.h2
-rw-r--r--arch/s390/include/asm/thread_info.h3
-rw-r--r--arch/score/include/asm/thread_info.h3
-rw-r--r--arch/sh/include/asm/thread_info.h3
-rw-r--r--arch/sparc/include/asm/thread_info_32.h2
-rw-r--r--arch/sparc/include/asm/thread_info_64.h3
-rw-r--r--arch/um/include/asm/thread_info.h3
-rw-r--r--arch/xtensa/include/asm/thread_info.h2
25 files changed, 19 insertions, 37 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index 2601c8e338da..4554ecbff7c6 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -116,5 +116,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
116 (int __user *)(value)); \ 116 (int __user *)(value)); \
117 }) 117 })
118 118
119#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
120
119#endif /* __KERNEL__ */ 121#endif /* __KERNEL__ */
120#endif /* _ALPHA_THREAD_INFO_H */ 122#endif /* _ALPHA_THREAD_INFO_H */
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index af7b0bda3355..b2d6b412172d 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -148,7 +148,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
148#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ 148#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */
149#define TIF_SYSCALL_TRACE 8 149#define TIF_SYSCALL_TRACE 8
150#define TIF_SYSCALL_AUDIT 9 150#define TIF_SYSCALL_AUDIT 9
151#define TIF_POLLING_NRFLAG 16
152#define TIF_USING_IWMMXT 17 151#define TIF_USING_IWMMXT 17
153#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 152#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
154#define TIF_RESTORE_SIGMASK 20 153#define TIF_RESTORE_SIGMASK 20
@@ -160,7 +159,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
160#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 159#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
161#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 160#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
162#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 161#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
163#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
164#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) 162#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
165#define _TIF_SECCOMP (1 << TIF_SECCOMP) 163#define _TIF_SECCOMP (1 << TIF_SECCOMP)
166 164
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h
index a32c88cb2601..dc0c45721499 100644
--- a/arch/avr32/include/asm/thread_info.h
+++ b/arch/avr32/include/asm/thread_info.h
@@ -77,8 +77,6 @@ static inline struct thread_info *current_thread_info(void)
77#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 77#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
78#define TIF_SIGPENDING 1 /* signal pending */ 78#define TIF_SIGPENDING 1 /* signal pending */
79#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 79#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
80#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
81 TIF_NEED_RESCHED */
82#define TIF_BREAKPOINT 4 /* enter monitor mode on return */ 80#define TIF_BREAKPOINT 4 /* enter monitor mode on return */
83#define TIF_SINGLE_STEP 5 /* single step in progress */ 81#define TIF_SINGLE_STEP 5 /* single step in progress */
84#define TIF_MEMDIE 6 /* is terminating due to OOM killer */ 82#define TIF_MEMDIE 6 /* is terminating due to OOM killer */
@@ -91,7 +89,6 @@ static inline struct thread_info *current_thread_info(void)
91#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 89#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
92#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 90#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
93#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 91#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
94#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
95#define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP) 92#define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP)
96#define _TIF_MEMDIE (1 << TIF_MEMDIE) 93#define _TIF_MEMDIE (1 << TIF_MEMDIE)
97#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) 94#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
@@ -104,7 +101,6 @@ static inline struct thread_info *current_thread_info(void)
104 ((1 << TIF_SIGPENDING) \ 101 ((1 << TIF_SIGPENDING) \
105 | _TIF_NOTIFY_RESUME \ 102 | _TIF_NOTIFY_RESUME \
106 | (1 << TIF_NEED_RESCHED) \ 103 | (1 << TIF_NEED_RESCHED) \
107 | (1 << TIF_POLLING_NRFLAG) \
108 | (1 << TIF_BREAKPOINT) \ 104 | (1 << TIF_BREAKPOINT) \
109 | (1 << TIF_RESTORE_SIGMASK)) 105 | (1 << TIF_RESTORE_SIGMASK))
110 106
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h
index f9a8731b7e81..3894005337ba 100644
--- a/arch/blackfin/include/asm/thread_info.h
+++ b/arch/blackfin/include/asm/thread_info.h
@@ -96,8 +96,6 @@ static inline struct thread_info *current_thread_info(void)
96#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 96#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
97#define TIF_SIGPENDING 1 /* signal pending */ 97#define TIF_SIGPENDING 1 /* signal pending */
98#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 98#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
99#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
100 TIF_NEED_RESCHED */
101#define TIF_MEMDIE 4 /* is terminating due to OOM killer */ 99#define TIF_MEMDIE 4 /* is terminating due to OOM killer */
102#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 100#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
103#define TIF_IRQ_SYNC 7 /* sync pipeline stage */ 101#define TIF_IRQ_SYNC 7 /* sync pipeline stage */
@@ -108,7 +106,6 @@ static inline struct thread_info *current_thread_info(void)
108#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 106#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
109#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 107#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
110#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 108#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
111#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
112#define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC) 109#define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC)
113#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 110#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
114#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 111#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h
index 1710bcbb8d09..4c8dc562bd90 100644
--- a/arch/c6x/include/asm/thread_info.h
+++ b/arch/c6x/include/asm/thread_info.h
@@ -97,7 +97,6 @@ struct thread_info *current_thread_info(void)
97#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 97#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
98#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ 98#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
99 99
100#define TIF_POLLING_NRFLAG 16 /* true if polling TIF_NEED_RESCHED */
101#define TIF_MEMDIE 17 /* OOM killer killed process */ 100#define TIF_MEMDIE 17 /* OOM killer killed process */
102 101
103#define TIF_WORK_MASK 0x00007FFE /* work on irq/exception return */ 102#define TIF_WORK_MASK 0x00007FFE /* work on irq/exception return */
diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c
index 759ad6d207b6..60f1e437745d 100644
--- a/arch/c6x/kernel/asm-offsets.c
+++ b/arch/c6x/kernel/asm-offsets.c
@@ -116,7 +116,6 @@ void foo(void)
116 DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME)); 116 DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME));
117 DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING)); 117 DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING));
118 DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED)); 118 DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED));
119 DEFINE(_TIF_POLLING_NRFLAG, (1<<TIF_POLLING_NRFLAG));
120 119
121 DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK); 120 DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK);
122 DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK); 121 DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK);
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h
index 0e0b52d3e22a..07c8c40c52b3 100644
--- a/arch/cris/include/asm/thread_info.h
+++ b/arch/cris/include/asm/thread_info.h
@@ -78,14 +78,12 @@ struct thread_info {
78#define TIF_SIGPENDING 2 /* signal pending */ 78#define TIF_SIGPENDING 2 /* signal pending */
79#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 79#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
80#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ 80#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
81#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
82#define TIF_MEMDIE 17 /* is terminating due to OOM killer */ 81#define TIF_MEMDIE 17 /* is terminating due to OOM killer */
83 82
84#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 83#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
85#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 84#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
86#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 85#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
87#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 86#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
88#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
89 87
90#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 88#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
91#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 89#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h
index 5108ede011a5..bebd7eadc772 100644
--- a/arch/frv/include/asm/thread_info.h
+++ b/arch/frv/include/asm/thread_info.h
@@ -94,7 +94,6 @@ register struct thread_info *__current_thread_info asm("gr15");
94#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 94#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
95#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ 95#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
96#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 96#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
97#define TIF_POLLING_NRFLAG 6 /* true if poll_idle() is polling TIF_NEED_RESCHED */
98#define TIF_MEMDIE 7 /* is terminating due to OOM killer */ 97#define TIF_MEMDIE 7 /* is terminating due to OOM killer */
99 98
100#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 99#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
@@ -102,7 +101,6 @@ register struct thread_info *__current_thread_info asm("gr15");
102#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 101#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
103#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 102#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
104#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 103#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
105#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
106 104
107/* work to do on interrupt/exception return */ 105/* work to do on interrupt/exception return */
108#define _TIF_WORK_MASK \ 106#define _TIF_WORK_MASK \
diff --git a/arch/h8300/include/asm/thread_info.h b/arch/h8300/include/asm/thread_info.h
index aa0406bf0206..63cc298edb67 100644
--- a/arch/h8300/include/asm/thread_info.h
+++ b/arch/h8300/include/asm/thread_info.h
@@ -85,8 +85,6 @@ static inline struct thread_info *current_thread_info(void)
85#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 85#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
86#define TIF_SIGPENDING 1 /* signal pending */ 86#define TIF_SIGPENDING 1 /* signal pending */
87#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 87#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
88#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
89 TIF_NEED_RESCHED */
90#define TIF_MEMDIE 4 /* is terminating due to OOM killer */ 88#define TIF_MEMDIE 4 /* is terminating due to OOM killer */
91#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 89#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
92#define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ 90#define TIF_NOTIFY_RESUME 6 /* callback before returning to user */
@@ -95,7 +93,6 @@ static inline struct thread_info *current_thread_info(void)
95#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 93#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
96#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 94#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
97#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 95#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
98#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
99#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 96#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
100 97
101#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 98#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
index b5a6d43411c0..7f33f1677119 100644
--- a/arch/hexagon/include/asm/thread_info.h
+++ b/arch/hexagon/include/asm/thread_info.h
@@ -123,7 +123,6 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
123#define TIF_IRET 5 /* return with iret */ 123#define TIF_IRET 5 /* return with iret */
124#define TIF_RESTORE_SIGMASK 6 /* restore sig mask in do_signal() */ 124#define TIF_RESTORE_SIGMASK 6 /* restore sig mask in do_signal() */
125/* true if poll_idle() is polling TIF_NEED_RESCHED */ 125/* true if poll_idle() is polling TIF_NEED_RESCHED */
126#define TIF_POLLING_NRFLAG 16
127#define TIF_MEMDIE 17 /* OOM killer killed process */ 126#define TIF_MEMDIE 17 /* OOM killer killed process */
128 127
129#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 128#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
@@ -132,7 +131,6 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
132#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 131#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
133#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 132#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
134#define _TIF_IRET (1 << TIF_IRET) 133#define _TIF_IRET (1 << TIF_IRET)
135#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
136 134
137/* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */ 135/* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */
138#define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE) 136#define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h
index f7ee85378311..ff2ae4136584 100644
--- a/arch/ia64/include/asm/thread_info.h
+++ b/arch/ia64/include/asm/thread_info.h
@@ -106,7 +106,6 @@ struct thread_info {
106#define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ 106#define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */
107#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ 107#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
108#define TIF_NOTIFY_RESUME 6 /* resumption notification requested */ 108#define TIF_NOTIFY_RESUME 6 /* resumption notification requested */
109#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
110#define TIF_MEMDIE 17 /* is terminating due to OOM killer */ 109#define TIF_MEMDIE 17 /* is terminating due to OOM killer */
111#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ 110#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
112#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ 111#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */
@@ -119,7 +118,6 @@ struct thread_info {
119#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 118#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
120#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 119#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
121#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 120#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
122#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
123#define _TIF_MCA_INIT (1 << TIF_MCA_INIT) 121#define _TIF_MCA_INIT (1 << TIF_MCA_INIT)
124#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) 122#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED)
125#define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) 123#define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE)
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h
index 18b058457d31..763e8aec5ea5 100644
--- a/arch/m32r/include/asm/thread_info.h
+++ b/arch/m32r/include/asm/thread_info.h
@@ -123,7 +123,6 @@ static inline unsigned int get_thread_fault_code(void)
123#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ 123#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
124#define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ 124#define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */
125#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ 125#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
126#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
127#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 126#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
128 127
129#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 128#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -133,7 +132,6 @@ static inline unsigned int get_thread_fault_code(void)
133#define _TIF_IRET (1<<TIF_IRET) 132#define _TIF_IRET (1<<TIF_IRET)
134#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 133#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
135#define _TIF_USEDFPU (1<<TIF_USEDFPU) 134#define _TIF_USEDFPU (1<<TIF_USEDFPU)
136#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
137 135
138#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 136#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
139#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 137#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
index 6c610234ffab..a2565347a39d 100644
--- a/arch/microblaze/include/asm/thread_info.h
+++ b/arch/microblaze/include/asm/thread_info.h
@@ -184,6 +184,7 @@ static inline bool test_and_clear_restore_sigmask(void)
184 ti->status &= ~TS_RESTORE_SIGMASK; 184 ti->status &= ~TS_RESTORE_SIGMASK;
185 return true; 185 return true;
186} 186}
187#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
187#endif 188#endif
188 189
189#endif /* __KERNEL__ */ 190#endif /* __KERNEL__ */
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index a75a11abf7b0..8debe9e91754 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -103,7 +103,6 @@ register struct thread_info *__current_thread_info __asm__("$28");
103#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ 103#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
104#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ 104#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
105#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ 105#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
106#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
107#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 106#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
108#define TIF_FIXADE 20 /* Fix address errors in software */ 107#define TIF_FIXADE 20 /* Fix address errors in software */
109#define TIF_LOGADE 21 /* Log address errors to syslog */ 108#define TIF_LOGADE 21 /* Log address errors to syslog */
@@ -126,7 +125,6 @@ register struct thread_info *__current_thread_info __asm__("$28");
126#define _TIF_SECCOMP (1<<TIF_SECCOMP) 125#define _TIF_SECCOMP (1<<TIF_SECCOMP)
127#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 126#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
128#define _TIF_USEDFPU (1<<TIF_USEDFPU) 127#define _TIF_USEDFPU (1<<TIF_USEDFPU)
129#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
130#define _TIF_FIXADE (1<<TIF_FIXADE) 128#define _TIF_FIXADE (1<<TIF_FIXADE)
131#define _TIF_LOGADE (1<<TIF_LOGADE) 129#define _TIF_LOGADE (1<<TIF_LOGADE)
132#define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) 130#define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS)
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h
index 224b4262486d..f90062b0622d 100644
--- a/arch/mn10300/include/asm/thread_info.h
+++ b/arch/mn10300/include/asm/thread_info.h
@@ -165,6 +165,8 @@ void arch_release_thread_info(struct thread_info *ti);
165#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 165#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
166#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 166#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
167 167
168#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
169
168#endif /* __KERNEL__ */ 170#endif /* __KERNEL__ */
169 171
170#endif /* _ASM_THREAD_INFO_H */ 172#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/openrisc/include/asm/thread_info.h b/arch/openrisc/include/asm/thread_info.h
index d797acc901e4..07f3212422ad 100644
--- a/arch/openrisc/include/asm/thread_info.h
+++ b/arch/openrisc/include/asm/thread_info.h
@@ -128,6 +128,8 @@ register struct thread_info *current_thread_info_reg asm("r10");
128/* For OpenRISC, this is anything in the LSW other than syscall trace */ 128/* For OpenRISC, this is anything in the LSW other than syscall trace */
129#define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP)) 129#define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP))
130 130
131#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
132
131#endif /* __KERNEL__ */ 133#endif /* __KERNEL__ */
132 134
133#endif /* _ASM_THREAD_INFO_H */ 135#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index 255630808d63..d0e2fe7d54a6 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -75,6 +75,8 @@ struct thread_info {
75#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ 75#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \
76 _TIF_NEED_RESCHED) 76 _TIF_NEED_RESCHED)
77 77
78#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
79
78#endif /* __KERNEL__ */ 80#endif /* __KERNEL__ */
79 81
80#endif /* _ASM_PARISC_THREAD_INFO_H */ 82#endif /* _ASM_PARISC_THREAD_INFO_H */
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
index faf93529cbf0..5b1974f651c0 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -177,6 +177,8 @@ static inline bool test_thread_local_flags(unsigned int flags)
177#define is_32bit_task() (1) 177#define is_32bit_task() (1)
178#endif 178#endif
179 179
180#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
181
180#endif /* !__ASSEMBLY__ */ 182#endif /* !__ASSEMBLY__ */
181 183
182#endif /* __KERNEL__ */ 184#endif /* __KERNEL__ */
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h
index 4b4f6ffc8611..9e2cfe0349c3 100644
--- a/arch/s390/include/asm/thread_info.h
+++ b/arch/s390/include/asm/thread_info.h
@@ -91,8 +91,6 @@ static inline struct thread_info *current_thread_info(void)
91#define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ 91#define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */
92#define TIF_SECCOMP 10 /* secure computing */ 92#define TIF_SECCOMP 10 /* secure computing */
93#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ 93#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */
94#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling
95 TIF_NEED_RESCHED */
96#define TIF_31BIT 17 /* 32bit process */ 94#define TIF_31BIT 17 /* 32bit process */
97#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 95#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
98#define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ 96#define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */
@@ -108,7 +106,6 @@ static inline struct thread_info *current_thread_info(void)
108#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 106#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
109#define _TIF_SECCOMP (1<<TIF_SECCOMP) 107#define _TIF_SECCOMP (1<<TIF_SECCOMP)
110#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) 108#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
111#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
112#define _TIF_31BIT (1<<TIF_31BIT) 109#define _TIF_31BIT (1<<TIF_31BIT)
113#define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) 110#define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP)
114 111
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h
index 9322a9190286..1425cc034872 100644
--- a/arch/score/include/asm/thread_info.h
+++ b/arch/score/include/asm/thread_info.h
@@ -86,15 +86,12 @@ register struct thread_info *__current_thread_info __asm__("r28");
86#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 86#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
87#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ 87#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
88#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ 88#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
89#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
90 TIF_NEED_RESCHED */
91#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 89#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
92 90
93#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 91#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
94#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 92#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
95#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 93#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
96#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 94#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
97#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
98 95
99#define _TIF_WORK_MASK (0x0000ffff) 96#define _TIF_WORK_MASK (0x0000ffff)
100 97
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h
index bc13b57cdc83..7d5ac4e48485 100644
--- a/arch/sh/include/asm/thread_info.h
+++ b/arch/sh/include/asm/thread_info.h
@@ -206,6 +206,9 @@ static inline bool test_and_clear_restore_sigmask(void)
206 ti->status &= ~TS_RESTORE_SIGMASK; 206 ti->status &= ~TS_RESTORE_SIGMASK;
207 return true; 207 return true;
208} 208}
209
210#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
211
209#endif /* !__ASSEMBLY__ */ 212#endif /* !__ASSEMBLY__ */
210 213
211#endif /* __KERNEL__ */ 214#endif /* __KERNEL__ */
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
index dd3807599bb9..25849ae3e900 100644
--- a/arch/sparc/include/asm/thread_info_32.h
+++ b/arch/sparc/include/asm/thread_info_32.h
@@ -132,6 +132,8 @@ register struct thread_info *current_thread_info_reg asm("g6");
132#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ 132#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
133 _TIF_SIGPENDING) 133 _TIF_SIGPENDING)
134 134
135#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
136
135#endif /* __KERNEL__ */ 137#endif /* __KERNEL__ */
136 138
137#endif /* _ASM_THREAD_INFO_H */ 139#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index cfa8c38fb9c8..4e2276631081 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -256,6 +256,9 @@ static inline bool test_and_clear_restore_sigmask(void)
256 ti->status &= ~TS_RESTORE_SIGMASK; 256 ti->status &= ~TS_RESTORE_SIGMASK;
257 return true; 257 return true;
258} 258}
259
260#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
261
259#endif /* !__ASSEMBLY__ */ 262#endif /* !__ASSEMBLY__ */
260 263
261#endif /* __KERNEL__ */ 264#endif /* __KERNEL__ */
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h
index c04e5ab68f56..2c8eeb2df8b4 100644
--- a/arch/um/include/asm/thread_info.h
+++ b/arch/um/include/asm/thread_info.h
@@ -65,8 +65,6 @@ static inline struct thread_info *current_thread_info(void)
65#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 65#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
66#define TIF_SIGPENDING 1 /* signal pending */ 66#define TIF_SIGPENDING 1 /* signal pending */
67#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 67#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
68#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
69 * TIF_NEED_RESCHED */
70#define TIF_RESTART_BLOCK 4 68#define TIF_RESTART_BLOCK 4
71#define TIF_MEMDIE 5 /* is terminating due to OOM killer */ 69#define TIF_MEMDIE 5 /* is terminating due to OOM killer */
72#define TIF_SYSCALL_AUDIT 6 70#define TIF_SYSCALL_AUDIT 6
@@ -76,7 +74,6 @@ static inline struct thread_info *current_thread_info(void)
76#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 74#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
77#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 75#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
78#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 76#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
79#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
80#define _TIF_MEMDIE (1 << TIF_MEMDIE) 77#define _TIF_MEMDIE (1 << TIF_MEMDIE)
81#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 78#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
82 79
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h
index a27bc8ce5eff..214be732b2b2 100644
--- a/arch/xtensa/include/asm/thread_info.h
+++ b/arch/xtensa/include/asm/thread_info.h
@@ -132,14 +132,12 @@ static inline struct thread_info *current_thread_info(void)
132#define TIF_MEMDIE 5 /* is terminating due to OOM killer */ 132#define TIF_MEMDIE 5 /* is terminating due to OOM killer */
133#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ 133#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
134#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ 134#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
135#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
136 135
137#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 136#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
138#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 137#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
139#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 138#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
140#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 139#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
141#define _TIF_IRET (1<<TIF_IRET) 140#define _TIF_IRET (1<<TIF_IRET)
142#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
143 141
144#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 142#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
145#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 143#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */