Message ID | 20191107150609.93004-2-roger.pau@citrix.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86/ioapic: fix clear_IO_APIC_pin when using interrupt remapping | expand |
On 07/11/2019 15:06, Roger Pau Monne wrote: > And instead use proper booleans. No functional change intended. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > --- > Cc: Juergen Gross <jgross@suse.com> > --- Urgh. Can we purge with prejudice all of this TRUE and FALSE nonsense? There are only a few users more than this path. EFI adds in conditionally in a buggy way (which I thought I'd properly excised back with the switch from bool_t to bool, but clearly not), and ACPI undef's its surrounding and implements it differently. Code like this has no buisness remaining, and what we currently have is a disaster waiting to happen. ~Andrew
On 07.11.2019 16:06, Roger Pau Monne wrote: > And instead use proper booleans. No functional change intended. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Other than Andrew I think this is fine without further extension, i.e. Acked-by: Jan Beulich <jbeulich@suse.com> Of course this isn't to say that I wouldn't welcome a more complete cleanup, as suggested by him. Jan
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 37eabc16c9..b9c66acdb3 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -502,7 +502,7 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) struct IO_APIC_route_entry entry; /* Check delivery_mode to be sure we're not clearing an SMI pin */ - entry = __ioapic_read_entry(apic, pin, FALSE); + entry = __ioapic_read_entry(apic, pin, false); if (entry.delivery_mode == dest_SMI) return; @@ -512,15 +512,15 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) */ if (!entry.mask) { entry.mask = 1; - __ioapic_write_entry(apic, pin, FALSE, entry); + __ioapic_write_entry(apic, pin, false, entry); } - entry = __ioapic_read_entry(apic, pin, TRUE); + entry = __ioapic_read_entry(apic, pin, true); if (entry.irr) { /* Make sure the trigger mode is set to level. */ if (!entry.trigger) { entry.trigger = 1; - __ioapic_write_entry(apic, pin, TRUE, entry); + __ioapic_write_entry(apic, pin, true, entry); } __io_apic_eoi(apic, entry.vector, pin); } @@ -530,9 +530,9 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) */ memset(&entry, 0, sizeof(entry)); entry.mask = 1; - __ioapic_write_entry(apic, pin, TRUE, entry); + __ioapic_write_entry(apic, pin, true, entry); - entry = __ioapic_read_entry(apic, pin, TRUE); + entry = __ioapic_read_entry(apic, pin, true); if (entry.irr) printk(KERN_ERR "IO-APIC%02x-%u: Unable to reset IRR\n", IO_APIC_ID(apic), pin);
And instead use proper booleans. No functional change intended. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Juergen Gross <jgross@suse.com> --- xen/arch/x86/io_apic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)