[patch 00/23] ARM: Final genirq cleanup

STALE5606d

32 messages, 5 authors, 2011-04-18 · open the first message on its own page

[patch 00/23] ARM: Final genirq cleanup

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:21:53

The following series cleans up the reminding open coded access to
irq_desc and converts the newly merged (sigh) msm to the new irq chip
functions.

The final patches make use of the generic show_interrupts() and
convert the namespace to the new irq_* function names. That conversion
was done with coccinelle. The last patch folds irq_set_chip and
irq_set_handler pairs into irq_set_chip_and_handler with coccinelle.

The series depends on the irq/cleanup branch in

    git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git

which will go to Linus later today.

If there are no objections I can push the whole lot through tip.

Thanks,

	tglx

 Kconfig                               |    1 
 common/gic.c                          |   15 ++----
 common/it8152.c                       |    4 -
 common/locomo.c                       |   17 +++---
 common/sa1111.c                       |   24 ++++-----
 common/vic.c                          |    6 +-
 include/asm/hw_irq.h                  |    8 ---
 kernel/ecard.c                        |    6 +-
 kernel/irq.c                          |   70 ++++------------------------
 mach-at91/at91cap9_devices.c          |    6 +-
 mach-at91/gpio.c                      |   43 ++++++-----------
 mach-at91/irq.c                       |    3 -
 mach-bcmring/irq.c                    |   10 ++--
 mach-clps711x/irq.c                   |    8 +--
 mach-davinci/cp_intc.c                |    4 -
 mach-davinci/gpio.c                   |   49 ++++++++------------
 mach-davinci/irq.c                    |    6 +-
 mach-dove/irq.c                       |   20 +++-----
 mach-ebsa110/core.c                   |    4 -
 mach-ep93xx/gpio.c                    |   52 ++++++++++++---------
 mach-exynos4/irq-combiner.c           |   13 ++---
 mach-exynos4/irq-eint.c               |   15 +++---
 mach-footbridge/common.c              |    3 -
 mach-footbridge/isa-irq.c             |   10 ++--
 mach-gemini/gpio.c                    |   14 ++---
 mach-gemini/irq.c                     |    6 +-
 mach-h720x/common.c                   |   22 ++++-----
 mach-h720x/cpu-h7202.c                |    6 +-
 mach-integrator/integrator_ap.c       |    4 -
 mach-integrator/integrator_cp.c       |   11 +---
 mach-iop13xx/irq.c                    |   10 ++--
 mach-iop13xx/msi.c                    |    6 +-
 mach-iop32x/irq.c                     |    3 -
 mach-iop33x/irq.c                     |    5 +-
 mach-ixp2000/core.c                   |   20 ++++----
 mach-ixp2000/ixdp2x00.c               |    6 +-
 mach-ixp2000/ixdp2x01.c               |    6 +-
 mach-ixp23xx/core.c                   |   14 ++---
 mach-ixp23xx/ixdp2351.c               |   12 ++--
 mach-ixp23xx/roadrunner.c             |    4 -
 mach-ixp4xx/avila-pci.c               |    8 +--
 mach-ixp4xx/common.c                  |    4 -
 mach-ixp4xx/coyote-pci.c              |    4 -
 mach-ixp4xx/dsmg600-pci.c             |   12 ++--
 mach-ixp4xx/fsg-pci.c                 |    6 +-
 mach-ixp4xx/gateway7001-pci.c         |    4 -
 mach-ixp4xx/goramo_mlr.c              |   12 ++--
 mach-ixp4xx/gtwx5715-pci.c            |    4 -
 mach-ixp4xx/ixdp425-pci.c             |    8 +--
 mach-ixp4xx/ixdpg425-pci.c            |    4 -
 mach-ixp4xx/nas100d-pci.c             |   10 ++--
 mach-ixp4xx/nslu2-pci.c               |    6 +-
 mach-ixp4xx/vulcan-pci.c              |    4 -
 mach-ixp4xx/wg302v2-pci.c             |    4 -
 mach-kirkwood/irq.c                   |   15 +++---
 mach-ks8695/gpio.c                    |    2 
 mach-ks8695/irq.c                     |   18 ++++---
 mach-lpc32xx/irq.c                    |   10 ++--
 mach-mmp/irq-mmp2.c                   |   18 +++----
 mach-mmp/irq-pxa168.c                 |    3 -
 mach-msm/board-msm8960.c              |    2 
 mach-msm/board-msm8x60.c              |    2 
 mach-msm/board-trout-gpio.c           |   10 ++--
 mach-msm/board-trout-mmc.c            |    2 
 mach-msm/gpio-v2.c                    |   49 ++++++++++----------
 mach-msm/gpio.c                       |   18 +++----
 mach-msm/irq-vic.c                    |    7 +-
 mach-msm/irq.c                        |    7 +-
 mach-msm/sirc.c                       |   11 ++--
 mach-mv78xx0/irq.c                    |    8 +--
 mach-mx3/mach-mx31ads.c               |    7 +-
 mach-mx5/eukrea_mbimx51-baseboard.c   |    2 
 mach-mxs/gpio.c                       |   10 ++--
 mach-mxs/icoll.c                      |    3 -
 mach-netx/generic.c                   |    6 +-
 mach-ns9xxx/board-a9m9750dev.c        |    8 +--
 mach-ns9xxx/irq.c                     |   60 ++----------------------
 mach-nuc93x/irq.c                     |    4 -
 mach-omap1/board-osk.c                |    6 +-
 mach-omap1/board-palmz71.c            |    8 +--
 mach-omap1/board-voiceblue.c          |    8 +--
 mach-omap1/fpga.c                     |   10 ++--
 mach-omap1/irq.c                      |    4 -
 mach-omap2/gpmc.c                     |    2 
 mach-omap2/irq.c                      |    3 -
 mach-orion5x/db88f5281-setup.c        |    4 -
 mach-orion5x/irq.c                    |    8 +--
 mach-orion5x/rd88f5182-setup.c        |    4 -
 mach-orion5x/terastation_pro2-setup.c |    2 
 mach-orion5x/ts209-setup.c            |    4 -
 mach-pnx4008/irq.c                    |   10 ++--
 mach-pxa/balloon3.c                   |    8 +--
 mach-pxa/cm-x2xx-pci.c                |    5 +-
 mach-pxa/cm-x300.c                    |    2 
 mach-pxa/irq.c                        |   12 ++--
 mach-pxa/lpd270.c                     |    8 +--
 mach-pxa/lubbock.c                    |    8 +--
 mach-pxa/mainstone.c                  |    8 +--
 mach-pxa/pcm990-baseboard.c           |    8 +--
 mach-pxa/pxa3xx.c                     |    4 -
 mach-pxa/viper.c                      |    8 +--
 mach-pxa/zeus.c                       |   19 ++++---
 mach-rpc/irq.c                        |   14 ++---
 mach-s3c2410/bast-irq.c               |    6 +-
 mach-s3c2412/irq.c                    |   12 ++--
 mach-s3c2416/irq.c                    |    8 +--
 mach-s3c2440/irq.c                    |   10 ++--
 mach-s3c2440/s3c244x-irq.c            |   14 ++---
 mach-s3c2443/irq.c                    |    8 +--
 mach-s3c64xx/irq-eint.c               |   13 ++---
 mach-sa1100/cerf.c                    |    2 
 mach-sa1100/irq.c                     |   16 +++---
 mach-sa1100/neponset.c                |    8 +--
 mach-sa1100/pleb.c                    |    2 
 mach-shark/irq.c                      |    3 -
 mach-shmobile/board-ap4evb.c          |    4 -
 mach-shmobile/board-mackerel.c        |    6 +-
 mach-shmobile/intc-sh7367.c           |    6 +-
 mach-shmobile/intc-sh7372.c           |    6 +-
 mach-shmobile/intc-sh7377.c           |    6 +-
 mach-tcc8k/irq.c                      |    6 +-
 mach-tegra/gpio.c                     |   83 ++++------------------------------
 mach-tegra/include/mach/suspend.h     |    2 
 mach-tegra/irq.c                      |    5 --
 mach-ux500/modem-irq-db5500.c         |    3 -
 mach-versatile/core.c                 |    6 +-
 mach-vt8500/irq.c                     |   14 ++---
 mach-w90x900/irq.c                    |    4 -
 plat-mxc/3ds_debugboard.c             |   14 +----
 plat-mxc/avic.c                       |    4 -
 plat-mxc/gpio.c                       |   24 +++++----
 plat-mxc/irq-common.c                 |    4 -
 plat-mxc/tzic.c                       |    4 -
 plat-nomadik/gpio.c                   |   50 +++++++++++---------
 plat-omap/gpio.c                      |   31 ++++--------
 plat-orion/gpio.c                     |   31 +++++-------
 plat-orion/irq.c                      |    8 +--
 plat-pxa/gpio.c                       |    6 +-
 plat-s3c24xx/irq.c                    |   43 ++++++++---------
 plat-s5p/irq-eint.c                   |    7 +-
 plat-s5p/irq-gpioint.c                |   22 ++++-----
 plat-samsung/irq-uart.c               |   10 +---
 plat-samsung/irq-vic-timer.c          |   13 ++---
 plat-samsung/wakeup-mask.c            |    8 +--
 plat-spear/shirq.c                    |   12 ++--
 plat-stmp3xxx/irq.c                   |    3 -
 plat-stmp3xxx/pinmux.c                |   13 ++---
 147 files changed, 714 insertions(+), 941 deletions(-)

[patch 03/23] arm: Use genirq lockdep helper to set lock class

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:21:58

An embedded and charset-unspecified text was scrubbed...
Name: genirq-use-lockdep-helper.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/488ac05f/attachment.ksh>

[patch 04/23] arm: Use irq flag setter function

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:21:59

An embedded and charset-unspecified text was scrubbed...
Name: arm-use-wrapper.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/c1ecfc9b/attachment.ksh>

[patch 06/23] arm: Cleanup irq_desc access

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:00

An embedded and charset-unspecified text was scrubbed...
Name: arm-orion.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/b5712747/attachment.ksh>

[patch 09/23] arm: nomadik: Use local irq state

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:04

An embedded and charset-unspecified text was scrubbed...
Name: arm-nomadik.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/c223535b/attachment.ksh>

[patch 13/23] arm: mxc: Use generic_handle_irq()

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:07

An embedded and charset-unspecified text was scrubbed...
Name: arm-mxc.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/290e6779/attachment.ksh>

[patch 12/23] arm: vt8500: Use proper irq accessors

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:09

An embedded and charset-unspecified text was scrubbed...
Name: arm-vt8500.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/5b414123/attachment.ksh>

[patch 18/23] arm: gic: Use proper accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:13

An embedded and charset-unspecified text was scrubbed...
Name: arm-gic.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/1065567f/attachment.ksh>

[patch 17/23] arm: at91: Cleanup irq chip

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:14

An embedded and charset-unspecified text was scrubbed...
Name: arm-at91.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/e001fa0e/attachment.ksh>

[patch 20/23] arm: Use generic show_interrupts()

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:28

An embedded and charset-unspecified text was scrubbed...
Name: arm-use-generic-show-interrupts.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/25f46106/attachment.ksh>

[patch 22/23] arm: Reorder irq_set_ function calls

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:34

An embedded and charset-unspecified text was scrubbed...
Name: arm-flip-chip-data-handler.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/5847dad9/attachment.ksh>

[patch 21/23] arm: Cleanup the irq namespace

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:36

An embedded and charset-unspecified text was scrubbed...
Name: arm-genirq-namespace-cleanup.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/52e93cdc/attachment.ksh>

[patch 23/23] arm: Fold irq_set_chip/irq_set_handler

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:22:46

An embedded and charset-unspecified text was scrubbed...
Name: arm-fold-chip-handler.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/db3ecef9/attachment.ksh>

[patch 19/23] arm: dove: Use proper irq accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:23:49

An embedded and charset-unspecified text was scrubbed...
Name: arm-mach-dove.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/3bee436e/attachment.ksh>

[patch 16/23] arm: davinci: Cleanup irq chip code

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:24:11

An embedded and charset-unspecified text was scrubbed...
Name: arm-davinci.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/93582149/attachment.ksh>

[patch 15/23] arm: ep93xx: Use proper irq accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:24:35

An embedded and charset-unspecified text was scrubbed...
Name: arm-ep93xx.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/a3123bf5/attachment.ksh>

[patch 14/23] arm: gemini: Use proper irq accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:24:51

An embedded and charset-unspecified text was scrubbed...
Name: arm-gemini.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/015cab95/attachment.ksh>

[patch 11/23] arm: msm: Use proper irq accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:25:23

An embedded and charset-unspecified text was scrubbed...
Name: arm-msm.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/52cd77a9/attachment.ksh>

[patch 10/23] arm: plat-omap: Cleanup irq_desc access

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:25:25

An embedded and charset-unspecified text was scrubbed...
Name: arm-omap.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/cc16f86e/attachment.ksh>

[patch 08/23] arm: stmp3xxx: Use generic_handle_irq()

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:26:00

An embedded and charset-unspecified text was scrubbed...
Name: arm-stmp3.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/a6cd019b/attachment.ksh>

[patch 07/23] arm: plat-samsung: Use proper irq accessor functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:26:17

An embedded and charset-unspecified text was scrubbed...
Name: arm-samsung.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/f3ef8a47/attachment.ksh>

[patch 05/23] arm: msm: Convert to new irq chip functions

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:27:02

An embedded and charset-unspecified text was scrubbed...
Name: arm-msm-convert-chip-functions.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/fcf907b6/attachment.ksh>

[patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:27:22

An embedded and charset-unspecified text was scrubbed...
Name: arm-tegra.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/10493adb/attachment.ksh>

[patch 01/23] arm: Ns9xxx: Remove private irq flow handler

From: Thomas Gleixner <hidden>
Date: 2011-03-25 13:27:38

An embedded and charset-unspecified text was scrubbed...
Name: arm-ns9xxx-remove-private-irq-flow-handler.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110325/fc1be487/attachment.ksh>

Re: [patch 17/23] arm: at91: Cleanup irq chip

From: Thomas Gleixner <hidden>
Date: 2011-03-25 21:03:28

On Fri, 25 Mar 2011, Thomas Gleixner wrote:
quoted hunk
Avoid the whole lazy disable dance in the demux handler by providing a
irq_disable() callback.

Use the proper accessor functions and tidy up gpio_irq_handler()

Signed-off-by: Thomas Gleixner <redacted>
---
 arch/arm/mach-at91/gpio.c |   31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

Index: linux-2.6-tip/arch/arm/mach-at91/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-at91/gpio.c
+++ linux-2.6-tip/arch/arm/mach-at91/gpio.c
@@ -375,6 +375,7 @@ static int gpio_irq_type(struct irq_data
 
 static struct irq_chip gpio_irqchip = {
 	.name		= "GPIO",
+	.irq_disable	= gpio_irq_mask,
 	.irq_mask	= gpio_irq_mask,
 	.irq_unmask	= gpio_irq_unmask,
 	.irq_set_type	= gpio_irq_type,
@@ -384,16 +385,14 @@ static struct irq_chip gpio_irqchip = {
 static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
 	unsigned	pin;
-	struct irq_desc	*gpio;
-	struct at91_gpio_chip *at91_gpio;
-	void __iomem	*pio;
+	struct irq_data *idata = irq_desc_get_irq_data(desc);
+	struct irq_chip *chip = irq_data_get_chip(data);
+	struct at91_gpio_chip *at91_gpio = irq_data_get_chip_data(data);
Sorry, needs to be

+	struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(data);

Will fix and resend.

Thanks,

	tglx

Re: [patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc

From: Varun Wadekar <hidden>
Date: 2011-03-26 20:12:19

Thomas, then how do you think we should handle restoring of gpio states
across suspend-resume cycles?

On Friday 25 March 2011 06:51 PM, Thomas Gleixner wrote:
quoted hunk
These functions are unused and in the way of cleanups in the core
code. If you have special requirements vs. irqs and PM then please
talk to me. Access to the generic core internals is going away.

Signed-off-by: Thomas Gleixner <redacted>
Cc: Colin Cross <redacted>
Cc: linux-tegra at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm/mach-tegra/gpio.c                 |   63 -----------------------------
 arch/arm/mach-tegra/include/mach/suspend.h |    2 
 2 files changed, 65 deletions(-)

Index: linux-2.6/arch/arm/mach-tegra/gpio.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-tegra/gpio.c
+++ linux-2.6/arch/arm/mach-tegra/gpio.c
@@ -254,69 +254,6 @@ static void tegra_gpio_irq_handler(unsig
 }
 
 #ifdef CONFIG_PM
-void tegra_gpio_resume(void)
-{
-	unsigned long flags;
-	int b, p, i;
-
-	local_irq_save(flags);
-
-	for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
-		struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
-
-		for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
-			unsigned int gpio = (b<<5) | (p<<3);
-			__raw_writel(bank->cnf[p], GPIO_CNF(gpio));
-			__raw_writel(bank->out[p], GPIO_OUT(gpio));
-			__raw_writel(bank->oe[p], GPIO_OE(gpio));
-			__raw_writel(bank->int_lvl[p], GPIO_INT_LVL(gpio));
-			__raw_writel(bank->int_enb[p], GPIO_INT_ENB(gpio));
-		}
-	}
-
-	local_irq_restore(flags);
-
-	for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
-		struct irq_desc *desc = irq_to_desc(i);
-		if (!desc || (desc->status & IRQ_WAKEUP))
-			continue;
-		enable_irq(i);
-	}
-}
-
-void tegra_gpio_suspend(void)
-{
-	unsigned long flags;
-	int b, p, i;
-
-	for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
-		struct irq_desc *desc = irq_to_desc(i);
-		if (!desc)
-			continue;
-		if (desc->status & IRQ_WAKEUP) {
-			int gpio = i - INT_GPIO_BASE;
-			pr_debug("gpio %d.%d is wakeup\n", gpio/8, gpio&7);
-			continue;
-		}
-		disable_irq(i);
-	}
-
-	local_irq_save(flags);
-	for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
-		struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
-
-		for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
-			unsigned int gpio = (b<<5) | (p<<3);
-			bank->cnf[p] = __raw_readl(GPIO_CNF(gpio));
-			bank->out[p] = __raw_readl(GPIO_OUT(gpio));
-			bank->oe[p] = __raw_readl(GPIO_OE(gpio));
-			bank->int_enb[p] = __raw_readl(GPIO_INT_ENB(gpio));
-			bank->int_lvl[p] = __raw_readl(GPIO_INT_LVL(gpio));
-		}
-	}
-	local_irq_restore(flags);
-}
-
 static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable)
 {
 	struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
Index: linux-2.6/arch/arm/mach-tegra/include/mach/suspend.h
===================================================================
--- linux-2.6.orig/arch/arm/mach-tegra/include/mach/suspend.h
+++ linux-2.6/arch/arm/mach-tegra/include/mach/suspend.h
@@ -23,14 +23,12 @@
 
 void tegra_pinmux_suspend(void);
 void tegra_irq_suspend(void);
-void tegra_gpio_suspend(void);
 void tegra_clk_suspend(void);
 void tegra_dma_suspend(void);
 void tegra_timer_suspend(void);
 
 void tegra_pinmux_resume(void);
 void tegra_irq_resume(void);
-void tegra_gpio_resume(void);
 void tegra_clk_resume(void);
 void tegra_dma_resume(void);
 void tegra_timer_resume(void);


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc

From: Thomas Gleixner <hidden>
Date: 2011-03-26 20:25:04

On Sun, 27 Mar 2011, Varun Wadekar wrote:
Thomas, then how do you think we should handle restoring of gpio states
across suspend-resume cycles?
That code is unused. Period. No caller, nothing nada. So what does it
handle?
 
quoted
-
-	for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
-		struct irq_desc *desc = irq_to_desc(i);
-		if (!desc || (desc->status & IRQ_WAKEUP))
-			continue;
-		enable_irq(i);
-	}
And this part is totally unacceptable and should have never been
merged. Further it is in the way of cleanups to the core code and as
there is no user I'm not willing to even think about what it does and
why it is there.

FYI, the core code deals with interrupt suspending/resuming
already. So if there is a problem with that which does not cover your
specific problem, then you better talk to me before hacking up such
private workarounds and expecting that I tolerate them in unused code.

Thanks,

	tglx

Re: [patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc

From: Colin Cross <hidden>
Date: 2011-03-26 22:37:41

On Sat, Mar 26, 2011 at 1:24 PM, Thomas Gleixner [off-list ref] wrote:
On Sun, 27 Mar 2011, Varun Wadekar wrote:
quoted
Thomas, then how do you think we should handle restoring of gpio states
across suspend-resume cycles?
That code is unused. Period. No caller, nothing nada. So what does it
handle?
Tegra suspend support didn't make it into 2.6.39, but should get
merged in 2.6.40, and will call tegra_gpio_suspend/resume.
quoted
quoted
-
- ? for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
- ? ? ? ? ? struct irq_desc *desc = irq_to_desc(i);
- ? ? ? ? ? if (!desc || (desc->status & IRQ_WAKEUP))
- ? ? ? ? ? ? ? ? ? continue;
- ? ? ? ? ? enable_irq(i);
- ? }
And this part is totally unacceptable and should have never been
merged. Further it is in the way of cleanups to the core code and as
there is no user I'm not willing to even think about what it does and
why it is there.

FYI, the core code deals with interrupt suspending/resuming
already. So if there is a problem with that which does not cover your
specific problem, then you better talk to me before hacking up such
private workarounds and expecting that I tolerate them in unused code.
Yes, the existing code wrong, and unnecessary.  It was copied from
mach-tegra/irq.c, which I later fixed, but I missed this one.  I'll
take this patch for 2.6.39-rc1, which will prevent merge conflicts
between your tree and the tegra tree in 2.6.40.

Re: [patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc

From: Thomas Gleixner <hidden>
Date: 2011-03-27 08:07:34

On Sat, 26 Mar 2011, Colin Cross wrote:
On Sat, Mar 26, 2011 at 1:24 PM, Thomas Gleixner [off-list ref] wrote:
quoted
On Sun, 27 Mar 2011, Varun Wadekar wrote:
quoted
Thomas, then how do you think we should handle restoring of gpio states
across suspend-resume cycles?
That code is unused. Period. No caller, nothing nada. So what does it
handle?
Tegra suspend support didn't make it into 2.6.39, but should get
merged in 2.6.40, and will call tegra_gpio_suspend/resume.
quoted
quoted
quoted
-
- ? for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
- ? ? ? ? ? struct irq_desc *desc = irq_to_desc(i);
- ? ? ? ? ? if (!desc || (desc->status & IRQ_WAKEUP))
- ? ? ? ? ? ? ? ? ? continue;
- ? ? ? ? ? enable_irq(i);
- ? }
And this part is totally unacceptable and should have never been
merged. Further it is in the way of cleanups to the core code and as
there is no user I'm not willing to even think about what it does and
why it is there.

FYI, the core code deals with interrupt suspending/resuming
already. So if there is a problem with that which does not cover your
specific problem, then you better talk to me before hacking up such
private workarounds and expecting that I tolerate them in unused code.
Yes, the existing code wrong, and unnecessary.  It was copied from
mach-tegra/irq.c, which I later fixed, but I missed this one.  I'll
take this patch for 2.6.39-rc1, which will prevent merge conflicts
between your tree and the tegra tree in 2.6.40.
You can keep the functions if you need them anyway, but the irq
fiddling needs to go now as it blocks core code cleanups.

Thanks,

	tglx

Re: [patch 17/23] arm: at91: Cleanup irq chip

From: Sergei Shtylyov <hidden>
Date: 2011-03-27 15:04:09

Hello.

On 26-03-2011 0:03, Thomas Gleixner wrote:
quoted
Avoid the whole lazy disable dance in the demux handler by providing a
irq_disable() callback.
quoted
Use the proper accessor functions and tidy up gpio_irq_handler()
quoted
Signed-off-by: Thomas Gleixner<redacted>
[...]
quoted
Index: linux-2.6-tip/arch/arm/mach-at91/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-at91/gpio.c
+++ linux-2.6-tip/arch/arm/mach-at91/gpio.c
[...]
quoted
@@ -384,16 +385,14 @@ static struct irq_chip gpio_irqchip = {
  static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
  {
  	unsigned	pin;
-	struct irq_desc	*gpio;
-	struct at91_gpio_chip *at91_gpio;
-	void __iomem	*pio;
+	struct irq_data *idata = irq_desc_get_irq_data(desc);
+	struct irq_chip *chip = irq_data_get_chip(data);
+	struct at91_gpio_chip *at91_gpio = irq_data_get_chip_data(data);
Sorry, needs to be
+	struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(data);
Will fix and resend.
    You also don't have 'data' defined anywhere, maybe you meant '?data'?

WBR, Sergei

Re: [patch 17/23] arm: at91: Cleanup irq chip

From: Thomas Gleixner <hidden>
Date: 2011-03-27 15:48:00

On Sun, 27 Mar 2011, Sergei Shtylyov wrote:
Hello.

On 26-03-2011 0:03, Thomas Gleixner wrote:
quoted
quoted
Avoid the whole lazy disable dance in the demux handler by providing a
irq_disable() callback.
quoted
quoted
Use the proper accessor functions and tidy up gpio_irq_handler()
quoted
quoted
Signed-off-by: Thomas Gleixner<redacted>
[...]
quoted
quoted
Index: linux-2.6-tip/arch/arm/mach-at91/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-at91/gpio.c
+++ linux-2.6-tip/arch/arm/mach-at91/gpio.c
[...]
quoted
quoted
@@ -384,16 +385,14 @@ static struct irq_chip gpio_irqchip = {
  static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
  {
  	unsigned	pin;
-	struct irq_desc	*gpio;
-	struct at91_gpio_chip *at91_gpio;
-	void __iomem	*pio;
+	struct irq_data *idata = irq_desc_get_irq_data(desc);
+	struct irq_chip *chip = irq_data_get_chip(data);
+	struct at91_gpio_chip *at91_gpio = irq_data_get_chip_data(data);
quoted
Sorry, needs to be
quoted
+	struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(data);
quoted
Will fix and resend.
   You also don't have 'data' defined anywhere, maybe you meant '?data'?
I know, the compiler already slapped me.

RE: [patch 21/23] arm: Cleanup the irq namespace

From: H Hartley Sweeten <hidden>
Date: 2011-04-18 17:43:18

On Friday, March 25, 2011 6:22 AM, Thomas Gleixner wrote:
Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <redacted>
---
 arch/arm/mach-ep93xx/gpio.c                    |   31 +++++++++++------
quoted hunk
Index: linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-ep93xx/gpio.c
+++ linux-2.6-tip/arch/arm/mach-ep93xx/gpio.c
@@ -231,20 +231,29 @@ void __init ep93xx_gpio_init_irq(void)
 
 	for (gpio_irq = gpio_to_irq(0);
 	     gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) {
-		set_irq_chip(gpio_irq, &ep93xx_gpio_irq_chip);
-		set_irq_handler(gpio_irq, handle_level_irq);
+		irq_set_chip(gpio_irq, &ep93xx_gpio_irq_chip);
+		irq_set_handler(gpio_irq, handle_level_irq);
 		set_irq_flags(gpio_irq, IRQF_VALID);
 	}
 
-	set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO0MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO1MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO2MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO3MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO4MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO5MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO6MUX, ep93xx_gpio_f_irq_handler);
-	set_irq_chained_handler(IRQ_EP93XX_GPIO7MUX, ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO_AB,
+				ep93xx_gpio_ab_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO0MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO1MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO2MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO3MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO4MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO5MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO6MUX,
+				ep93xx_gpio_f_irq_handler);
+	irq_set_chained_handler(IRQ_EP93XX_GPIO7MUX,
+				ep93xx_gpio_f_irq_handler);
 }
This appears to be the same patch as [27/29] arm: Cleanup the irq namespace

Regards,
Hartley
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help