Files
linux/arch/x86/include/asm
Heiko Carstens c8061485a0 sched/core, x86: Make struct thread_info arch specific again
The following commit:

  c65eacbe29 ("sched/core: Allow putting thread_info into task_struct")

... made 'struct thread_info' a generic struct with only a
single ::flags member, if CONFIG_THREAD_INFO_IN_TASK_STRUCT=y is
selected.

This change however seems to be quite x86 centric, since at least the
generic preemption code (asm-generic/preempt.h) assumes that struct
thread_info also has a preempt_count member, which apparently was not
true for x86.

We could add a bit more #ifdefs to solve this problem too, but it seems
to be much simpler to make struct thread_info arch specific
again. This also makes the conversion to THREAD_INFO_IN_TASK_STRUCT a
bit easier for architectures that have a couple of arch specific stuff
in their thread_info definition.

The arch specific stuff _could_ be moved to thread_struct. However
keeping them in thread_info makes it easier: accessing thread_info
members is simple, since it is at the beginning of the task_struct,
while the thread_struct is at the end. At least on s390 the offsets
needed to access members of the thread_struct (with task_struct as
base) are too large for various asm instructions.  This is not a
problem when keeping these members within thread_info.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: keescook@chromium.org
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/1476901693-8492-2-git-send-email-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-10-20 13:27:47 +02:00
..
2016-07-25 13:41:01 +02:00
2014-12-11 11:35:02 +01:00
2015-05-28 15:31:53 +02:00
2016-01-20 11:39:14 +01:00
2014-03-04 21:47:51 +01:00
2015-10-21 11:17:32 +02:00
2015-04-24 15:36:55 +02:00
2012-06-25 13:48:30 +02:00
2016-08-18 18:41:27 +02:00
2016-09-20 09:26:20 +02:00
2016-01-12 12:17:28 +01:00
2015-07-31 13:31:10 +02:00
2016-09-09 13:02:27 +02:00
2014-02-27 08:07:39 -08:00
2015-12-19 11:53:40 +01:00
2016-09-22 12:14:29 -04:00
2014-09-01 10:15:31 +02:00
2016-09-05 11:47:31 +02:00
2016-09-20 09:26:15 +02:00
2015-05-19 15:47:30 +02:00
2016-01-30 11:22:17 +01:00
2016-09-05 11:47:31 +02:00
2016-06-16 00:04:31 +02:00
2015-07-31 13:31:10 +02:00
2016-06-16 00:04:31 +02:00
2016-07-23 11:04:23 -07:00
2015-05-19 15:47:30 +02:00