From: Chris Wedgwood <cw@f00f.org>
To: LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Ingo Molnar <mingo@elte.hu>
Subject: [RFC] add struct hw_interrupt_type->release
Date: Wed, 20 Oct 2004 19:26:30 -0700 [thread overview]
Message-ID: <20041021022630.GA320@taniwha.stupidest.org> (raw)
In-Reply-To: <20041020130715.GA20287@infradead.org> <20041020023156.GA8597@taniwha.stupidest.org>
On Tue, Oct 19, 2004 at 07:31:56PM -0700, Chris Wedgwood wrote:
> +++ b/kernel/irq/manage.c 2004-10-19 17:47:40 -07:00
> @@ -260,6 +260,7 @@
> else
> desc->handler->disable(irq);
> }
^^^
> + platform_free_irq_notify(irq, dev_id);
> spin_unlock_irqrestore(&desc->lock,flags);
> unregister_handler_proc(irq, action);
>
On Wed, Oct 20, 2004 at 02:07:15PM +0100, Christoph Hellwig wrote:
> This looks rather bogus to me. What prevents UML from doing it's
> work at the struct hw_interrupt_type level?
the ^^^ marked part reads something like if (!desc->action) { ... }
presumably meaning the shutdown/disable is only done when the very
last user of an interrupt source is removed
UML needs to be notified when *any* user is removed so either need
some way to tell the generic code this or perhaps we could introduce
another op to hw_interrupt_type along the lines of ->release like
this:
===== include/linux/irq.h 1.12 vs edited =====
--- 1.12/include/linux/irq.h 2004-10-18 22:26:45 -07:00
+++ edited/include/linux/irq.h 2004-10-20 19:13:01 -07:00
@@ -47,6 +47,7 @@ struct hw_interrupt_type {
void (*ack)(unsigned int irq);
void (*end)(unsigned int irq);
void (*set_affinity)(unsigned int irq, cpumask_t dest);
+ void (*release)(unsigned int irq, void *dev_id);
};
typedef struct hw_interrupt_type hw_irq_controller;
===== kernel/irq/manage.c 1.1 vs edited =====
--- 1.1/kernel/irq/manage.c 2004-10-18 22:26:39 -07:00
+++ edited/kernel/irq/manage.c 2004-10-20 18:55:05 -07:00
@@ -253,6 +253,10 @@ void free_irq(unsigned int irq, void *de
/* Found it - now remove it from the list of entries */
*pp = action->next;
+
+ if (desc->handler->release)
+ desc->handler->release(irq, dev_id);
+
if (!desc->action) {
desc->status |= IRQ_DISABLED;
if (desc->handler->shutdown)
next prev parent reply other threads:[~2004-10-21 2:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-20 2:31 [PATCH] add hook to generic irq code (free_irq) Chris Wedgwood
2004-10-20 13:07 ` Christoph Hellwig
2004-10-20 19:42 ` Chris Wedgwood
2004-10-21 2:26 ` Chris Wedgwood [this message]
2004-10-21 2:35 ` [RFC] UML converstion to generic irq code (requires hw_interrupt_type->release(...) patch) Chris Wedgwood
2004-10-21 7:23 ` [RFC] add struct hw_interrupt_type->release Christoph Hellwig
2005-01-13 4:22 ` Paolo \'Blaisorblade\' Giarrusso
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=20041021022630.GA320@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).