From: tglx@linutronix.de (Thomas Gleixner)
Subject: [PATCH 2/4] genirq: return the irq name from free_irq
Date: Fri, 14 Apr 2017 19:28:42 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1704141920560.2327@nanos> (raw)
In-Reply-To: <20170413070643.32165-3-hch@lst.de>
On Thu, 13 Apr 2017, Christoph Hellwig wrote:
> This allows callers to get back at them instead of having to store
> it in another variable.
Alternatively you tell the irq code to free it for you. Patch below.
Thanks,
tglx
8<-----------------------
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -60,7 +60,9 @@
* IRQF_COND_SUSPEND - If the IRQ is shared with a NO_SUSPEND user, execute this
* interrupt handler after suspending interrupts. For system
* wakeup devices users need to implement wakeup detection in
- * their interrupt handlers.
+ * their interrupt handlers
+ * IRQF_FREE_NAME - Free the memory pointed to by the @name argument of
+ * request_irq() in free_irq()
*/
#define IRQF_SHARED 0x00000080
#define IRQF_PROBE_SHARED 0x00000100
@@ -74,6 +76,7 @@
#define IRQF_NO_THREAD 0x00010000
#define IRQF_EARLY_RESUME 0x00020000
#define IRQF_COND_SUSPEND 0x00040000
+#define IRQF_FREE_NAME 0x00080000
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1542,6 +1542,8 @@ static struct irqaction *__free_irq(unsi
irq_chip_pm_put(&desc->irq_data);
module_put(desc->owner);
kfree(action->secondary);
+ if (action->flags & IRQF_FREE_NAME)
+ kfree(action->name);
return action;
}
next prev parent reply other threads:[~2017-04-14 17:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 7:06 provide pci_request_irq / pci_free_irq helpers Christoph Hellwig
2017-04-13 7:06 ` [PATCH 1/4] genirq: fix indentation in remove_irq Christoph Hellwig
2017-04-14 17:20 ` Thomas Gleixner
2017-04-20 13:25 ` Sagi Grimberg
2017-04-13 7:06 ` [PATCH 2/4] genirq: return the irq name from free_irq Christoph Hellwig
2017-04-14 17:28 ` Thomas Gleixner [this message]
2017-04-14 17:36 ` Christoph Hellwig
2017-04-14 17:53 ` Thomas Gleixner
2017-04-13 7:06 ` [PATCH 3/4] PCI/irq: add pci_request_irq and pci_free_irq helpers Christoph Hellwig
2017-04-14 14:46 ` Bjorn Helgaas
2017-04-14 15:58 ` Christoph Hellwig
2017-04-13 7:06 ` [PATCH 4/4] nvme/pci: switch to pci_request_irq Christoph Hellwig
2017-04-13 20:02 ` Keith Busch
2017-04-20 16:19 ` Sagi Grimberg
2017-04-18 18:45 ` provide pci_request_irq / pci_free_irq helpers Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1704141920560.2327@nanos \
--to=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox