public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans J. Koch" <hjk@linutronix.de>
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: "Hans J. Koch" <hjk@linutronix.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"gregkh@suse.de" <gregkh@suse.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"lethal@linux-sh.org" <lethal@linux-sh.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH] uio_pdrv: Unique IRQ Mode
Date: Tue, 10 Jun 2008 11:01:59 +0200	[thread overview]
Message-ID: <20080610090158.GC4611@local> (raw)
In-Reply-To: <20080610061121.GA22814@digi.com>

On Tue, Jun 10, 2008 at 08:11:21AM +0200, Uwe Kleine-König wrote:
> > >
> > > IMHO it should be asserted that irqs are on before waiting for the irq
> > > in poll and read.  So I suggest to call irqcontrol(ON) before doing so.
> > > This should allow to work with that kind of hardware, right?
> > 
> > Yes. But userspace can simply write() a 1 to /dev/uioX to achieve the
> > same result. This would clearly show what's happening. Remember, this is
> > only needed for certain (broken) hardware. If we hide some automagic irq
> > enabling in the kernel, it'll become less obvious and might even have
> > some bad side effects. I want to avoid this kind of trickery, especially
> > as it is not needed. Userspace should use write() to control irqs. It's
> > like this with any normal UIO driver, and we shouldn't have a different
> > handling in uio_pdrv.
> > Think of a chip that's directly connected to the bus on some embedded
> > board. You use uio_pdrv to handle it. Then the very same chip appears on
> > a PCI card in a normal PC. You write a normal UIO driver for it. The
> > userspace part of both drivers could be exactly the same. But if
> > uio_pdrv automagically reenabled the irq, we would need different
> > handling in userspace, without reasons obvious to the user.

> Note that my intention is to enable irqs in uio.c, not uio_pdrv.c.

Forget it. We won't have some crap that automagically enables irqs in
read() and poll(), neither with irq_enable() nor with irqcontrol(). It's
not a clean solution. We now have a clean solution how userspace can
enable interrupts by using write(), and this (together with uio_pdrv)
can handle all cases we were talking about.

You keep arguing about code that neither introduces new features nor
offers any other advantages. I'm really tired of that.

Thanks,
Hans


  reply	other threads:[~2008-06-10  9:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  6:08 [PATCH] uio_pdrv: Unique IRQ Mode Magnus Damm
2008-06-04 10:11 ` Hans J. Koch
2008-06-05  1:25   ` Magnus Damm
2008-06-05  6:49     ` Uwe Kleine-König
2008-06-06  2:55       ` Magnus Damm
2008-06-06 10:04         ` Hans J. Koch
2008-06-08 10:03           ` Magnus Damm
2008-06-05  9:09     ` Hans J. Koch
2008-06-05  9:46       ` Magnus Damm
2008-06-05 11:27         ` Hans J. Koch
2008-06-08 10:19           ` Magnus Damm
2008-06-08 20:54             ` Hans J. Koch
2008-06-09  1:12               ` Magnus Damm
2008-06-09  8:44                 ` Hans J. Koch
2008-06-09  9:01                   ` Paul Mundt
2008-06-09 12:34                     ` Uwe Kleine-König
2008-06-10  3:12                       ` Greg KH
2008-06-10  4:40                       ` Magnus Damm
2008-06-10  7:10                         ` Uwe Kleine-König
2008-06-10  7:14                           ` [PATCH] UIO: minor style and comment fixes Uwe Kleine-König
2008-06-10  9:07                             ` Hans J. Koch
2008-06-10 13:50                           ` [PATCH] uio_pdrv: Unique IRQ Mode Magnus Damm
2008-06-10 17:32                           ` Paul Mundt
2008-06-10 19:24                             ` Uwe Kleine-König
2008-06-09  4:09               ` Paul Mundt
2008-06-09  7:57               ` Uwe Kleine-König
2008-06-09  8:00                 ` Paul Mundt
2008-06-09  9:54                 ` Hans J. Koch
2008-06-09 12:32                   ` Uwe Kleine-König
2008-06-09 14:20                     ` Hans J. Koch
2008-06-10  6:11                       ` Uwe Kleine-König
2008-06-10  9:01                         ` Hans J. Koch [this message]
2008-06-05 11:33         ` Uwe Kleine-König

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=20080610090158.GC4611@local \
    --to=hjk@linutronix.de \
    --cc=Uwe.Kleine-Koenig@digi.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=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