]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/xen/apic: Mark apic __ro_after_init
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:04:21 +0000 (15:04 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 19:00:46 +0000 (12:00 -0700)
Nothing can change it post init.

Remove the 32bit callbacks and comments as XENPV is strictly 64bit.

While at it mop up the whitespace damage which causes eyebleed due to an
editor which is highlighting it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
Cc: Juergen Gross <jgross@suse.com>
arch/x86/xen/apic.c

index 315ffd8d377fa573f1a4560ac928604db780f266..7ad91225fdf483381b60075d6baaafb8ed3402e8 100644 (file)
@@ -123,43 +123,41 @@ static int xen_cpu_present_to_apicid(int cpu)
                return BAD_APICID;
 }
 
-static struct apic xen_pv_apic = {
-       .name                           = "Xen PV",
-       .probe                          = xen_apic_probe_pv,
+static struct apic xen_pv_apic __ro_after_init = {
+       .name                           = "Xen PV",
+       .probe                          = xen_apic_probe_pv,
        .acpi_madt_oem_check            = xen_madt_oem_check,
 
        /* .delivery_mode and .dest_mode_logical not used by XENPV */
 
        .disable_esr                    = 0,
 
-       .check_apicid_used              = default_check_apicid_used, /* Used on 32-bit */
-       .ioapic_phys_id_map             = default_ioapic_phys_id_map, /* Used on 32-bit */
        .cpu_present_to_apicid          = xen_cpu_present_to_apicid,
        .phys_pkg_id                    = xen_phys_pkg_id, /* detect_ht */
 
        .max_apic_id                    = UINT_MAX,
-       .get_apic_id                    = xen_get_apic_id,
-       .set_apic_id                    = xen_set_apic_id, /* Can be NULL on 32-bit. */
+       .get_apic_id                    = xen_get_apic_id,
+       .set_apic_id                    = xen_set_apic_id,
 
        .calc_dest_apicid               = apic_flat_calc_apicid,
 
 #ifdef CONFIG_SMP
-       .send_IPI_mask                  = xen_send_IPI_mask,
-       .send_IPI_mask_allbutself       = xen_send_IPI_mask_allbutself,
-       .send_IPI_allbutself            = xen_send_IPI_allbutself,
-       .send_IPI_all                   = xen_send_IPI_all,
-       .send_IPI_self                  = xen_send_IPI_self,
+       .send_IPI_mask                  = xen_send_IPI_mask,
+       .send_IPI_mask_allbutself       = xen_send_IPI_mask_allbutself,
+       .send_IPI_allbutself            = xen_send_IPI_allbutself,
+       .send_IPI_all                   = xen_send_IPI_all,
+       .send_IPI_self                  = xen_send_IPI_self,
 #endif
        .read                           = xen_apic_read,
        .write                          = xen_apic_write,
        .eoi                            = xen_apic_eoi,
 
-       .icr_read                       = xen_apic_icr_read,
-       .icr_write                      = xen_apic_icr_write,
+       .icr_read                       = xen_apic_icr_read,
+       .icr_write                      = xen_apic_icr_write,
 };
+apic_driver(xen_pv_apic);
 
 void __init xen_init_apic(void)
 {
        x86_apic_ops.io_apic_read = xen_io_apic_read;
 }
-apic_driver(xen_pv_apic);