All of lore.kernel.org
 help / color / mirror / Atom feed
From: grant.likely@linaro.org (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 7/8] genirq: generic chip: Add linear irq domain support
Date: Wed, 29 May 2013 03:22:49 +0100	[thread overview]
Message-ID: <20130529022249.DE5ED3E14F1@localhost> (raw)
In-Reply-To: <20130506142539.450634298@linutronix.de>

On Mon, 06 May 2013 14:30:27 -0000, Thomas Gleixner <tglx@linutronix.de> wrote:
> Provide infrastructure for irq chip implementations which work on
> linear irq domains.
> 
> - Interface to allocate multiple generic chips which are associated to
>   the irq domain.
> 
> - Interface to get the generic chip pointer for a particular hardware
>   interrupt in the domain.
> 
> - irq domain mapping function to install the chip for a particular
>   interrupt.
> 
> Note: This lacks a removal function for now, but this is a draft patch
> the ARM folks to work on.
> 
> [ Sebastian Hesselbarth: Mask cache and pointer math fixups ]
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Hi Thomas,

Acked-by: Grant Likely <grant.likely@linaro.org>

But I have some comments below...

> ---
>  include/linux/irq.h       |   30 +++++++
>  include/linux/irqdomain.h |   12 ++
>  kernel/irq/generic-chip.c |  187 ++++++++++++++++++++++++++++++++++++++++++++--
>  kernel/irq/irqdomain.c    |    6 -
>  4 files changed, 223 insertions(+), 12 deletions(-)
> 
> Index: linux-2.6/include/linux/irq.h
> ===================================================================
> --- linux-2.6.orig/include/linux/irq.h
> +++ linux-2.6/include/linux/irq.h
> @@ -678,6 +678,8 @@ struct irq_chip_type {
>   * @wake_active:	Interrupt is marked as an wakeup from suspend source
>   * @num_ct:		Number of available irq_chip_type instances (usually 1)
>   * @private:		Private data for non generic chip callbacks
> + * @installed:		bitfield to denote installed interrupts
> + * @domain:		irq domain pointer
>   * @list:		List head for keeping track of instances
>   * @chip_types:		Array of interrupt irq_chip_types
>   *
> @@ -699,6 +701,8 @@ struct irq_chip_generic {
>  	u32			wake_active;
>  	unsigned int		num_ct;
>  	void			*private;
> +	unsigned long		installed;

This is probably something that the irqdomain should be keeping track of
internally, but that's an issue for a separate patch series.

[...]
> +struct irq_domain_ops irq_generic_chip_ops = {
> +	.map = irq_map_generic_chip,
> +	.xlate = irq_domain_xlate_onecell,

As discussed on IRC, should use onetwocell here for greater
compatibility with existing bindings.

Cheers,
g.

WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>, Arnd Bergmann <arnd@arndb.de>,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Jean-Francois Moine <moinejf@free.fr>,
	Gerlando Falauto <gerlando.falauto@keymile.com>,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [patch 7/8] genirq: generic chip: Add linear irq domain support
Date: Wed, 29 May 2013 03:22:49 +0100	[thread overview]
Message-ID: <20130529022249.DE5ED3E14F1@localhost> (raw)
In-Reply-To: <20130506142539.450634298@linutronix.de>

On Mon, 06 May 2013 14:30:27 -0000, Thomas Gleixner <tglx@linutronix.de> wrote:
> Provide infrastructure for irq chip implementations which work on
> linear irq domains.
> 
> - Interface to allocate multiple generic chips which are associated to
>   the irq domain.
> 
> - Interface to get the generic chip pointer for a particular hardware
>   interrupt in the domain.
> 
> - irq domain mapping function to install the chip for a particular
>   interrupt.
> 
> Note: This lacks a removal function for now, but this is a draft patch
> the ARM folks to work on.
> 
> [ Sebastian Hesselbarth: Mask cache and pointer math fixups ]
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Hi Thomas,

Acked-by: Grant Likely <grant.likely@linaro.org>

But I have some comments below...

> ---
>  include/linux/irq.h       |   30 +++++++
>  include/linux/irqdomain.h |   12 ++
>  kernel/irq/generic-chip.c |  187 ++++++++++++++++++++++++++++++++++++++++++++--
>  kernel/irq/irqdomain.c    |    6 -
>  4 files changed, 223 insertions(+), 12 deletions(-)
> 
> Index: linux-2.6/include/linux/irq.h
> ===================================================================
> --- linux-2.6.orig/include/linux/irq.h
> +++ linux-2.6/include/linux/irq.h
> @@ -678,6 +678,8 @@ struct irq_chip_type {
>   * @wake_active:	Interrupt is marked as an wakeup from suspend source
>   * @num_ct:		Number of available irq_chip_type instances (usually 1)
>   * @private:		Private data for non generic chip callbacks
> + * @installed:		bitfield to denote installed interrupts
> + * @domain:		irq domain pointer
>   * @list:		List head for keeping track of instances
>   * @chip_types:		Array of interrupt irq_chip_types
>   *
> @@ -699,6 +701,8 @@ struct irq_chip_generic {
>  	u32			wake_active;
>  	unsigned int		num_ct;
>  	void			*private;
> +	unsigned long		installed;

This is probably something that the irqdomain should be keeping track of
internally, but that's an issue for a separate patch series.

[...]
> +struct irq_domain_ops irq_generic_chip_ops = {
> +	.map = irq_map_generic_chip,
> +	.xlate = irq_domain_xlate_onecell,

As discussed on IRC, should use onetwocell here for greater
compatibility with existing bindings.

Cheers,
g.

  reply	other threads:[~2013-05-29  2:22 UTC|newest]

Thread overview: 177+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 18:25 [PATCH] irqchip: add support for Marvell Orion SoCs Sebastian Hesselbarth
2013-05-02 18:25 ` Sebastian Hesselbarth
2013-05-02 18:25 ` Sebastian Hesselbarth
2013-05-02 18:33 ` Sebastian Hesselbarth
2013-05-02 18:33   ` Sebastian Hesselbarth
2013-05-02 18:33   ` Sebastian Hesselbarth
2013-05-02 18:45   ` Russell King - ARM Linux
2013-05-02 18:45     ` Russell King - ARM Linux
2013-05-02 18:54     ` Sebastian Hesselbarth
2013-05-02 18:54       ` Sebastian Hesselbarth
2013-05-02 18:56       ` Russell King - ARM Linux
2013-05-02 18:56         ` Russell King - ARM Linux
2013-05-02 19:04         ` Sebastian Hesselbarth
2013-05-02 19:04           ` Sebastian Hesselbarth
2013-05-02 18:53 ` Jason Gunthorpe
2013-05-02 18:53   ` Jason Gunthorpe
2013-05-02 18:53   ` Jason Gunthorpe
2013-05-02 19:05   ` Sebastian Hesselbarth
2013-05-02 19:05     ` Sebastian Hesselbarth
2013-05-02 19:35     ` Jason Gunthorpe
2013-05-02 19:35       ` Jason Gunthorpe
2013-05-02 19:48       ` Sebastian Hesselbarth
2013-05-02 19:48         ` Sebastian Hesselbarth
2013-05-02 20:02         ` Andrew Lunn
2013-05-02 20:02           ` Andrew Lunn
2013-05-02 20:08           ` Gregory CLEMENT
2013-05-02 20:08             ` Gregory CLEMENT
2013-05-04 17:58         ` Jason Cooper
2013-05-04 17:58           ` Jason Cooper
2013-05-04 17:58           ` Jason Cooper
2013-05-02 19:11   ` Arnd Bergmann
2013-05-02 19:11     ` Arnd Bergmann
2013-05-02 19:34     ` Sebastian Hesselbarth
2013-05-02 19:34       ` Sebastian Hesselbarth
2013-05-02 19:37       ` Jason Gunthorpe
2013-05-02 19:37         ` Jason Gunthorpe
2013-05-02 19:39       ` Sebastian Hesselbarth
2013-05-02 19:39         ` Sebastian Hesselbarth
2013-05-02 19:22 ` Jason Cooper
2013-05-02 19:22   ` Jason Cooper
2013-05-02 19:22   ` Jason Cooper
2013-05-02 21:34 ` Thomas Gleixner
2013-05-02 21:34   ` Thomas Gleixner
2013-05-02 21:56   ` Sebastian Hesselbarth
2013-05-02 21:56     ` Sebastian Hesselbarth
2013-05-02 22:09     ` Arnd Bergmann
2013-05-02 22:09       ` Arnd Bergmann
2013-05-02 22:37       ` Sebastian Hesselbarth
2013-05-02 22:37         ` Sebastian Hesselbarth
2013-05-04 18:12         ` Jason Cooper
2013-05-04 18:12           ` Jason Cooper
2013-05-04 18:12           ` Jason Cooper
2013-05-02 23:48 ` [PATCH v2 0/5] ARM: orion: add orion irqchip driver Sebastian Hesselbarth
2013-05-02 23:48   ` Sebastian Hesselbarth
2013-05-02 23:48   ` Sebastian Hesselbarth
2013-05-02 23:48   ` [PATCH v2 1/5] irqchip: add support for Marvell Orion SoCs Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-03 12:55     ` Russell King - ARM Linux
2013-05-03 12:55       ` Russell King - ARM Linux
2013-05-03 13:13       ` Sebastian Hesselbarth
2013-05-03 13:13         ` Sebastian Hesselbarth
2013-05-03 14:09         ` Thomas Gleixner
2013-05-03 14:09           ` Thomas Gleixner
2013-05-03 21:50           ` [RFC patch 0/8] genirq: Support for irq domains in generic irq chip Thomas Gleixner
2013-05-03 21:50             ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 1/8] genirq: generic chip: Remove the local cur_regs() function Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-27 13:38               ` Grant Likely
2013-05-27 13:38                 ` Grant Likely
2013-05-03 21:50             ` [RFC patch 2/8] genirq: generic chip: Add support for per chip type mask cache Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 3/8] genirq: generic chip: Handle separate mask registers Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 4/8] genirq: generic chip: Cache per irq bit mask Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 22:24               ` Russell King - ARM Linux
2013-05-03 22:24                 ` Russell King - ARM Linux
2013-05-03 22:39                 ` Thomas Gleixner
2013-05-03 22:39                   ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 5/8] genirq: Add a mask calculation function Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 6/8] genirq: Split out code in generic chip Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-27 13:45               ` Grant Likely
2013-05-27 13:45                 ` Grant Likely
2013-05-03 21:50             ` [RFC patch 7/8] genirq: generic chip: Add linear irq domain support Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-03 22:23               ` Russell King - ARM Linux
2013-05-03 22:23                 ` Russell King - ARM Linux
2013-05-03 22:38                 ` Thomas Gleixner
2013-05-03 22:38                   ` Thomas Gleixner
2013-05-04  2:30               ` Sebastian Hesselbarth
2013-05-04  2:30                 ` Sebastian Hesselbarth
2013-05-04  8:04                 ` Thomas Gleixner
2013-05-04  8:04                   ` Thomas Gleixner
2013-05-06 12:32               ` [RFC patch 7/8] fixup 1/2: " Sebastian Hesselbarth
2013-05-06 12:32                 ` Sebastian Hesselbarth
2013-05-06 12:32                 ` [RFC patch 7/8] fixup 2/2: " Sebastian Hesselbarth
2013-05-06 12:32                   ` Sebastian Hesselbarth
2013-05-06 13:31                   ` Thomas Gleixner
2013-05-06 13:31                     ` Thomas Gleixner
2013-05-06 13:25                 ` [RFC patch 7/8] fixup 1/2: " Thomas Gleixner
2013-05-06 13:25                   ` Thomas Gleixner
2013-05-03 21:50             ` [RFC patch 8/8] irqchip: sun4i: Convert to generic irq chip Thomas Gleixner
2013-05-03 21:50               ` Thomas Gleixner
2013-05-04  2:37               ` Sebastian Hesselbarth
2013-05-04  2:37                 ` Sebastian Hesselbarth
2013-05-06  9:48             ` [RFC patch 0/8] genirq: Support for irq domains in " Uwe Kleine-König
2013-05-06  9:48               ` Uwe Kleine-König
2013-05-06 14:30             ` [patch 0/8] genirq: Support for irq domains in generic irq chip - V2 Thomas Gleixner
2013-05-06 14:30               ` Thomas Gleixner
2013-05-06 14:30               ` Thomas Gleixner
2013-05-06 14:30               ` [patch 1/8] genirq: generic chip: Remove the local cur_regs() function Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:14                 ` [tip:irq/core] genirq: Generic " tip-bot for Gerlando Falauto
2013-05-06 14:30               ` [patch 2/8] genirq: generic chip: Add support for per chip type mask cache Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:16                 ` [tip:irq/core] genirq: Generic " tip-bot for Gerlando Falauto
2013-05-06 14:30               ` [patch 3/8] genirq: generic chip: Handle separate mask registers Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:17                 ` [tip:irq/core] genirq: Generic " tip-bot for Gerlando Falauto
2013-05-06 14:30               ` [patch 4/8] genirq: generic chip: Cache per irq bit mask Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:18                 ` [tip:irq/core] genirq: Generic " tip-bot for Thomas Gleixner
2013-05-06 14:30               ` [patch 5/8] genirq: Add a mask calculation function Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:19                 ` [tip:irq/core] genirq: irqchip: " tip-bot for Thomas Gleixner
2013-05-06 14:30               ` [patch 6/8] genirq: Split out code in generic chip Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  9:21                 ` [tip:irq/core] genirq: Generic chip: Split out code into separate functions tip-bot for Thomas Gleixner
2013-05-06 14:30               ` [patch 7/8] genirq: generic chip: Add linear irq domain support Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-29  2:22                 ` Grant Likely [this message]
2013-05-29  2:22                   ` Grant Likely
2013-05-29  8:23                   ` Thomas Gleixner
2013-05-29  8:23                     ` Thomas Gleixner
2013-05-29  9:22                 ` [tip:irq/core] genirq: Generic " tip-bot for Thomas Gleixner
2013-05-06 14:30               ` [patch 8/8] irqchip: sun4i: Convert to generic irq chip Thomas Gleixner
2013-05-06 14:30                 ` Thomas Gleixner
2013-05-06 15:18                 ` Rob Herring
2013-05-06 15:18                   ` Rob Herring
2013-05-12 14:05                 ` [PATCH] irq-sun4i: Fix trivial build errors Maxime Ripard
2013-05-12 14:05                   ` Maxime Ripard
2013-05-12 14:08                 ` [patch 8/8] irqchip: sun4i: Convert to generic irq chip Maxime Ripard
2013-05-12 14:08                   ` Maxime Ripard
2013-05-12 14:14                   ` Maxime Ripard
2013-05-12 14:14                     ` Maxime Ripard
2013-05-13 10:57               ` [patch 0/8] genirq: Support for irq domains in generic irq chip - V2 Gerlando Falauto
2013-05-13 12:01                 ` Thomas Gleixner
2013-10-01 15:27               ` Gerlando Falauto
2013-10-01 15:27                 ` Gerlando Falauto
2013-05-02 23:48   ` [PATCH v2 2/5] ARM: dove: add DT parsing for legacy mv643xx_eth Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-03  5:06     ` Andrew Lunn
2013-05-03  5:06       ` Andrew Lunn
2013-05-03  5:06       ` Andrew Lunn
2013-05-03  9:58       ` Sebastian Hesselbarth
2013-05-03  9:58         ` Sebastian Hesselbarth
2013-05-04 18:29       ` Jason Cooper
2013-05-04 18:29         ` Jason Cooper
2013-05-04 18:29         ` Jason Cooper
     [not found]         ` <20130504182935.GO31290-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-05-04 19:37           ` Florian Fainelli
2013-05-02 23:48   ` [PATCH v2 3/5] ARM: dove: add DT parsing for legacy timer Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-02 23:48   ` [PATCH v2 4/5] ARM: dove: move DT boards to orion irqchip driver Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth
2013-05-02 23:48   ` [PATCH v2 5/5] ARM: dove: add DT nodes for irqchip conversion Sebastian Hesselbarth
2013-05-02 23:48     ` Sebastian Hesselbarth

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=20130529022249.DE5ED3E14F1@localhost \
    --to=grant.likely@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.