On 17/07/18 12:13, Julien Thierry wrote:
Hi Thomas,

Thanks for the review.

On 17/07/18 10:22, Thomas Gleixner wrote:

[...]

On Mon, 9 Jul 2018, Julien Thierry wrote:
+/* This function must be called with desc->lock held */
+static const void *__cleanup_nmi(unsigned int irq, struct irq_desc *desc)
+{
+    const char *devname = NULL;
+
+    desc->istate &= ~IRQS_NMI;
+
+#ifdef CONFIG_SMP
+    if (WARN_ON(desc->affinity_notify))
+        desc->affinity_notify = NULL;
+#endif

We should not support that affinity notify horror for NMIs at all.


Makes sense, I'll add it to the constraints for NMIs and remove that part.

+    if (!WARN_ON(desc->action == NULL)) {
+        irq_pm_remove_action(desc, desc->action);
+        devname = desc->action->name;
+        unregister_handler_proc(irq, desc->action);
+
+        kfree(desc->action);
+        desc->action = NULL;
+    }
+
+    irq_settings_clr_disable_unlazy(desc);
+    irq_shutdown(desc);
+
+#ifdef CONFIG_SMP
+    /* make sure affinity_hint is cleaned up */
+    if (WARN_ON_ONCE(desc->affinity_hint))
+        desc->affinity_hint = NULL;
+#endif

Especially not twice :)


Oops... I'll remove that as well.

Re-reading this I realized that second part was about desc->affinity_hint and not desc->affinity_notify.

Supporting desc->affinity_hint for NMIs shouldn't be an issue, right?

Thanks,

--
Julien Thierry

Reply via email to