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) <[email protected]>

> 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

Reply via email to