public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
To: linux-sh@vger.kernel.org
Subject: Re: INTC issue
Date: Tue, 10 Feb 2009 10:28:08 +0000	[thread overview]
Message-ID: <499156B8.5070903@renesas.com> (raw)
In-Reply-To: <498AD5E4.8050809@renesas.com>

Hi Magnus-san,

Thank you very much for your comment!

Magnus Damm wrote:
> Hi Shimoda-san,
> 
> Thanks for bringing up this issue and thanks for the patch!
> 
- snip -
> 
> Hm, counter may work half-ok, but I think we end up with broken logic
> anyhow. Counters would result in that enabling and disabling of
> interrupts sometimes result in enable/disable depending on the count
> value. For interrupt sources belonging to a single driver we can
> probably live with that, but it may become very strange if we share
> enable bit between multiple drivers. A driver most likely expects that
> interrupt disable really disables interrupts. =)
> 
> I would prefer to map all vectors that share a enable/disable bit to a
> single interrupt number instead. This is somewhat similar to interrupt
> sharing. The common irq code handles interrupt count for us. Look at
> desc->depth inside linux/kernel/irq/*.
> 
> As an example, right now in the sh7785 dma case you have 14 vectors
> divided into 7 DMAC0 sources and 7 DMAC1 sources. A total of 14 dma
> interrupts in linux. I would prefer to map them to 2 linux interrupts
> instead, one for DMAC0 and one for DMAC1. So all DMAC0 vectors map to
> the DMAC0 linux interrupt and same for DMAC1. Each linux interrupt can
> be enabled and disabled as a regular interrupt source.
> 
> Would that work for you? I hope you can determine interrupt source by
> checking status bits in the dma hardware block. Or maybe you can't and
> need separate interrupt handlers?

I sent the patch.
http://marc.info/?l=linux-sh&m\x123417952130537&w=2
But, I did not write down the explanation of this patch...
I implemented the "maps" to this patch. The "enabled_bit" is it.
Would you check this patch?

Thanks,
Yoshihiro Shimoda


  parent reply	other threads:[~2009-02-10 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05 12:04 INTC issue Yoshihiro Shimoda
2009-02-10  8:13 ` Magnus Damm
2009-02-10 10:28 ` Yoshihiro Shimoda [this message]
2009-02-12 12:09 ` Magnus Damm
2009-02-17  6:21 ` Yoshihiro Shimoda
2009-02-24 14:12 ` Magnus Damm
2009-02-25  4:11 ` Yoshihiro Shimoda

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=499156B8.5070903@renesas.com \
    --to=shimoda.yoshihiro@renesas.com \
    --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