linux-mainline/arch/s390/include/asm
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: f1a0a376ca ("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
..
fpu
trace
vdso s390/vdso: add minimal compat vdso 2021-07-08 15:37:28 +02:00
airq.h
alternative-asm.h
alternative.h
ap.h s390/ap: get rid of register asm in ap_dqap() 2021-07-08 22:12:17 +02:00
appldata.h
archrandom.h
asm-const.h
asm-prototypes.h
atomic_ops.h
atomic.h locking/atomic: make ARCH_ATOMIC a Kconfig symbol 2021-05-26 13:20:49 +02:00
barrier.h
bitops.h s390/bitops: use register pair instead of register asm 2021-06-18 16:41:21 +02:00
boot_data.h
bug.h
bugs.h
cache.h
ccwdev.h
ccwgroup.h s390/ccwgroup: use BUS_NOTIFY_UNBOUND_DRIVER to trigger ungrouping 2021-06-07 17:07:00 +02:00
checksum.h s390/checksum: use register pair instead of register asm 2021-06-18 16:41:21 +02:00
chpid.h
chsc.h
cio.h s390/cio: add tpi.h header file 2021-06-07 17:07:01 +02:00
clocksource.h
clp.h
cmb.h
cmpxchg.h s390/cmpxchg: use register pair instead of register asm 2021-06-28 11:18:28 +02:00
compat.h
cpacf.h
cpcmd.h
cpu_mcf.h s390/cpumf: Allow concurrent access for CPU Measurement Counter Facility 2021-07-05 12:44:23 +02:00
cpu_mf-insn.h
cpu_mf.h
cpu.h
cpufeature.h
cputime.h
crw.h
css_chars.h
ctl_reg.h s390/mcck: move register validation to C code 2021-07-05 12:44:23 +02:00
current.h
debug.h
delay.h
diag.h
dis.h
dma.h
dwarf.h
eadm.h
ebcdic.h
elf.h s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART 2021-07-08 22:12:17 +02:00
entry-common.h s390/signal: remove sigreturn on stack 2021-07-08 22:12:17 +02:00
exec.h
extable.h
extmem.h
facility.h s390/facility: get rid of register asm 2021-06-18 16:41:23 +02:00
fcx.h
ftrace.h
futex.h
gmap.h
hardirq.h
hugetlb.h
hw_irq.h
idals.h
idle.h
io.h mm: remove xlate_dev_kmem_ptr() 2021-05-07 00:26:34 -07:00
ipl.h
irq_work.h
irq.h
irqflags.h s390/irqflags: always inline arch irqflags functions 2021-06-18 16:41:19 +02:00
isc.h
itcw.h
jump_label.h
kasan.h s390: setup kernel memory layout early 2021-06-18 16:41:19 +02:00
Kbuild
kdebug.h
kexec.h
kprobes.h
kvm_host.h KVM: stats: Separate generic stats from architecture specific ones 2021-06-24 11:47:56 -04:00
kvm_para.h
linkage.h s390/linkage: increase asm symbols alignment to 16 2021-07-08 22:12:18 +02:00
livepatch.h
lowcore.h s390/lowcore: remove superfluous __packed annotations 2021-06-07 17:07:01 +02:00
mem_detect.h
mem_encrypt.h
mmu_context.h s390/mm: ensure switch_mm() is executed with interrupts disabled 2021-06-07 17:06:59 +02:00
mmu.h
mmzone.h
module.h
nmi.h s390/mcck: keep machine check interruption codes sorted 2021-07-05 12:44:23 +02:00
nospec-branch.h
nospec-insn.h
numa.h
os_info.h
page-states.h
page.h s390 updates for the 5.14 merge window 2021-07-04 12:17:38 -07:00
pci_clp.h
pci_debug.h
pci_dma.h
pci_insn.h
pci_io.h
pci.h s390/pci: add zpci_set_irq()/zpci_clear_irq() 2021-06-28 11:18:28 +02:00
percpu.h s390/cmpxchg: use register pair instead of register asm 2021-06-28 11:18:28 +02:00
perf_event.h
pgalloc.h mm/thp: define default pmd_pgtable() 2021-07-01 11:06:03 -07:00
pgtable.h s390 updates for the 5.14 merge window 2021-07-04 12:17:38 -07:00
pkey.h
pnet.h
preempt.h s390: preempt: Fix preempt_count initialization 2021-07-08 22:12:18 +02:00
processor.h s390/processor: always inline stap() and __load_psw_mask() 2021-06-18 16:41:19 +02:00
ptdump.h
ptrace.h s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART 2021-07-08 22:12:17 +02:00
purgatory.h
qdio.h s390/qeth: remove QAOB's pointer to its TX buffer 2021-06-11 12:49:15 -07:00
runtime_instr.h
schid.h
sclp.h
scsw.h
seccomp.h
sections.h
serial.h
set_memory.h
setup.h s390/boot: replace magic string check with a bootdata flag 2021-07-05 12:44:23 +02:00
shmparam.h
signal.h
sigp.h s390/sigp: use register pair instead of register asm 2021-06-18 16:41:22 +02:00
smp.h
softirq_stack.h s390/softirq: use call_on_stack() macro 2021-07-08 22:12:18 +02:00
sparsemem.h
spinlock_types.h
spinlock.h
stacktrace.h s390: rename CALL_ON_STACK_NORETURN() to call_on_stack_noreturn() 2021-07-08 22:12:18 +02:00
stp.h
string.h s390/string: get rid of register asm 2021-06-28 11:18:28 +02:00
switch_to.h
syscall_wrapper.h
syscall.h
sysinfo.h
termios.h
thread_info.h
timex.h s390/timex: get rid of register asm 2021-06-28 11:18:28 +02:00
tlb.h
tlbflush.h
topology.h
tpi.h s390: add struct tpi_info to struct pt_regs 2021-06-07 17:07:01 +02:00
types.h s390: introduce register pair union 2021-06-18 16:41:21 +02:00
uaccess.h s390/uaccess: get rid of register asm 2021-06-18 16:41:23 +02:00
unistd.h
unwind.h
uprobes.h
user.h
uv.h s390: mm: Fix secure storage access exception handling 2021-07-05 12:44:23 +02:00
vdso.h s390/vdso: add minimal compat vdso 2021-07-08 15:37:28 +02:00
vga.h
vmalloc.h
vmlinux.lds.h
vtime.h
vtimer.h
vx-insn.h
xor.h