lkml.org 
[lkml]   [2020]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init: Align init_task to avoid conflict with MUTEX_FLAGS
On Fri, Jun 26, 2020 at 08:45:22PM +0900, Stafford Horne wrote:

> I think we can make this unconditional. The only reason I used the condition is
> because the only architecture that sets CONFIG_ARCH_TASK_STRUCT_ON_STACK is ia64
> which already has 64-bit alignment.
>
> I can change it to (not incorporating max_t(ARCH_MIN_TASKALIGN) as not sure how):

The only arch that has ARCH_MIN_TASKALIGN larger than L1_CACHE_SIZE is
some daft x86 config and it shouldn't be fatal to them.

So with this:

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

> diff --git a/init/init_task.c b/init/init_task.c
> index 15089d15010a..ab6173f8e6a8 100644
> --- a/init/init_task.c
> +++ b/init/init_task.c
> @@ -65,6 +65,7 @@ struct task_struct init_task
> #ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
> __init_task_data
> #endif
> + __aligned(L1_CACHE_BYTES)
> = {
> #ifdef CONFIG_THREAD_INFO_IN_TASK
> .thread_info = INIT_THREAD_INFO(init_task),
>
> -Stafford

\
 
 \ /
  Last update: 2020-06-26 15:12    [W:0.040 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site