devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
To: Christian Ruppert
	<christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
Cc: Pierrick Hascoet
	<pierrick.hascoet-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Vineet Gupta
	<Vineet.Gupta1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH V3] irqchip: Add TB10x interrupt controller driver
Date: Fri, 31 May 2013 19:32:34 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1305311835040.2905@ionos> (raw)
In-Reply-To: <1370014348-21121-1-git-send-email-christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>

On Fri, 31 May 2013, Christian Ruppert wrote:

> The SOC interrupt controller driver for the Abilis Systems TB10x series of
> SOCs based on ARC700 CPUs.
> 
> This patch depends on commits eb76bdd407d8a90e59a06cb0158886df390e5d1c and
> 712bc93df9e7f14b8a163148d2aa7c778e151627 from branch irq/for-arm of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git.

That branch can be pulled into ARC as well. It only contains the
changes, which are necessary for the irq domain support of the generic
irq chip.

> +static void tb10x_irq_cascade(unsigned int irq, struct irq_desc *desc)
> +{
> +	struct irq_domain *domain = irq_desc_get_handler_data(desc);
> +
> +	generic_handle_irq(irq_find_mapping(domain, irq));
> +}

...

> +	for (i = 0; i < nrirqs; i++) {
> +		unsigned int irq = irq_of_parse_and_map(ictl, i);
> +
> +		irq_set_handler_data(irq, domain);
> +		irq_set_chained_handler(irq, tb10x_irq_cascade);
> +	}

I might be completely confused, but this does not make any sense at
all.

You allocate a linear domain and then map the interrupts in the
domain. The mapping function retrieves the hardware interrupt number
and creates a virtual interrupt number, installs the chip and the
handler for the interrupt and finally returns the virtual interrupt
number.

Now you take that virtual interrupt number and install
tb10x_irq_cascade as the handler. irq_set_chained_handler() will
startup (unmask) the interrupt right away.

In the cascade handler you take the virtual interrupt number, which
you get as argument, and find the mapping, i.e. the matching VIRTUAL
interrupt number for the VIRTUAL interrupt number and then call the
handler.

How is this supposed to work?

Thanks,

	tglx

  parent reply	other threads:[~2013-05-31 17:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 13:17 [PATCH] irqchip: Add TB10x interrupt controller driver Christian Ruppert
2013-05-07 12:37 ` [PATCH REBASE] " Christian Ruppert
2013-05-27 10:06   ` Vineet Gupta
2013-05-27 12:26   ` Thomas Gleixner
2013-05-28 16:34     ` [PATCH V2] " Christian Ruppert
2013-05-30 21:19       ` Grant Likely
2013-05-31 15:32         ` [PATCH V3] " Christian Ruppert
     [not found]           ` <1370014348-21121-1-git-send-email-christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2013-05-31 17:32             ` Thomas Gleixner [this message]
2013-05-31 22:18               ` Grant Likely
2013-06-01 11:01                 ` Christian Ruppert
     [not found]                   ` <20130601110133.GA4051-7oYq3qWSd+k@public.gmane.org>
2013-06-03  5:33                     ` [PATCH V3] irqchip: Add TB10x interrupt controller driver (2) Vineet Gupta
2013-06-03  8:00                       ` Christian Ruppert
2013-06-13  8:26                   ` [PATCH V3] irqchip: Add TB10x interrupt controller driver Christian Ruppert
2013-06-03  4:05                 ` Vineet Gupta
2013-06-03  9:51                   ` Grant Likely
2013-06-25 13:29                     ` Christian Ruppert
2013-06-25 13:33                       ` Grant Likely
2013-06-25 13:58             ` Thomas Gleixner
2013-06-25 14:11               ` Christian Ruppert
2013-06-25 14:37                 ` Thomas Gleixner
2013-06-25 16:29                   ` [PATCH V4] " Christian Ruppert
2013-06-26  4:17                   ` [PATCH V3] " Vineet Gupta
2013-06-26 14:01                     ` [PATCH] ARC: [TB10x] Updates for irqchip driver Christian Ruppert
2013-06-27  2:33                       ` Vineet Gupta
2013-06-26  4:23                 ` [PATCH V3] irqchip: Add TB10x interrupt controller driver Vineet Gupta

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=alpine.LFD.2.02.1305311835040.2905@ionos \
    --to=tglx-hfztesqfncyowbw4kg4ksq@public.gmane.org \
    --cc=Vineet.Gupta1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pierrick.hascoet-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).