linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zecke@selfish.org (Holger Freyther)
To: linux-arm-kernel@lists.infradead.org
Subject: TI-Davinci 6446 oops on interrupts
Date: Mon, 06 Jun 2011 17:10:49 +0200	[thread overview]
Message-ID: <4DECEDF9.4010202@selfish.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1106061650210.13964@ionos>

On 06/06/2011 04:54 PM, Thomas Gleixner wrote:

>> I resorted to printf debugging, it is IRQ 56 which is the IRQ_GPIOBNK0.. so I
>> wonder if this IRQ should end up in the GC GPIO code at all?
> 
> That depends on davinci_soc_info.intc_irq_num.
> 
> #define DAVINCI_N_AINTC_IRQ     64
> #define DA830_N_CP_INTC_IRQ     96
> #define TNETV107X_N_CP_INTC_IRQ                 96
> 
> No idea which one applies to your machine, but for all in tree boards
> 56 is in the range of intc interrupts.

It should be the DAVINCI_N_AINTC_IRQ (dm6446.c:davinci_soc_info_dm644x), I
have commented out the AINTC code in davinci_gpio_irq_setup and my crash is
gone, so without knowing the code at all I assume one should not end where we
end up.. or at least not with the parameters.

I have instrumented the GC IRQ code and I get:
IRQ40:
	Interrupt is 40 32
	RegBase is 0xfec48000 offset 28

IRQ56:
	Interrupt is 56...
	RegBase is 0x5ffffbff offset 28

and both interrupts should be on REG1.. so for IRQ56 it looks like this method
is entered with bogus data. Again, I have no idea about the underlying code,
but could there be an issue with chained irq and the GC IRC code?


going to dig deeper..
	holger




diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 31a9db7..fc505c3 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -74,6 +74,13 @@ void irq_gc_mask_set_bit(struct irq_data *d)
 void irq_gc_mask_clr_bit(struct irq_data *d)
 {
        struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+
+       if (d->irq > 31) {
+               printk(KERN_ERR "Interrupt is %d %d\n", d->irq, gc->irq_base);
+               printk(KERN_ERR "RegBase is 0x%p offset %lu\n", gc->reg_base,
+		       cur_regs(d)->mask);
+       }
+
        u32 mask = 1 << (d->irq - gc->irq_base);

        irq_gc_lock(gc);

  reply	other threads:[~2011-06-06 15:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 12:41 TI-Davinci 6446 oops on interrupts Holger Freyther
2011-06-06 13:40 ` Holger Hans Peter Freyther
2011-06-06 14:54   ` Thomas Gleixner
2011-06-06 15:10     ` Holger Freyther [this message]
2011-06-06 15:25       ` Thomas Gleixner
2011-06-06 15:32         ` Holger Freyther
2011-06-06 21:31           ` Thomas Gleixner
2011-06-06 22:50             ` Kevin Hilman
2011-06-07 18:13             ` Nori, Sekhar
2011-06-07 22:59               ` Thomas Gleixner
2011-06-10 18:47         ` Holger Freyther
2011-06-06 14:49 ` Thomas Gleixner
2011-06-06 16:32   ` Russell King - ARM Linux
2011-06-06 17:45     ` Holger Freyther
2011-06-06 17:50       ` Thomas Gleixner
2011-06-06 21:30     ` Thomas Gleixner
2011-06-06 16:30 ` Russell King - ARM Linux

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=4DECEDF9.4010202@selfish.org \
    --to=zecke@selfish.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).