All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Emil Renner Berthing <kernel@esmil.dk>
Subject: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
Date: Tue,  1 Feb 2022 12:02:58 +0000	[thread overview]
Message-ID: <20220201120310.878267-1-maz@kernel.org> (raw)

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Emil Renner Berthing <kernel@esmil.dk>
Subject: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
Date: Tue,  1 Feb 2022 12:02:58 +0000	[thread overview]
Message-ID: <20220201120310.878267-1-maz@kernel.org> (raw)

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Emil Renner Berthing <kernel@esmil.dk>
Subject: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
Date: Tue,  1 Feb 2022 12:02:58 +0000	[thread overview]
Message-ID: <20220201120310.878267-1-maz@kernel.org> (raw)

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-02-01 12:04 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 12:02 Marc Zyngier [this message]
2022-02-01 12:02 ` [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Marc Zyngier
2022-02-01 12:02 ` Marc Zyngier
2022-02-01 12:02 ` [PATCH 01/12] genirq: Allow the PM device to originate from " Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-03  7:04   ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 02/12] irqchip/gic: Move PM device over to " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 03/12] irqchip/renesas-intc-gpio: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:27   ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-09 13:40     ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] irqchip/renesas-intc-irqpin: " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 04/12] irqchip/renesas-irqc: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 05/12] irqchip/imx-intmux: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 06/12] gpio: mt7621: Kill parent_device usage Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 07/12] gpio: omap: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-03  7:05   ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 08/12] gpio: rcar: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 09/12] gpio: tpmx86: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-11  0:42   ` [PATCH 10/12] " Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-01 12:03 ` [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 15:16   ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:30     ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 16:06     ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 12/12] genirq: Kill irq_chip::parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-08 11:13 ` [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski

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=20220201120310.878267-1-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=avifishman70@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=grygorii.strashko@ti.com \
    --cc=kernel@esmil.dk \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tmaimon77@gmail.com \
    /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.