From 414985d41e2365eb31cfcd0258e7312d784af548 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sat, 4 Jan 2020 00:33:12 +0100 Subject: [PATCH] [rt] Drop 0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch One part of the patch correspond to df4393424af3 ("x86/ioapic: Prevent inconsistent state when moving an interrupt") in 5.5-rc1 and which got backported to 4.19.92. The other is corresponding to 2579a4eefc04 ("x86/ioapic: Rename misnamed functions") in 5.5-rc1. --- debian/changelog | 1 + ...-let-setaffinity-unmask-threaded-EOI.patch | 112 ------------------ debian/patches-rt/series | 1 - 3 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 debian/patches-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch diff --git a/debian/changelog b/debian/changelog index c68750fe2..30ca160c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -831,6 +831,7 @@ linux (4.19.92-1) UNRELEASED; urgency=medium * [rt] Refresh 0199-net-move-xmit_recursion-to-per-task-variable-on-RT.patch (Context changes in 4.19.88) * [rt] Update to 4.19.90-rt35 + * [rt] Drop 0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch -- Salvatore Bonaccorso Sat, 14 Dec 2019 22:00:16 +0100 diff --git a/debian/patches-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch b/debian/patches-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch deleted file mode 100644 index f9fdc61b2..000000000 --- a/debian/patches-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch +++ /dev/null @@ -1,112 +0,0 @@ -From fdf9220749a837a83687679c314e53cd434e4ceb Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 17 Jul 2018 18:25:31 +0200 -Subject: [PATCH 013/291] x86/ioapic: Don't let setaffinity unmask threaded EOI - interrupt too early -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.90-rt35.tar.xz - -There is an issue with threaded interrupts which are marked ONESHOT -and using the fasteoi handler. - - if (IS_ONESHOT()) - mask_irq(); - - .... - .... - - cond_unmask_eoi_irq() - chip->irq_eoi(); - -So if setaffinity is pending then the interrupt will be moved and then -unmasked, which is wrong as it should be kept masked up to the point where -the threaded handler finished. It's not a real problem, the interrupt will -just be able to fire before the threaded handler has finished, though the irq -masked state will be wrong for a bit. - -The patch below should cure the issue. It also renames the horribly -misnomed functions so it becomes clear what they are supposed to do. - -Signed-off-by: Thomas Gleixner -[bigeasy: add the body of the patch, use the same functions in both - ifdef paths (spotted by Andy Shevchenko)] -Signed-off-by: Sebastian Andrzej Siewior ---- - arch/x86/kernel/apic/io_apic.c | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - -diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c -index ab22eded61d2..91db2ec0c10a 100644 ---- a/arch/x86/kernel/apic/io_apic.c -+++ b/arch/x86/kernel/apic/io_apic.c -@@ -1722,19 +1722,20 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data) - return false; - } - --static inline bool ioapic_irqd_mask(struct irq_data *data) -+static inline bool ioapic_prepare_move(struct irq_data *data) - { - /* If we are moving the irq we need to mask it */ - if (unlikely(irqd_is_setaffinity_pending(data))) { -- mask_ioapic_irq(data); -+ if (!irqd_irq_masked(data)) -+ mask_ioapic_irq(data); - return true; - } - return false; - } - --static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked) -+static inline void ioapic_finish_move(struct irq_data *data, bool moveit) - { -- if (unlikely(masked)) { -+ if (unlikely(moveit)) { - /* Only migrate the irq if the ack has been received. - * - * On rare occasions the broadcast level triggered ack gets -@@ -1763,15 +1764,17 @@ static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked) - */ - if (!io_apic_level_ack_pending(data->chip_data)) - irq_move_masked_irq(data); -- unmask_ioapic_irq(data); -+ /* If the irq is masked in the core, leave it */ -+ if (!irqd_irq_masked(data)) -+ unmask_ioapic_irq(data); - } - } - #else --static inline bool ioapic_irqd_mask(struct irq_data *data) -+static inline bool ioapic_prepare_move(struct irq_data *data) - { - return false; - } --static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked) -+static inline void ioapic_finish_move(struct irq_data *data, bool moveit) - { - } - #endif -@@ -1780,11 +1783,11 @@ static void ioapic_ack_level(struct irq_data *irq_data) - { - struct irq_cfg *cfg = irqd_cfg(irq_data); - unsigned long v; -- bool masked; -+ bool moveit; - int i; - - irq_complete_move(cfg); -- masked = ioapic_irqd_mask(irq_data); -+ moveit = ioapic_prepare_move(irq_data); - - /* - * It appears there is an erratum which affects at least version 0x11 -@@ -1839,7 +1842,7 @@ static void ioapic_ack_level(struct irq_data *irq_data) - eoi_ioapic_pin(cfg->vector, irq_data->chip_data); - } - -- ioapic_irqd_unmask(irq_data, masked); -+ ioapic_finish_move(irq_data, moveit); - } - - static void ioapic_ir_ack_level(struct irq_data *irq_data) --- -2.24.0 - diff --git a/debian/patches-rt/series b/debian/patches-rt/series index b082482a6..eaeea589c 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -10,7 +10,6 @@ 0010-crypto-caam-qi-simplify-CGR-allocation-freeing.patch 0011-sched-fair-Robustify-CFS-bandwidth-timer-locking.patch 0012-arm-Convert-arm-boot_lock-to-raw.patch -0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch 0014-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch 0015-fscache-initialize-cookie-hash-table-raw-spinlocks.patch 0016-Drivers-hv-vmbus-include-header-for-get_irq_regs.patch