mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paolo \\'Blaisorblade\\' Giarrusso" <blaisorblade@yahoo.it>
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] add struct hw_interrupt_type->release
Date: Thu, 13 Jan 2005 04:22:24 +0000 (UTC)	[thread overview]
Message-ID: <loom.20050113T043021-673@post.gmane.org> (raw)
In-Reply-To: <20041021072338.GA925@infradead.org>

Christoph Hellwig <hch <at> infradead.org> writes:

> 
> On Wed, Oct 20, 2004 at 07:26:30PM -0700, Chris Wedgwood wrote:
> > 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
> > >  <at>  <at>  -260,6 +260,7  <at>  <at> 
> > >  				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:

> Care to explain why it needs that?  How exactly is UML using hardirqs,
> they seems to fit very badly into the concept of a usermode kernel if
> you ask me.

> Maybe UML would be better off to not use hardirqs at all,
> ala s390.
I don't know about s390, however we have another developer in UML which has 
experience with Linux on that platform... I'll ask him.

However, the main idea is if an hardirq is raised, something has happened on a 
certain file descriptor, associated with the IRQ; the definition of "something 
has happened" is the one which holds for poll(), which is used to implement this 
(see arch/um/kernel/irq_user.c:activate_fd() ).

So, it is clear the need we have?

One real example is for /dev/tty1, when it's emulated by an xterm: we use an IRQ 
to wait for when we receive on a socket the fd of the pipe which connects us 
with the xterm. (The actual datas are not passed through the IRQ).

However, any plan about removing the hardirqs from UML is low-priority for me... 
we have the main need to get the code stable, afterwards to add new missing 
important features, and at the end to rewrite such things... at least until when 
we see the need for such a rewrite.

But the idea is not bad, I think (I am a newcomer, so I don't know why and when 
it was born, for this you could ask to Jeff Dike, if you want).


      reply	other threads:[~2005-01-13  4:30 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   ` [RFC] add struct hw_interrupt_type->release Chris Wedgwood
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 [this message]

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=loom.20050113T043021-673@post.gmane.org \
    --to=blaisorblade@yahoo.it \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome