linux/arch
James Morse a88cf7061c arm64: smp: Add function to determine if cpus are stuck in the kernel
kernel/smp.c has a fancy counter that keeps track of the number of CPUs
it marked as not-present and left in cpu_park_loop(). If there are any
CPUs spinning in here, features like kexec or hibernate may release them
by overwriting this memory.

This problem also occurs on machines using spin-tables to release
secondary cores.
After commit 44dbcc93ab ("arm64: Fix behavior of maxcpus=N")
we bring all known cpus into the secondary holding pen, meaning this
memory can't be re-used by kexec or hibernate.

Add a function cpus_are_stuck_in_kernel() to determine if either of these
cases have occurred.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

Conflicts:
	arch/arm64/include/asm/smp.h
due to missing commit 17eebd1a43 ("arm64: Add cpu_panic_kernel helper")
2017-06-14 13:43:18 +09:00
..
alpha osf_wait4(): fix infoleak 2017-05-25 14:30:17 +02:00
arc ARCv2: save r30 on kernel entry as gcc uses it for code-gen 2017-05-02 21:19:56 -07:00
arm Merge tag 'v4.4.70' into linux-linaro-lsk-v4.4 2017-05-26 12:03:27 +08:00
arm64 arm64: smp: Add function to determine if cpus are stuck in the kernel 2017-06-14 13:43:18 +09:00
avr32 avr32: off by one in at32_init_pio() 2016-10-07 15:23:45 +02:00
blackfin net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
c6x c6x/ptrace: Remove useless PTRACE_SETREGSET implementation 2017-03-31 09:49:53 +02:00
cris cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected 2017-01-12 11:22:48 +01:00
frv frv: fix clear_user() 2016-09-24 10:07:44 +02:00
h8300 h8300/ptrace: Fix incorrect register transfer count 2017-03-31 09:49:53 +02:00
hexagon hexagon: fix strncpy_from_user() error return 2016-09-24 10:07:44 +02:00
ia64 Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4 2016-10-05 13:21:50 +02:00
m32r m32r: fix __get_user() 2016-09-24 10:07:43 +02:00
m68k m68k: Fix ndelay() macro 2016-12-15 08:49:23 -08:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 14:30:16 +02:00
microblaze microblaze: fix copy_from_user() 2016-09-24 10:07:43 +02:00
mips MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix 2017-05-14 13:32:57 +02:00
mn10300 mn10300: copy_from_user() should zero on access_ok() failure... 2016-09-24 10:07:45 +02:00
nios2 nios2: reserve boot memory for device tree 2017-04-12 12:38:34 +02:00
openrisc openrisc: fix the fix of copy_from_user() 2016-09-24 10:07:46 +02:00
parisc Merge tag 'v4.4.46' into linux-linaro-lsk-v4.4 2017-02-04 12:11:15 +08:00
powerpc Merge tag 'v4.4.70' into linux-linaro-lsk-v4.4 2017-05-26 12:03:27 +08:00
s390 Merge tag 'v4.4.70' into linux-linaro-lsk-v4.4 2017-05-26 12:03:27 +08:00
score score: fix copy_from_user() and friends 2016-09-24 10:07:44 +02:00
sh sh: fix copy_from_user() 2016-09-24 10:07:44 +02:00
sparc Merge tag 'v4.4.71' into linux-linaro-lsk-v4.4 2017-06-08 12:11:49 +08:00
tile tile/ptrace: Preserve previous registers for short regset write 2017-02-01 08:30:52 +01:00
um um: Don't discard .text.exit section 2016-09-07 08:32:38 +02:00
unicore32 pwm: Changes for v4.4-rc1 2015-11-11 09:16:10 -08:00
x86 Merge tag 'v4.4.70' into linux-linaro-lsk-v4.4 2017-05-26 12:03:27 +08:00
xtensa xtensa: move parse_tag_fdt out of #ifdef CONFIG_BLK_DEV_INITRD 2017-03-15 09:57:14 +08:00
.gitignore
Kconfig mm: Implement stack frame object validation 2016-08-27 11:23:38 +08:00