From nobody Wed Feb 11 01:27:26 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE654EB64DC for ; Mon, 17 Jul 2023 23:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbjGQXVb (ORCPT ); Mon, 17 Jul 2023 19:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbjGQXV2 (ORCPT ); Mon, 17 Jul 2023 19:21:28 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718FE10E6 for ; Mon, 17 Jul 2023 16:20:51 -0700 (PDT) Message-ID: <20230717223226.237896259@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1689635757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=wkf9cxbN9yugedivD8sL7QgWMpf0hUBTEyuN6MHJ80U=; b=coF5HZJV4lqAYCOI0x2G+gk1jggvNOUYFRaiSC7p/lKyOLLZKnfZMXpV86Hyn3lXE5+VHp ybatAk06keDr7f3cuz22LBVPV7vGXEC/je7DzSUqVT5cqV/pToJLetgUyeZONbZFsMkXQQ JL0FFUava8lwobIOamFi5GMpID/VSIfgyySgc6iUqWrtByMo43awM7eC4xhuO8THhQgHi+ FDaXyFMES6qzHokM53hTbATJBbpXiB4E3q14zvPXr0qMViaGoC6IFP/pbAFtsXyZ0ScrbL sWQEixc98e+h8HPq6I0pYyHBSX2dY1LzBn8GwatXXzRx/9Wq7xi7uEKgZdOx9Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1689635757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=wkf9cxbN9yugedivD8sL7QgWMpf0hUBTEyuN6MHJ80U=; b=y/kUV7th0yY9Sc72a2b6dJKP+HSWRlwG2D6jYUjXl1y5Fqw1sVZdtT0jMk4c2hQKvkzOpX BA2Ixn/NetWpRVAg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Linus Torvalds , Andrew Cooper , Tom Lendacky , Paolo Bonzini , Wei Liu , Arjan van de Ven , Juergen Gross Subject: [patch 53/58] x86/apic: Convert other overrides to apic_update_callback() References: <20230717223049.327865981@linutronix.de> MIME-Version: 1.0 Date: Tue, 18 Jul 2023 01:15:57 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert all places which just assign a new function directly to the apic callback to use apic_update_callback() which prepares for using static calls. Signed-off-by: Thomas Gleixner --- arch/x86/hyperv/hv_apic.c | 20 ++++++++++---------- arch/x86/kernel/kvm.c | 4 ++-- arch/x86/kernel/sev.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -288,12 +288,12 @@ void __init hv_apic_init(void) */ orig_apic =3D *apic; =20 - apic->send_IPI =3D hv_send_ipi; - apic->send_IPI_mask =3D hv_send_ipi_mask; - apic->send_IPI_mask_allbutself =3D hv_send_ipi_mask_allbutself; - apic->send_IPI_allbutself =3D hv_send_ipi_allbutself; - apic->send_IPI_all =3D hv_send_ipi_all; - apic->send_IPI_self =3D hv_send_ipi_self; + apic_update_callback(send_IPI, hv_send_ipi); + apic_update_callback(send_IPI_mask, hv_send_ipi_mask); + apic_update_callback(send_IPI_mask_allbutself, hv_send_ipi_mask_allbutse= lf); + apic_update_callback(send_IPI_allbutself, hv_send_ipi_allbutself); + apic_update_callback(send_IPI_all, hv_send_ipi_all); + apic_update_callback(send_IPI_self, hv_send_ipi_self); } =20 if (ms_hyperv.hints & HV_X64_APIC_ACCESS_RECOMMENDED) { @@ -312,10 +312,10 @@ void __init hv_apic_init(void) */ apic_update_callback(eoi, hv_apic_eoi_write); if (!x2apic_enabled()) { - apic->read =3D hv_apic_read; - apic->write =3D hv_apic_write; - apic->icr_write =3D hv_apic_icr_write; - apic->icr_read =3D hv_apic_icr_read; + apic_update_callback(read, hv_apic_read); + apic_update_callback(write, hv_apic_write); + apic_update_callback(icr_write, hv_apic_icr_write); + apic_update_callback(icr_read, hv_apic_icr_read); } } } --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -624,8 +624,8 @@ late_initcall(setup_efi_kvm_sev_migratio */ static void kvm_setup_pv_ipi(void) { - apic->send_IPI_mask =3D kvm_send_ipi_mask; - apic->send_IPI_mask_allbutself =3D kvm_send_ipi_mask_allbutself; + apic_update_callback(send_IPI_mask, kvm_send_ipi_mask); + apic_update_callback(send_IPI_mask_allbutself, kvm_send_ipi_mask_allbutse= lf); pr_info("setup PV IPIs\n"); } =20 --- a/arch/x86/kernel/sev.c +++ b/arch/x86/kernel/sev.c @@ -1099,7 +1099,7 @@ void snp_set_wakeup_secondary_cpu(void) * required method to start APs under SNP. If the hypervisor does * not support AP creation, then no APs will be started. */ - apic->wakeup_secondary_cpu =3D wakeup_cpu_via_vmgexit; + apic_update_callback(wakeup_secondary_cpu, wakeup_cpu_via_vmgexit); } =20 int __init sev_es_setup_ap_jump_table(struct real_mode_header *rmh)