Commit ac72b92d authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Dave Hansen
Browse files

x86/xen/apic: Mark apic __ro_after_init



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: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Tested-by: default avatarSohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
Cc: Juergen Gross <jgross@suse.com>
parent d6f361ea
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static int xen_cpu_present_to_apicid(int cpu)
		return BAD_APICID;
}

static struct apic xen_pv_apic = {
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,
@@ -132,14 +132,12 @@ static struct apic xen_pv_apic = {

	.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. */
	.set_apic_id			= xen_set_apic_id,

	.calc_dest_apicid		= apic_flat_calc_apicid,

@@ -157,9 +155,9 @@ static struct apic xen_pv_apic = {
	.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);