Skip to content

Commit ac72b92

Browse files
KAGA-KOKOhansendc
authored andcommitted
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: 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>
1 parent d6f361e commit ac72b92

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

arch/x86/xen/apic.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,43 +123,41 @@ static int xen_cpu_present_to_apicid(int cpu)
123123
return BAD_APICID;
124124
}
125125

126-
static struct apic xen_pv_apic = {
127-
.name = "Xen PV",
128-
.probe = xen_apic_probe_pv,
126+
static struct apic xen_pv_apic __ro_after_init = {
127+
.name = "Xen PV",
128+
.probe = xen_apic_probe_pv,
129129
.acpi_madt_oem_check = xen_madt_oem_check,
130130

131131
/* .delivery_mode and .dest_mode_logical not used by XENPV */
132132

133133
.disable_esr = 0,
134134

135-
.check_apicid_used = default_check_apicid_used, /* Used on 32-bit */
136-
.ioapic_phys_id_map = default_ioapic_phys_id_map, /* Used on 32-bit */
137135
.cpu_present_to_apicid = xen_cpu_present_to_apicid,
138136
.phys_pkg_id = xen_phys_pkg_id, /* detect_ht */
139137

140138
.max_apic_id = UINT_MAX,
141-
.get_apic_id = xen_get_apic_id,
142-
.set_apic_id = xen_set_apic_id, /* Can be NULL on 32-bit. */
139+
.get_apic_id = xen_get_apic_id,
140+
.set_apic_id = xen_set_apic_id,
143141

144142
.calc_dest_apicid = apic_flat_calc_apicid,
145143

146144
#ifdef CONFIG_SMP
147-
.send_IPI_mask = xen_send_IPI_mask,
148-
.send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself,
149-
.send_IPI_allbutself = xen_send_IPI_allbutself,
150-
.send_IPI_all = xen_send_IPI_all,
151-
.send_IPI_self = xen_send_IPI_self,
145+
.send_IPI_mask = xen_send_IPI_mask,
146+
.send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself,
147+
.send_IPI_allbutself = xen_send_IPI_allbutself,
148+
.send_IPI_all = xen_send_IPI_all,
149+
.send_IPI_self = xen_send_IPI_self,
152150
#endif
153151
.read = xen_apic_read,
154152
.write = xen_apic_write,
155153
.eoi = xen_apic_eoi,
156154

157-
.icr_read = xen_apic_icr_read,
158-
.icr_write = xen_apic_icr_write,
155+
.icr_read = xen_apic_icr_read,
156+
.icr_write = xen_apic_icr_write,
159157
};
158+
apic_driver(xen_pv_apic);
160159

161160
void __init xen_init_apic(void)
162161
{
163162
x86_apic_ops.io_apic_read = xen_io_apic_read;
164163
}
165-
apic_driver(xen_pv_apic);

0 commit comments

Comments
 (0)