lkml.org 
[lkml]   [2021]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] s390: preempt: Fix preempt_count initialization
On Wed, Jul 07, 2021 at 05:33:38PM +0100, Valentin Schneider wrote:
> S390's init_idle_preempt_count(p, cpu) doesn't actually let us initialize the
> preempt_count of the requested CPU's idle task: it unconditionally writes
> to the current CPU's. This clearly conflicts with idle_threads_init(),
> which intends to initialize *all* the idle tasks, including their
> preempt_count (or their CPU's, if the arch uses a per-CPU preempt_count).
>
> Unfortunately, it seems the way s390 does things doesn't let us initialize
> every possible CPU's preempt_count early on, as the pages where this
> resides are only allocated when a CPU is brought up and are freed when it
> is brought down.
>
> Let the arch-specific code set a CPU's preempt_count when its lowcore is
> allocated, and turn init_idle_preempt_count() into an empty stub.
>
> Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

\
 
 \ /
  Last update: 2021-07-07 21:43    [W:3.686 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site