Message ID | 20220421132114.35118-3-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/ioapic: fix edge triggered interrupt migration | expand |
On 21.04.2022 15:21, Roger Pau Monne wrote: > No functional change intended. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Once seeing the purpose (in a later patch, I suppose) I certainly don't mind. We do have a couple of literal initializers, though (see e.g. the top of ioapic_guest_write()). Do those still compile fine (warning free) even with old gcc? Jan > --- a/xen/arch/x86/include/asm/io_apic.h > +++ b/xen/arch/x86/include/asm/io_apic.h > @@ -89,35 +89,38 @@ enum ioapic_irq_destination_types { > }; > > struct IO_APIC_route_entry { > - unsigned int vector:8; > - unsigned int delivery_mode:3; /* > - * 000: FIXED > - * 001: lowest prio > - * 111: ExtINT > - */ > - unsigned int dest_mode:1; /* 0: physical, 1: logical */ > - unsigned int delivery_status:1; > - unsigned int polarity:1; /* 0: low, 1: high */ > - unsigned int irr:1; > - unsigned int trigger:1; /* 0: edge, 1: level */ > - unsigned int mask:1; /* 0: enabled, 1: disabled */ > - unsigned int __reserved_2:15; > - > union { > struct { > - unsigned int __reserved_1:24; > - unsigned int physical_dest:4; > - unsigned int __reserved_2:4; > - } physical; > - > - struct { > - unsigned int __reserved_1:24; > - unsigned int logical_dest:8; > - } logical; > - > - /* used when Interrupt Remapping with EIM is enabled */ > - unsigned int dest32; > - } dest; > + unsigned int vector:8; > + unsigned int delivery_mode:3; /* > + * 000: FIXED > + * 001: lowest prio > + * 111: ExtINT > + */ > + unsigned int dest_mode:1; /* 0: physical, 1: logical */ > + unsigned int delivery_status:1; > + unsigned int polarity:1; /* 0: low, 1: high */ > + unsigned int irr:1; > + unsigned int trigger:1; /* 0: edge, 1: level */ > + unsigned int mask:1; /* 0: enabled, 1: disabled */ > + unsigned int __reserved_2:15; > + > + union { > + struct { > + unsigned int __reserved_1:24; > + unsigned int physical_dest:4; > + unsigned int __reserved_2:4; > + } physical; > + > + struct { > + unsigned int __reserved_1:24; > + unsigned int logical_dest:8; > + } logical; > + unsigned int dest32; > + } dest; > + }; > + uint64_t raw; > + }; > }; > > /*
On Fri, Jun 03, 2022 at 03:24:37PM +0200, Jan Beulich wrote: > On 21.04.2022 15:21, Roger Pau Monne wrote: > > No functional change intended. > > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > > Once seeing the purpose (in a later patch, I suppose) I certainly > don't mind. We do have a couple of literal initializers, though (see > e.g. the top of ioapic_guest_write()). Do those still compile fine > (warning free) even with old gcc? Will likely need to test it with the gitlab CI. Thanks, Roger.
diff --git a/xen/arch/x86/include/asm/io_apic.h b/xen/arch/x86/include/asm/io_apic.h index ef0878b09e..a558bb063c 100644 --- a/xen/arch/x86/include/asm/io_apic.h +++ b/xen/arch/x86/include/asm/io_apic.h @@ -89,35 +89,38 @@ enum ioapic_irq_destination_types { }; struct IO_APIC_route_entry { - unsigned int vector:8; - unsigned int delivery_mode:3; /* - * 000: FIXED - * 001: lowest prio - * 111: ExtINT - */ - unsigned int dest_mode:1; /* 0: physical, 1: logical */ - unsigned int delivery_status:1; - unsigned int polarity:1; /* 0: low, 1: high */ - unsigned int irr:1; - unsigned int trigger:1; /* 0: edge, 1: level */ - unsigned int mask:1; /* 0: enabled, 1: disabled */ - unsigned int __reserved_2:15; - union { struct { - unsigned int __reserved_1:24; - unsigned int physical_dest:4; - unsigned int __reserved_2:4; - } physical; - - struct { - unsigned int __reserved_1:24; - unsigned int logical_dest:8; - } logical; - - /* used when Interrupt Remapping with EIM is enabled */ - unsigned int dest32; - } dest; + unsigned int vector:8; + unsigned int delivery_mode:3; /* + * 000: FIXED + * 001: lowest prio + * 111: ExtINT + */ + unsigned int dest_mode:1; /* 0: physical, 1: logical */ + unsigned int delivery_status:1; + unsigned int polarity:1; /* 0: low, 1: high */ + unsigned int irr:1; + unsigned int trigger:1; /* 0: edge, 1: level */ + unsigned int mask:1; /* 0: enabled, 1: disabled */ + unsigned int __reserved_2:15; + + union { + struct { + unsigned int __reserved_1:24; + unsigned int physical_dest:4; + unsigned int __reserved_2:4; + } physical; + + struct { + unsigned int __reserved_1:24; + unsigned int logical_dest:8; + } logical; + unsigned int dest32; + } dest; + }; + uint64_t raw; + }; }; /*
No functional change intended. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- xen/arch/x86/include/asm/io_apic.h | 57 ++++++++++++++++-------------- 1 file changed, 30 insertions(+), 27 deletions(-)