arm64: Introduce get_cpu_ops() helper function
authorGavin Shan <gshan@redhat.com>
Wed, 18 Mar 2020 23:01:44 +0000 (10:01 +1100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 24 Mar 2020 17:24:19 +0000 (17:24 +0000)
commitde58ed5e16e62f36c7ed05552f18b7f9c647dcaf
treeb92e5b00897604c1e1efd375cc1a27d51c2c3aa3
parent6885fb129be30c627eb2f5b1498dba498ff6c037
arm64: Introduce get_cpu_ops() helper function

This introduces get_cpu_ops() to return the CPU operations according to
the given CPU index. For now, it simply returns the @cpu_ops[cpu] as
before. Also, helper function __cpu_try_die() is introduced to be shared
by cpu_die() and ipi_cpu_crash_stop(). So it shouldn't introduce any
functional changes.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
arch/arm64/include/asm/cpu_ops.h
arch/arm64/kernel/cpu_ops.c
arch/arm64/kernel/cpuidle.c
arch/arm64/kernel/setup.c
arch/arm64/kernel/smp.c