mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Magnus Damm" <magnus.damm@gmail.com>
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: "Hans J. Koch" <hjk@linutronix.de>,
	linux-kernel@vger.kernel.org, lethal@linux-sh.org,
	gregkh@suse.de, linux-sh@vger.kernel.org
Subject: Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver
Date: Wed, 21 May 2008 20:56:07 +0900	[thread overview]
Message-ID: <aec7e5c30805210456r6f09b1a4sfef5bcefc82f5ba6@mail.gmail.com> (raw)
In-Reply-To: <20080521110416.GA10407@digi.com>

On Wed, May 21, 2008 at 8:04 PM, Uwe Kleine-König
<Uwe.Kleine-Koenig@digi.com> wrote:
> Magnus Damm wrote:
>> What about letting the uio_pdrv code override info->handler and
>> info->enable_irq with the above functions if info->handler is NULL?
> ... if both info->handler and info->prep_read_poll are NULL and
> info->irq >= 0.

Even better! =)

>> The physically contiguous memory issue still needs to be solved
>> somehow though. What about using struct resouce flagged as
>> IORESOURCE_DMA to pass the amount of memory that should be allocated?
> I'm not sure that solving that problem in uio_pdrv is the right
> approach.  Other uio drivers might have the same problem, so better
> allow the userspace driver to allocate some memory in a more generic
> way?

I don't think there is any generic way for a user space driver to
allocate physically contiguous memory. If such way exists then we
should use that instead of course. Recommendations anyone?

>> Regarding loosing information, if your hardware device can't cope with
>> long latencies and drops things on the floor then improve your
>> latency, increase buffer size or design better hardware. Also, I don't
>> think the interrupt can go berserk since it will be disabled directly
>> by the interrupt handler.
> Assume your irq is stuck at its active level.  Normally the irq is
> then disabled after some time.  You can handle that in your userspace
> driver, but with acking in kernel space and returning IRQ_NONE or
> IRQ_HANDLED you get it for free.  Nevertheless, go on.

Ok, so normally if the irq is stuck as asserted then it gets disabled
after some time. In my case it gets disabled directly so see it as a
feature. =)

Would you like to fold in the irq_handler and irq_enable function in
your patch, or would you like me to make a patch that fits on top of
your latest version?

Thanks for your help!

/ magnus

  reply	other threads:[~2008-05-21 11:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 10:51 Magnus Damm
2008-05-20 10:51 ` [PATCH 01/03] uio: Add enable_irq() callback Magnus Damm
2008-05-21 11:58   ` Magnus Damm
2008-05-22 20:18     ` Hans J. Koch
2008-05-23  1:24       ` Magnus Damm
2008-05-23  8:43         ` Hans J. Koch
2008-05-20 10:51 ` [PATCH 02/03] uio: Add uio_platform driver Magnus Damm
2008-05-20 10:51 ` [PATCH 03/03] sh: Export sh7343/sh7722/sh7723 VPU/VEU blocks Magnus Damm
2008-05-20 21:07 ` [PATCH 00/03][RFC] Reusable UIO Platform Driver Hans J. Koch
2008-05-21  3:31   ` Magnus Damm
2008-05-21  6:49     ` Uwe Kleine-König
2008-05-21  7:49       ` Paul Mundt
2008-05-21  8:05         ` Uwe Kleine-König
2008-05-21  8:22           ` Magnus Damm
2008-05-21  8:50             ` Uwe Kleine-König
2008-05-21  8:09       ` Magnus Damm
2008-05-21  9:25         ` Uwe Kleine-König
2008-05-21 10:50           ` Magnus Damm
2008-05-21 11:04             ` Uwe Kleine-König
2008-05-21 11:56               ` Magnus Damm [this message]
2008-05-21 12:09                 ` 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=aec7e5c30805210456r6f09b1a4sfef5bcefc82f5ba6@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=Uwe.Kleine-Koenig@digi.com \
    --cc=gregkh@suse.de \
    --cc=hjk@linutronix.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@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

all inboxes | Powered by JetHome®