diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-07-10 08:57:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-10 17:24:05 -0400 |
commit | c99e6efe1ba04561e7d93a81f0be07e37427e835 (patch) | |
tree | 8a1743463ef9676e68b9c3971f0bbeea04111bdd /arch/sparc/include | |
parent | 2a6f86bc5ed4af2ff04bc927eb77789c70e53a1e (diff) |
sched: INIT_PREEMPT_COUNT
Pull the initial preempt_count value into a single
definition site.
Maintainers for: alpha, ia64 and m68k, please have a look,
your arch code is funny.
The header magic is a bit odd, but similar to the KERNEL_DS
one, CPP waits with expanding these macros until the
INIT_THREAD_INFO macro itself is expanded, which is in
arch/*/kernel/init_task.c where we've already included
sched.h so we're good.
Cc: tony.luck@intel.com
Cc: rth@twiddle.net
Cc: geert@linux-m68k.org
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/thread_info_32.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_64.h | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 0f7b0e5fb1c7..844d73a0340c 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -54,8 +54,6 @@ struct thread_info { | |||
54 | 54 | ||
55 | /* | 55 | /* |
56 | * macros/functions for gaining access to the thread information structure | 56 | * macros/functions for gaining access to the thread information structure |
57 | * | ||
58 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
59 | */ | 57 | */ |
60 | #define INIT_THREAD_INFO(tsk) \ | 58 | #define INIT_THREAD_INFO(tsk) \ |
61 | { \ | 59 | { \ |
@@ -64,7 +62,7 @@ struct thread_info { | |||
64 | .exec_domain = &default_exec_domain, \ | 62 | .exec_domain = &default_exec_domain, \ |
65 | .flags = 0, \ | 63 | .flags = 0, \ |
66 | .cpu = 0, \ | 64 | .cpu = 0, \ |
67 | .preempt_count = 1, \ | 65 | .preempt_count = INIT_PREEMPT_COUNT, \ |
68 | .restart_block = { \ | 66 | .restart_block = { \ |
69 | .fn = do_no_restart_syscall, \ | 67 | .fn = do_no_restart_syscall, \ |
70 | }, \ | 68 | }, \ |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 65865726b283..1b45a7bbe407 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -125,8 +125,6 @@ struct thread_info { | |||
125 | 125 | ||
126 | /* | 126 | /* |
127 | * macros/functions for gaining access to the thread information structure | 127 | * macros/functions for gaining access to the thread information structure |
128 | * | ||
129 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
130 | */ | 128 | */ |
131 | #ifndef __ASSEMBLY__ | 129 | #ifndef __ASSEMBLY__ |
132 | 130 | ||
@@ -135,7 +133,7 @@ struct thread_info { | |||
135 | .task = &tsk, \ | 133 | .task = &tsk, \ |
136 | .flags = ((unsigned long)ASI_P) << TI_FLAG_CURRENT_DS_SHIFT, \ | 134 | .flags = ((unsigned long)ASI_P) << TI_FLAG_CURRENT_DS_SHIFT, \ |
137 | .exec_domain = &default_exec_domain, \ | 135 | .exec_domain = &default_exec_domain, \ |
138 | .preempt_count = 1, \ | 136 | .preempt_count = INIT_PREEMPT_COUNT, \ |
139 | .restart_block = { \ | 137 | .restart_block = { \ |
140 | .fn = do_no_restart_syscall, \ | 138 | .fn = do_no_restart_syscall, \ |
141 | }, \ | 139 | }, \ |