From: Pierre-Clément Tosi Date: Mon, 10 Jun 2024 06:32:34 +0000 (+0100) Subject: KVM: arm64: VHE: Mark __hyp_call_panic __noreturn X-Git-Tag: v6.11-rc1~89^2~17^2~3^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c6eb64876937e38672fba63f11634b9ef3013e1;p=thirdparty%2Flinux.git 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: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-6-ptosi@google.com Signed-off-by: Oliver Upton --- diff --git a/arch/arm64/kvm/hyp/vhe/switch.c b/arch/arm64/kvm/hyp/vhe/switch.c index 8fbb6a2e0559d..ee1e1c5847e73 100644 --- a/arch/arm64/kvm/hyp/vhe/switch.c +++ b/arch/arm64/kvm/hyp/vhe/switch.c @@ -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)