Commit 3c6eb648 authored by Pierre-Clément Tosi's avatar Pierre-Clément Tosi Committed by Oliver Upton
Browse files

KVM: arm64: VHE: Mark __hyp_call_panic __noreturn



Given that the sole purpose of __hyp_call_panic() is to call panic(), a
__noreturn function, give it the __noreturn attribute, removing the need
for its caller to use unreachable().

Signed-off-by: default avatarPierre-Clément Tosi <ptosi@google.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240610063244.2828978-6-ptosi@google.com


Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent 4ab3f9dd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu)
	return ret;
}

static void __hyp_call_panic(u64 spsr, u64 elr, u64 par)
static void __noreturn __hyp_call_panic(u64 spsr, u64 elr, u64 par)
{
	struct kvm_cpu_context *host_ctxt;
	struct kvm_vcpu *vcpu;
@@ -413,7 +413,6 @@ void __noreturn hyp_panic(void)
	u64 par = read_sysreg_par();

	__hyp_call_panic(spsr, elr, par);
	unreachable();
}

asmlinkage void kvm_unexpected_el2_exception(void)