Valentin Schneider 6a942f5780 s390: preempt: Fix preempt_count initialization
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>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20210707163338.1623014-1-valentin.schneider@arm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2021-07-08 22:12:18 +02:00
..
2021-01-19 12:29:26 +01:00
2021-07-08 15:37:28 +02:00
2017-12-05 07:51:09 +01:00
2021-06-07 17:07:01 +02:00
2020-08-26 18:47:21 +02:00
2021-01-19 12:29:26 +01:00
2020-08-11 18:16:43 +02:00
2020-12-16 14:55:49 +01:00
2020-06-23 09:16:48 +02:00
2021-05-07 00:26:34 -07:00
2019-02-05 14:29:23 +01:00
2021-06-18 16:41:19 +02:00
2020-01-30 13:07:55 +01:00
2020-04-04 09:45:50 -07:00
2020-02-27 16:02:21 +01:00
2021-07-04 12:17:38 -07:00
2020-06-29 16:32:09 +02:00
2021-07-01 11:06:03 -07:00
2019-02-07 18:06:18 -08:00
2020-09-14 11:38:35 +02:00
2020-09-26 15:51:21 +02:00
2021-06-28 11:18:28 +02:00
2021-01-19 12:29:26 +01:00
2021-06-28 11:18:28 +02:00
2021-06-18 16:41:21 +02:00
2019-07-23 10:45:53 +02:00
2021-07-08 15:37:28 +02:00
2017-12-05 07:51:09 +01:00
2021-01-19 12:29:26 +01:00