Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99e6efe authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds
Browse files

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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2a6f86bc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ struct thread_info {
	.task		= &tsk,			\
	.exec_domain	= &default_exec_domain,	\
	.addr_limit	= KERNEL_DS,		\
	.preempt_count	= INIT_PREEMPT_COUNT,	\
	.restart_block = {			\
		.fn = do_no_restart_syscall,	\
	},					\
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ struct thread_info {
	.task		= &tsk,						\
	.exec_domain	= &default_exec_domain,				\
	.flags		= 0,						\
	.preempt_count	= 1,						\
	.preempt_count	= INIT_PREEMPT_COUNT,				\
	.addr_limit	= KERNEL_DS,					\
	.cpu_domain	= domain_val(DOMAIN_USER, DOMAIN_MANAGER) |	\
			  domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) |	\
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ struct thread_info {
	.exec_domain	= &default_exec_domain,				\
	.flags		= 0,						\
	.cpu		= 0,						\
	.preempt_count	= 1,						\
	.preempt_count	= INIT_PREEMPT_COUNT,				\
	.restart_block	= {						\
		.fn	= do_no_restart_syscall				\
	}								\
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ struct thread_info {
	.exec_domain	= &default_exec_domain,	\
	.flags		= 0,			\
	.cpu		= 0,			\
	.preempt_count  = 1,                    \
	.preempt_count  = INIT_PREEMPT_COUNT,   \
	.restart_block	= {			\
		.fn = do_no_restart_syscall,	\
	},					\
+1 −3
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ struct thread_info {

/*
 * macros/functions for gaining access to the thread information structure
 *
 * preempt_count needs to be 1 initially, until the scheduler is functional.
 */
#ifndef __ASSEMBLY__
#define INIT_THREAD_INFO(tsk)				\
@@ -60,7 +58,7 @@ struct thread_info {
	.exec_domain	= &default_exec_domain,		\
	.flags		= 0,				\
	.cpu		= 0,				\
	.preempt_count	= 1,				\
	.preempt_count	= INIT_PREEMPT_COUNT,		\
	.addr_limit	= KERNEL_DS,			\
	.restart_block = {				\
		       .fn = do_no_restart_syscall,	\
Loading