lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irq: fix crash due to op-less irq domains
Linus,

On 12/14/2011 02:55 PM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> IRQ domains without ops does not work anymore after commit
> "irq: support domains with non-zero hwirq base", since the
> check dereferences domain->ops->to_irq without checking of
> domain->ops are NULL. This makes U300 (and probably most other
> systems using the PL190 VIC) boot again.

I thought the VIC series had the fix for this, but it seems not. NULL
ops is considered invalid based on the code comments. The correct fix is
this patch:

irqdomain: export irq_domain_simple_ops for !CONFIG_OF
http://www.spinics.net/lists/arm-kernel/msg150290.html

I believe this is going in with some iMX changes. But I guess the VIC is
going to need a fix to use irq_domain_simple_ops.

Rob

> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> include/linux/irqdomain.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
> index 99834e58..78a1e66 100644
> --- a/include/linux/irqdomain.h
> +++ b/include/linux/irqdomain.h
> @@ -74,7 +74,7 @@ struct irq_domain {
> static inline unsigned int irq_domain_to_irq(struct irq_domain *d,
> unsigned long hwirq)
> {
> - if (d->ops->to_irq)
> + if (d->ops && d->ops->to_irq)
> return d->ops->to_irq(d, hwirq);
> if (WARN_ON(hwirq < d->hwirq_base))
> return 0;


\
 
 \ /
  Last update: 2011-12-14 23:17    [W:0.043 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site