aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/include/asm/thread_info.h2
-rw-r--r--arch/arc/include/asm/thread_info.h2
-rw-r--r--arch/arm/include/asm/thread_info.h6
-rw-r--r--arch/arm64/include/asm/thread_info.h6
-rw-r--r--arch/avr32/include/asm/thread_info.h2
-rw-r--r--arch/blackfin/include/asm/thread_info.h2
-rw-r--r--arch/c6x/include/asm/thread_info.h2
-rw-r--r--arch/cris/include/asm/thread_info.h2
-rw-r--r--arch/frv/include/asm/thread_info.h2
-rw-r--r--arch/hexagon/include/asm/thread_info.h4
-rw-r--r--arch/ia64/include/asm/thread_info.h3
-rw-r--r--arch/m32r/include/asm/thread_info.h2
-rw-r--r--arch/m68k/include/asm/thread_info.h2
-rw-r--r--arch/metag/include/asm/thread_info.h2
-rw-r--r--arch/microblaze/include/asm/thread_info.h2
-rw-r--r--arch/mips/include/asm/thread_info.h2
-rw-r--r--arch/mn10300/include/asm/thread_info.h2
-rw-r--r--arch/parisc/include/asm/thread_info.h3
-rw-r--r--arch/powerpc/include/asm/thread_info.h2
-rw-r--r--arch/s390/include/asm/thread_info.h2
-rw-r--r--arch/score/include/asm/thread_info.h2
-rw-r--r--arch/sh/include/asm/thread_info.h2
-rw-r--r--arch/sh/kernel/entry-common.S6
-rw-r--r--arch/sparc/include/asm/thread_info_32.h2
-rw-r--r--arch/sparc/include/asm/thread_info_64.h2
-rw-r--r--arch/tile/include/asm/thread_info.h2
-rw-r--r--arch/um/include/asm/thread_info.h2
-rw-r--r--arch/unicore32/include/asm/thread_info.h6
-rw-r--r--arch/x86/include/asm/thread_info.h2
-rw-r--r--arch/xtensa/include/asm/thread_info.h2
-rw-r--r--include/linux/preempt_mask.h15
-rw-r--r--include/linux/sched.h2
32 files changed, 8 insertions, 89 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index 52cd2a4a3ff4..453597b91f3a 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -58,8 +58,6 @@ register struct thread_info *__current_thread_info __asm__("$8");
58#define THREAD_SIZE_ORDER 1 58#define THREAD_SIZE_ORDER 1
59#define THREAD_SIZE (2*PAGE_SIZE) 59#define THREAD_SIZE (2*PAGE_SIZE)
60 60
61#define PREEMPT_ACTIVE 0x40000000
62
63/* 61/*
64 * Thread information flags: 62 * Thread information flags:
65 * - these are process state flags and used from assembly 63 * - these are process state flags and used from assembly
diff --git a/arch/arc/include/asm/thread_info.h b/arch/arc/include/asm/thread_info.h
index 2d50a4cdd7f3..45be21672011 100644
--- a/arch/arc/include/asm/thread_info.h
+++ b/arch/arc/include/asm/thread_info.h
@@ -80,8 +80,6 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
80 80
81#endif /* !__ASSEMBLY__ */ 81#endif /* !__ASSEMBLY__ */
82 82
83#define PREEMPT_ACTIVE 0x10000000
84
85/* 83/*
86 * thread information flags 84 * thread information flags
87 * - these are process state flags that various assembly files may need to 85 * - these are process state flags that various assembly files may need to
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index df5e13d64f2c..71a06b293489 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -141,12 +141,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
141#endif 141#endif
142 142
143/* 143/*
144 * We use bit 30 of the preempt_count to indicate that kernel
145 * preemption is occurring. See <asm/hardirq.h>.
146 */
147#define PREEMPT_ACTIVE 0x40000000
148
149/*
150 * thread information flags: 144 * thread information flags:
151 * TIF_SYSCALL_TRACE - syscall trace active 145 * TIF_SYSCALL_TRACE - syscall trace active
152 * TIF_SYSCAL_AUDIT - syscall auditing active 146 * TIF_SYSCAL_AUDIT - syscall auditing active
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 23a3c4791d86..720e70b66ffd 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -89,12 +89,6 @@ static inline struct thread_info *current_thread_info(void)
89#endif 89#endif
90 90
91/* 91/*
92 * We use bit 30 of the preempt_count to indicate that kernel
93 * preemption is occurring. See <asm/hardirq.h>.
94 */
95#define PREEMPT_ACTIVE 0x40000000
96
97/*
98 * thread information flags: 92 * thread information flags:
99 * TIF_SYSCALL_TRACE - syscall trace active 93 * TIF_SYSCALL_TRACE - syscall trace active
100 * TIF_SIGPENDING - signal pending 94 * TIF_SIGPENDING - signal pending
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h
index 6dc62e1f94c7..a978f3fe7c25 100644
--- a/arch/avr32/include/asm/thread_info.h
+++ b/arch/avr32/include/asm/thread_info.h
@@ -66,8 +66,6 @@ static inline struct thread_info *current_thread_info(void)
66 66
67#endif /* !__ASSEMBLY__ */ 67#endif /* !__ASSEMBLY__ */
68 68
69#define PREEMPT_ACTIVE 0x40000000
70
71/* 69/*
72 * Thread information flags 70 * Thread information flags
73 * - these are process state flags that various assembly files may need to access 71 * - these are process state flags that various assembly files may need to access
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h
index 3894005337ba..55f473bdad36 100644
--- a/arch/blackfin/include/asm/thread_info.h
+++ b/arch/blackfin/include/asm/thread_info.h
@@ -88,8 +88,6 @@ static inline struct thread_info *current_thread_info(void)
88#define TI_CPU 12 88#define TI_CPU 12
89#define TI_PREEMPT 16 89#define TI_PREEMPT 16
90 90
91#define PREEMPT_ACTIVE 0x4000000
92
93/* 91/*
94 * thread information flag bit numbers 92 * thread information flag bit numbers
95 */ 93 */
diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h
index 4c8dc562bd90..d4e9ef87076d 100644
--- a/arch/c6x/include/asm/thread_info.h
+++ b/arch/c6x/include/asm/thread_info.h
@@ -84,8 +84,6 @@ struct thread_info *current_thread_info(void)
84#define put_thread_info(ti) put_task_struct((ti)->task) 84#define put_thread_info(ti) put_task_struct((ti)->task)
85#endif /* __ASSEMBLY__ */ 85#endif /* __ASSEMBLY__ */
86 86
87#define PREEMPT_ACTIVE 0x10000000
88
89/* 87/*
90 * thread information flag bit numbers 88 * thread information flag bit numbers
91 * - pending work-to-be-done flags are in LSW 89 * - pending work-to-be-done flags are in LSW
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h
index 07c8c40c52b3..55dede18c032 100644
--- a/arch/cris/include/asm/thread_info.h
+++ b/arch/cris/include/asm/thread_info.h
@@ -44,8 +44,6 @@ struct thread_info {
44 44
45#endif 45#endif
46 46
47#define PREEMPT_ACTIVE 0x10000000
48
49/* 47/*
50 * macros/functions for gaining access to the thread information structure 48 * macros/functions for gaining access to the thread information structure
51 */ 49 */
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h
index bebd7eadc772..af29e17c0181 100644
--- a/arch/frv/include/asm/thread_info.h
+++ b/arch/frv/include/asm/thread_info.h
@@ -52,8 +52,6 @@ struct thread_info {
52 52
53#endif 53#endif
54 54
55#define PREEMPT_ACTIVE 0x10000000
56
57/* 55/*
58 * macros/functions for gaining access to the thread information structure 56 * macros/functions for gaining access to the thread information structure
59 */ 57 */
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
index f7c32406a711..a59dad3b3695 100644
--- a/arch/hexagon/include/asm/thread_info.h
+++ b/arch/hexagon/include/asm/thread_info.h
@@ -73,10 +73,6 @@ struct thread_info {
73 73
74#endif /* __ASSEMBLY__ */ 74#endif /* __ASSEMBLY__ */
75 75
76/* looks like "linux/hardirq.h" uses this. */
77
78#define PREEMPT_ACTIVE 0x10000000
79
80#ifndef __ASSEMBLY__ 76#ifndef __ASSEMBLY__
81 77
82#define INIT_THREAD_INFO(tsk) \ 78#define INIT_THREAD_INFO(tsk) \
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h
index cade13dd0299..5957cf61f898 100644
--- a/arch/ia64/include/asm/thread_info.h
+++ b/arch/ia64/include/asm/thread_info.h
@@ -11,9 +11,6 @@
11#include <asm/processor.h> 11#include <asm/processor.h>
12#include <asm/ptrace.h> 12#include <asm/ptrace.h>
13 13
14#define PREEMPT_ACTIVE_BIT 30
15#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
16
17#ifndef __ASSEMBLY__ 14#ifndef __ASSEMBLY__
18 15
19/* 16/*
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h
index c074f4c2e858..00171703402f 100644
--- a/arch/m32r/include/asm/thread_info.h
+++ b/arch/m32r/include/asm/thread_info.h
@@ -53,8 +53,6 @@ struct thread_info {
53 53
54#endif 54#endif
55 55
56#define PREEMPT_ACTIVE 0x10000000
57
58#define THREAD_SIZE (PAGE_SIZE << 1) 56#define THREAD_SIZE (PAGE_SIZE << 1)
59#define THREAD_SIZE_ORDER 1 57#define THREAD_SIZE_ORDER 1
60/* 58/*
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
index 126131f94a2c..21a4784ca5a1 100644
--- a/arch/m68k/include/asm/thread_info.h
+++ b/arch/m68k/include/asm/thread_info.h
@@ -35,8 +35,6 @@ struct thread_info {
35}; 35};
36#endif /* __ASSEMBLY__ */ 36#endif /* __ASSEMBLY__ */
37 37
38#define PREEMPT_ACTIVE 0x4000000
39
40#define INIT_THREAD_INFO(tsk) \ 38#define INIT_THREAD_INFO(tsk) \
41{ \ 39{ \
42 .task = &tsk, \ 40 .task = &tsk, \
diff --git a/arch/metag/include/asm/thread_info.h b/arch/metag/include/asm/thread_info.h
index 7c4a33006142..b19e9c588a16 100644
--- a/arch/metag/include/asm/thread_info.h
+++ b/arch/metag/include/asm/thread_info.h
@@ -46,8 +46,6 @@ struct thread_info {
46 46
47#endif 47#endif
48 48
49#define PREEMPT_ACTIVE 0x10000000
50
51#ifdef CONFIG_4KSTACKS 49#ifdef CONFIG_4KSTACKS
52#define THREAD_SHIFT 12 50#define THREAD_SHIFT 12
53#else 51#else
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
index de26ea6373de..8c9d36591a03 100644
--- a/arch/microblaze/include/asm/thread_info.h
+++ b/arch/microblaze/include/asm/thread_info.h
@@ -106,8 +106,6 @@ static inline struct thread_info *current_thread_info(void)
106/* thread information allocation */ 106/* thread information allocation */
107#endif /* __ASSEMBLY__ */ 107#endif /* __ASSEMBLY__ */
108 108
109#define PREEMPT_ACTIVE 0x10000000
110
111/* 109/*
112 * thread information flags 110 * thread information flags
113 * - these are process state flags that various assembly files may 111 * - these are process state flags that various assembly files may
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index f9b24bfbdbae..4f58ef6d0eed 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -92,8 +92,6 @@ static inline struct thread_info *current_thread_info(void)
92 92
93#define STACK_WARN (THREAD_SIZE / 8) 93#define STACK_WARN (THREAD_SIZE / 8)
94 94
95#define PREEMPT_ACTIVE 0x10000000
96
97/* 95/*
98 * thread information flags 96 * thread information flags
99 * - these are process state flags that various assembly files may need to 97 * - these are process state flags that various assembly files may need to
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h
index 224b4262486d..bf280eaccd36 100644
--- a/arch/mn10300/include/asm/thread_info.h
+++ b/arch/mn10300/include/asm/thread_info.h
@@ -16,8 +16,6 @@
16 16
17#include <asm/page.h> 17#include <asm/page.h>
18 18
19#define PREEMPT_ACTIVE 0x10000000
20
21#ifdef CONFIG_4KSTACKS 19#ifdef CONFIG_4KSTACKS
22#define THREAD_SIZE (4096) 20#define THREAD_SIZE (4096)
23#define THREAD_SIZE_ORDER (0) 21#define THREAD_SIZE_ORDER (0)
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index bc7cf120106b..d5f97ea3a4e1 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -46,9 +46,6 @@ struct thread_info {
46#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 46#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
47#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER) 47#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
48 48
49#define PREEMPT_ACTIVE_BIT 28
50#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
51
52/* 49/*
53 * thread information flags 50 * thread information flags
54 */ 51 */
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
index ba7b1973866e..8fd6cf6dcee8 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -82,8 +82,6 @@ static inline struct thread_info *current_thread_info(void)
82 82
83#endif /* __ASSEMBLY__ */ 83#endif /* __ASSEMBLY__ */
84 84
85#define PREEMPT_ACTIVE 0x10000000
86
87/* 85/*
88 * thread information flag bit numbers 86 * thread information flag bit numbers
89 */ 87 */
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h
index eb5f64d26d06..10e0fcd3633d 100644
--- a/arch/s390/include/asm/thread_info.h
+++ b/arch/s390/include/asm/thread_info.h
@@ -111,6 +111,4 @@ static inline struct thread_info *current_thread_info(void)
111#define is_32bit_task() (1) 111#define is_32bit_task() (1)
112#endif 112#endif
113 113
114#define PREEMPT_ACTIVE 0x4000000
115
116#endif /* _ASM_THREAD_INFO_H */ 114#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h
index 1425cc034872..656b7ada9326 100644
--- a/arch/score/include/asm/thread_info.h
+++ b/arch/score/include/asm/thread_info.h
@@ -72,8 +72,6 @@ register struct thread_info *__current_thread_info __asm__("r28");
72 72
73#endif /* !__ASSEMBLY__ */ 73#endif /* !__ASSEMBLY__ */
74 74
75#define PREEMPT_ACTIVE 0x10000000
76
77/* 75/*
78 * thread information flags 76 * thread information flags
79 * - these are process state flags that various assembly files may need to 77 * - these are process state flags that various assembly files may need to
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h
index 45a93669289d..ad27ffa65e2e 100644
--- a/arch/sh/include/asm/thread_info.h
+++ b/arch/sh/include/asm/thread_info.h
@@ -41,8 +41,6 @@ struct thread_info {
41 41
42#endif 42#endif
43 43
44#define PREEMPT_ACTIVE 0x10000000
45
46#if defined(CONFIG_4KSTACKS) 44#if defined(CONFIG_4KSTACKS)
47#define THREAD_SHIFT 12 45#define THREAD_SHIFT 12
48#else 46#else
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index 9b6e4beeb296..ca46834294b7 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -108,7 +108,7 @@ need_resched:
108 and #(0xf0>>1), r0 ! interrupts off (exception path)? 108 and #(0xf0>>1), r0 ! interrupts off (exception path)?
109 cmp/eq #(0xf0>>1), r0 109 cmp/eq #(0xf0>>1), r0
110 bt noresched 110 bt noresched
111 mov.l 3f, r0 111 mov.l 1f, r0
112 jsr @r0 ! call preempt_schedule_irq 112 jsr @r0 ! call preempt_schedule_irq
113 nop 113 nop
114 bra need_resched 114 bra need_resched
@@ -119,9 +119,7 @@ noresched:
119 nop 119 nop
120 120
121 .align 2 121 .align 2
1221: .long PREEMPT_ACTIVE 1221: .long preempt_schedule_irq
1232: .long schedule
1243: .long preempt_schedule_irq
125#endif 123#endif
126 124
127ENTRY(resume_userspace) 125ENTRY(resume_userspace)
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
index dd3807599bb9..96efa7adc223 100644
--- a/arch/sparc/include/asm/thread_info_32.h
+++ b/arch/sparc/include/asm/thread_info_32.h
@@ -105,8 +105,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
105#define TI_W_SAVED 0x250 105#define TI_W_SAVED 0x250
106/* #define TI_RESTART_BLOCK 0x25n */ /* Nobody cares */ 106/* #define TI_RESTART_BLOCK 0x25n */ /* Nobody cares */
107 107
108#define PREEMPT_ACTIVE 0x4000000
109
110/* 108/*
111 * thread information flag bit numbers 109 * thread information flag bit numbers
112 */ 110 */
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index d5e504251079..2b4e17b79e9c 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -111,8 +111,6 @@ struct thread_info {
111#define THREAD_SHIFT PAGE_SHIFT 111#define THREAD_SHIFT PAGE_SHIFT
112#endif /* PAGE_SHIFT == 13 */ 112#endif /* PAGE_SHIFT == 13 */
113 113
114#define PREEMPT_ACTIVE 0x10000000
115
116/* 114/*
117 * macros/functions for gaining access to the thread information structure 115 * macros/functions for gaining access to the thread information structure
118 */ 116 */
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h
index b8aa6df3e102..729aa107f64e 100644
--- a/arch/tile/include/asm/thread_info.h
+++ b/arch/tile/include/asm/thread_info.h
@@ -113,8 +113,6 @@ extern void _cpu_idle(void);
113 113
114#endif /* !__ASSEMBLY__ */ 114#endif /* !__ASSEMBLY__ */
115 115
116#define PREEMPT_ACTIVE 0x10000000
117
118/* 116/*
119 * Thread information flags that various assembly files may need to access. 117 * Thread information flags that various assembly files may need to access.
120 * Keep flags accessed frequently in low bits, particular since it makes 118 * Keep flags accessed frequently in low bits, particular since it makes
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h
index 2c8eeb2df8b4..1c5b2a83046a 100644
--- a/arch/um/include/asm/thread_info.h
+++ b/arch/um/include/asm/thread_info.h
@@ -60,8 +60,6 @@ static inline struct thread_info *current_thread_info(void)
60 60
61#endif 61#endif
62 62
63#define PREEMPT_ACTIVE 0x10000000
64
65#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 63#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
66#define TIF_SIGPENDING 1 /* signal pending */ 64#define TIF_SIGPENDING 1 /* signal pending */
67#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 65#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
diff --git a/arch/unicore32/include/asm/thread_info.h b/arch/unicore32/include/asm/thread_info.h
index 818b4a1edb5b..af36d8eabdf1 100644
--- a/arch/unicore32/include/asm/thread_info.h
+++ b/arch/unicore32/include/asm/thread_info.h
@@ -118,12 +118,6 @@ static inline struct thread_info *current_thread_info(void)
118#endif 118#endif
119 119
120/* 120/*
121 * We use bit 30 of the preempt_count to indicate that kernel
122 * preemption is occurring. See <asm/hardirq.h>.
123 */
124#define PREEMPT_ACTIVE 0x40000000
125
126/*
127 * thread information flags: 121 * thread information flags:
128 * TIF_SYSCALL_TRACE - syscall trace active 122 * TIF_SYSCALL_TRACE - syscall trace active
129 * TIF_SIGPENDING - signal pending 123 * TIF_SIGPENDING - signal pending
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index c46a46be1ec6..3ba3de457d05 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -153,8 +153,6 @@ struct thread_info {
153#define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY) 153#define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY)
154#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) 154#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW)
155 155
156#define PREEMPT_ACTIVE 0x10000000
157
158#ifdef CONFIG_X86_32 156#ifdef CONFIG_X86_32
159 157
160#define STACK_WARN (THREAD_SIZE/8) 158#define STACK_WARN (THREAD_SIZE/8)
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h
index 9481004ac119..470153e8547c 100644
--- a/arch/xtensa/include/asm/thread_info.h
+++ b/arch/xtensa/include/asm/thread_info.h
@@ -76,8 +76,6 @@ struct thread_info {
76 76
77#endif 77#endif
78 78
79#define PREEMPT_ACTIVE 0x10000000
80
81/* 79/*
82 * macros/functions for gaining access to the thread information structure 80 * macros/functions for gaining access to the thread information structure
83 */ 81 */
diff --git a/include/linux/preempt_mask.h b/include/linux/preempt_mask.h
index 810d7e386f20..d169820203dd 100644
--- a/include/linux/preempt_mask.h
+++ b/include/linux/preempt_mask.h
@@ -17,10 +17,11 @@
17 * there are a few palaeontologic drivers which reenable interrupts in 17 * there are a few palaeontologic drivers which reenable interrupts in
18 * the handler, so we need more than one bit here. 18 * the handler, so we need more than one bit here.
19 * 19 *
20 * PREEMPT_MASK: 0x000000ff 20 * PREEMPT_MASK: 0x000000ff
21 * SOFTIRQ_MASK: 0x0000ff00 21 * SOFTIRQ_MASK: 0x0000ff00
22 * HARDIRQ_MASK: 0x000f0000 22 * HARDIRQ_MASK: 0x000f0000
23 * NMI_MASK: 0x00100000 23 * NMI_MASK: 0x00100000
24 * PREEMPT_ACTIVE: 0x00200000
24 */ 25 */
25#define PREEMPT_BITS 8 26#define PREEMPT_BITS 8
26#define SOFTIRQ_BITS 8 27#define SOFTIRQ_BITS 8
@@ -46,15 +47,9 @@
46 47
47#define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET) 48#define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET)
48 49
49#ifndef PREEMPT_ACTIVE
50#define PREEMPT_ACTIVE_BITS 1 50#define PREEMPT_ACTIVE_BITS 1
51#define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS) 51#define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS)
52#define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << PREEMPT_ACTIVE_SHIFT) 52#define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << PREEMPT_ACTIVE_SHIFT)
53#endif
54
55#if PREEMPT_ACTIVE < (1 << (NMI_SHIFT + NMI_BITS))
56#error PREEMPT_ACTIVE is too low!
57#endif
58 53
59#define hardirq_count() (preempt_count() & HARDIRQ_MASK) 54#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
60#define softirq_count() (preempt_count() & SOFTIRQ_MASK) 55#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 045b0d227846..55080df48b70 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -22,7 +22,7 @@ struct sched_param {
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/nodemask.h> 23#include <linux/nodemask.h>
24#include <linux/mm_types.h> 24#include <linux/mm_types.h>
25#include <linux/preempt.h> 25#include <linux/preempt_mask.h>
26 26
27#include <asm/page.h> 27#include <asm/page.h>
28#include <asm/ptrace.h> 28#include <asm/ptrace.h>