Skip to content

Commit

Permalink
HACK: Try bring up kexec
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Oct 26, 2021
1 parent d1d3667 commit 54b5c68
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion arch/arm64/Kconfig
Expand Up @@ -1078,8 +1078,13 @@ config PARAVIRT_TIME_ACCOUNTING

If in doubt, say N here.

config KEXEC_HACK
bool "kexec hack"
help
Do some ad-hoc patching to SMP-related code so that kexec works.

config KEXEC
depends on PM_SLEEP_SMP
depends on (PM_SLEEP_SMP || KEXEC_HACK)
select KEXEC_CORE
bool "kexec system call"
help
Expand Down
5 changes: 4 additions & 1 deletion arch/arm64/kernel/smp.c
Expand Up @@ -1126,7 +1126,10 @@ static bool have_cpu_die(void)

bool cpus_are_stuck_in_kernel(void)
{
#ifndef CONFIG_KEXEC_HACK
bool smp_spin_tables = (num_possible_cpus() > 1 && !have_cpu_die());

return !!cpus_stuck_in_kernel || smp_spin_tables;
#else
return false;
#endif
}
4 changes: 4 additions & 0 deletions arch/arm64/kernel/smp_spin_table.c
Expand Up @@ -49,6 +49,10 @@ static int smp_spin_table_cpu_init(unsigned int cpu)
if (!dn)
return -ENODEV;

#ifdef CONFIG_KEXEC_HACK
return -ENOSYS;
#endif

/*
* Determine the address from which the CPU is polling.
*/
Expand Down

0 comments on commit 54b5c68

Please sign in to comment.