* [patch 20/75] arm: Ns9xxx: Remove private irq flow handler
[not found] <20110210222908.661199947@linutronix.de>
@ 2011-02-10 23:36 ` Thomas Gleixner
2011-02-10 23:37 ` [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc Thomas Gleixner
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2011-02-10 23:36 UTC (permalink / raw)
To: linux-arm-kernel
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/20110210/6d23cb43/attachment.ksh>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc
[not found] <20110210222908.661199947@linutronix.de>
2011-02-10 23:36 ` [patch 20/75] arm: Ns9xxx: Remove private irq flow handler Thomas Gleixner
@ 2011-02-10 23:37 ` Thomas Gleixner
2011-02-10 23:48 ` Colin Cross
1 sibling, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2011-02-10 23:37 UTC (permalink / raw)
To: linux-arm-kernel
An embedded and charset-unspecified text was scrubbed...
Name: arm-tegra.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110210/f5bcbf8a/attachment.ksh>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc
2011-02-10 23:37 ` [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc Thomas Gleixner
@ 2011-02-10 23:48 ` Colin Cross
0 siblings, 0 replies; 3+ messages in thread
From: Colin Cross @ 2011-02-10 23:48 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 10, 2011 at 3:37 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> 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 <tglx@linutronix.de>
> Cc: Colin Cross <ccross@android.com>
> 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/irq.c ?| ? 58 -----------------------------------------
> ?2 files changed, 121 deletions(-)
>
> Index: linux-2.6-tip/arch/arm/mach-tegra/gpio.c
> ===================================================================
> --- linux-2.6-tip.orig/arch/arm/mach-tegra/gpio.c
> +++ linux-2.6-tip/arch/arm/mach-tegra/gpio.c
> @@ -253,69 +253,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-tip/arch/arm/mach-tegra/irq.c
> ===================================================================
> --- linux-2.6-tip.orig/arch/arm/mach-tegra/irq.c
> +++ linux-2.6-tip/arch/arm/mach-tegra/irq.c
> @@ -111,61 +111,3 @@ void __init tegra_init_irq(void)
> ? ? ? ? ? ? ? ?set_irq_flags(i, IRQF_VALID);
> ? ? ? ?}
> ?}
> -
> -#ifdef CONFIG_PM
> -static u32 cop_ier[PPI_NR];
> -static u32 cpu_ier[PPI_NR];
> -static u32 cpu_iep[PPI_NR];
> -
> -void tegra_irq_suspend(void)
> -{
> - ? ? ? unsigned long flags;
> - ? ? ? int i;
> -
> - ? ? ? for (i = INT_PRI_BASE; i < INT_GPIO_BASE; i++) {
> - ? ? ? ? ? ? ? struct irq_desc *desc = irq_to_desc(i);
> - ? ? ? ? ? ? ? if (!desc)
> - ? ? ? ? ? ? ? ? ? ? ? continue;
> - ? ? ? ? ? ? ? if (desc->status & IRQ_WAKEUP) {
> - ? ? ? ? ? ? ? ? ? ? ? pr_debug("irq %d is wakeup\n", i);
> - ? ? ? ? ? ? ? ? ? ? ? continue;
> - ? ? ? ? ? ? ? }
> - ? ? ? ? ? ? ? disable_irq(i);
> - ? ? ? }
> -
> - ? ? ? local_irq_save(flags);
> - ? ? ? for (i = 0; i < PPI_NR; i++) {
> - ? ? ? ? ? ? ? void __iomem *ictlr = ictlr_to_virt(i);
> - ? ? ? ? ? ? ? cpu_ier[i] = readl(ictlr + ICTLR_CPU_IER);
> - ? ? ? ? ? ? ? cpu_iep[i] = readl(ictlr + ICTLR_CPU_IEP_CLASS);
> - ? ? ? ? ? ? ? cop_ier[i] = readl(ictlr + ICTLR_COP_IER);
> - ? ? ? ? ? ? ? writel(~0, ictlr + ICTLR_COP_IER_CLR);
> - ? ? ? }
> - ? ? ? local_irq_restore(flags);
> -}
> -
> -void tegra_irq_resume(void)
> -{
> - ? ? ? unsigned long flags;
> - ? ? ? int i;
> -
> - ? ? ? local_irq_save(flags);
> - ? ? ? for (i = 0; i < PPI_NR; i++) {
> - ? ? ? ? ? ? ? void __iomem *ictlr = ictlr_to_virt(i);
> - ? ? ? ? ? ? ? writel(cpu_iep[i], ictlr + ICTLR_CPU_IEP_CLASS);
> - ? ? ? ? ? ? ? writel(~0ul, ictlr + ICTLR_CPU_IER_CLR);
> - ? ? ? ? ? ? ? writel(cpu_ier[i], ictlr + ICTLR_CPU_IER_SET);
> - ? ? ? ? ? ? ? writel(0, ictlr + ICTLR_COP_IEP_CLASS);
> - ? ? ? ? ? ? ? writel(~0ul, ictlr + ICTLR_COP_IER_CLR);
> - ? ? ? ? ? ? ? writel(cop_ier[i], ictlr + ICTLR_COP_IER_SET);
> - ? ? ? }
> - ? ? ? local_irq_restore(flags);
> -
> - ? ? ? for (i = INT_PRI_BASE; i < INT_GPIO_BASE; i++) {
> - ? ? ? ? ? ? ? struct irq_desc *desc = irq_to_desc(i);
> - ? ? ? ? ? ? ? if (!desc || (desc->status & IRQ_WAKEUP))
> - ? ? ? ? ? ? ? ? ? ? ? continue;
> - ? ? ? ? ? ? ? enable_irq(i);
> - ? ? ? }
> -}
> -#endif
>
>
>
Acked-by: Colin Cross <ccross@android.com>
These functions are clearly incorrectly accessing IRQ internals. I
have replacements that have been posted for review that properly track
the wakeup state using set_wake, but they are held up on some
unrelated PM changes.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-10 23:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110210222908.661199947@linutronix.de>
2011-02-10 23:36 ` [patch 20/75] arm: Ns9xxx: Remove private irq flow handler Thomas Gleixner
2011-02-10 23:37 ` [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc Thomas Gleixner
2011-02-10 23:48 ` Colin Cross
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).