* Patch "genirq: Use irq type from irqdata instead of irqdesc" has been added to the 4.8-stable tree
@ 2016-11-21 11:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-11-21 11:41 UTC (permalink / raw)
To: tglx, gregkh, jonathanh, marc.zyngier, mika.westerberg
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
genirq: Use irq type from irqdata instead of irqdesc
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
genirq-use-irq-type-from-irqdata-instead-of-irqdesc.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 7ee7e87dfb158e79019ea1d5ea1b0e6f2bc93ee4 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 7 Nov 2016 19:57:00 +0100
Subject: genirq: Use irq type from irqdata instead of irqdesc
From: Thomas Gleixner <tglx@linutronix.de>
commit 7ee7e87dfb158e79019ea1d5ea1b0e6f2bc93ee4 upstream.
The type flags in the irq descriptor are there for historical reasons and
only updated via irq_modify_status() or irq_set_type(). Both functions also
update the type flags in irqdata. __setup_irq() is the only left over user
of the type flags in the irq descriptor.
If __setup_irq() is called with empty irq type flags, then the type flags
are retrieved from irqdata. If an interrupt is shared, then the type flags
are compared with the type flags stored in the irq descriptor.
On x86 the ioapic does not have a irq_set_type() callback because the type
is defined in the BIOS tables and cannot be changed. The type is stored in
irqdata at setup time without updating the type data in the irq
descriptor. As a result the comparison described above fails.
There is no point in updating the irq descriptor flags because the only
relevant storage is irqdata. Use the type flags from irqdata for both
retrieval and comparison in __setup_irq() instead.
Aside of that the print out in case of non matching type flags has the old
and new type flags arguments flipped. Fix that as well.
For correctness sake the flags stored in the irq descriptor should be
removed, but this is beyond the scope of this bugfix and will be done in a
later patch.
Fixes: 4b357daed698 ("genirq: Look-up trigger type if not specified by caller")
Reported-and-tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1611072020360.3501@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/irq/manage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1341,12 +1341,12 @@ __setup_irq(unsigned int irq, struct irq
} else if (new->flags & IRQF_TRIGGER_MASK) {
unsigned int nmsk = new->flags & IRQF_TRIGGER_MASK;
- unsigned int omsk = irq_settings_get_trigger_mask(desc);
+ unsigned int omsk = irqd_get_trigger_type(&desc->irq_data);
if (nmsk != omsk)
/* hope the handler works with current trigger mode */
pr_warn("irq %d uses trigger mode %u; requested %u\n",
- irq, nmsk, omsk);
+ irq, omsk, nmsk);
}
*old_ptr = new;
Patches currently in stable-queue which might be from tglx@linutronix.de are
queue-4.8/x86-cpu-amd-fix-cpu_llc_id-for-amd-fam17h-systems.patch
queue-4.8/disable-the-__builtin_return_address-warning-globally-after-all.patch
queue-4.8/genirq-use-irq-type-from-irqdata-instead-of-irqdesc.patch
queue-4.8/x86-cpu-deal-with-broken-firmware-vmware-xen.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-21 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 11:41 Patch "genirq: Use irq type from irqdata instead of irqdesc" has been added to the 4.8-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.