s390 updates for the 5.14 merge window #2

- Fix preempt_count initialization.

- Rework call_on_stack() macro to add proper type handling and avoid
  possible register corruption.

- More error prone "register asm" removal and fixes.

- Fix syscall restarting when multiple signals are coming in. This adds
  minimalistic trampolines to vdso so we can return from signal without
  using the stack which requires pgm check handler hacks when NX is
  enabled.

- Remove HAVE_IRQ_EXIT_ON_IRQ_STACK since this is no longer true after
  switch to generic entry.

- Fix protected virtualization secure storage access exception handling.

- Make machine check C handler always enter with DAT enabled and move
  register validation to C code.

- Fix tinyconfig boot problem by avoiding MONITOR CALL without CONFIG_BUG.

- Increase asm symbols alignment to 16 to make it consistent with
  compilers.

- Enable concurrent access to the CPU Measurement Counter Facility.

- Add support for dynamic AP bus size limit and rework ap_dqap to deal
  with messages greater than recv buffer.
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>
3 files changed