<p dir="ltr">On Jul 27, 2015 3:54 AM, "Günther Kelleter" <<a href="mailto:guenther.kelleter@devolo.de">guenther.kelleter@devolo.de</a>> wrote:<br>
><br>
> create explicit 1:1 mapping before mcs814x_alloc_gc/irq_setup_generic_chip<br>
> marks all interrupts used and prevents mapping by dts init.<br>
> IRQ 0 is the timer interrupt and is not illegal!</p>
<p dir="ltr">Is the second hunk of the patch still necessary then? Some other people seem to have run into similar problems on Dove, you might to look at what they did to avoid having to remove the check against virq 0.</p>
<p dir="ltr">><br>
> Was broken since kernel 3.14.<br>
><br>
> Signed-off-by: Günther Kelleter <<a href="mailto:guenther.kelleter@devolo.de">guenther.kelleter@devolo.de</a>><br>
> ---<br>
>  target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c |  6 +++++-<br>
>  target/linux/mcs814x/patches-3.18/015-timer-irq.patch       | 11 +++++++++++<br>
>  2 files changed, 16 insertions(+), 1 deletion(-)<br>
>  create mode 100644 target/linux/mcs814x/patches-3.18/015-timer-irq.patch<br>
><br>
> diff --git a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c<br>
> index f84c412..fd4345f 100644<br>
> --- a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c<br>
> +++ b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c<br>
> @@ -71,6 +71,7 @@ static const struct of_device_id mcs814x_intc_ids[] = {<br>
>  void __init mcs814x_of_irq_init(void)<br>
>  {<br>
>         struct device_node *np;<br>
> +       struct irq_domain *domain;<br>
><br>
>         np = of_find_matching_node(NULL, mcs814x_intc_ids);<br>
>         if (!np)<br>
> @@ -80,7 +81,10 @@ void __init mcs814x_of_irq_init(void)<br>
>         if (!mcs814x_intc_base)<br>
>                 panic("unable to map intc cpu registers\n");<br>
><br>
> -       irq_domain_add_simple(np, 32, 0, &irq_generic_chip_ops, NULL);<br>
> +       domain = irq_domain_add_simple(np, 32, 0, &irq_domain_simple_ops, NULL);<br>
> +       if (!domain)<br>
> +               panic("unable to add irq domain\n");<br>
> +       irq_create_strict_mappings(domain, 0, 0, 32);<br>
><br>
>         of_node_put(np);<br>
><br>
> diff --git a/target/linux/mcs814x/patches-3.18/015-timer-irq.patch b/target/linux/mcs814x/patches-3.18/015-timer-irq.patch<br>
> new file mode 100644<br>
> index 0000000..9bbb094<br>
> --- /dev/null<br>
> +++ b/target/linux/mcs814x/patches-3.18/015-timer-irq.patch<br>
> @@ -0,0 +1,11 @@<br>
> +--- a/kernel/irq/irqdesc.c<br>
> ++++ b/kernel/irq/irqdesc.c<br>
> +@@ -381,7 +381,7 @@ int __handle_domain_irq(struct irq_domai<br>
> +        * Some hardware gives randomly wrong interrupts.  Rather<br>
> +        * than crashing, do something sensible.<br>
> +        */<br>
> +-      if (unlikely(!irq || irq >= nr_irqs)) {<br>
> ++      if (unlikely(irq >= nr_irqs)) {<br>
> +               ack_bad_irq(irq);<br>
> +               ret = -EINVAL;<br>
> +       } else {<br>
> --<br>
> 2.4.6.89.g851dcf4<br>
> _______________________________________________<br>
> openwrt-devel mailing list<br>
> <a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
> <a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</p>