linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sr@denx.de (Stefan Roese)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] irqchip: sunxi: Add irq controller driver
Date: Fri, 16 Nov 2012 11:47:41 +0100	[thread overview]
Message-ID: <50A619CD.7020305@denx.de> (raw)
In-Reply-To: <20121116113805.053eb5fa@skate>

On 11/16/2012 11:38 AM, Thomas Petazzoni wrote:
>>> asmlinkage void __exception_irq_entry sunxi_handle_irq(struct pt_regs *regs)
>>> {
>>> 	u32 irq;
>>>
>>> 	irq = readl(int_base + SW_INT_VECTOR_REG) >> 2;
>>> 	irq = irq_find_mapping(sunxi_vic_domain, irq);
>>> 	handle_IRQ(irq, regs);
>>> }
>>>
>>> I suggest you give it a try.
>>
>> It definitely looks nicer. I'll try that and update.
> 
> How does this SW_INT_VECTOR_REG behave when there are multiple
> interrupts pending?

Not 100% sure. Hard to guess with this sparse documentation. I would
expect that multiple interrupts would be queued here.

> Shouldn't the code be something like:
> 
> 	do {
> 		hwirq = readl(int_base + SW_INT_VECTOR_REG) >> 2;
> 		irq = irq_find_mapping(sunxi_vic_domain, hwirq);
> 		handle_IRQ(irq, regs);
> 	} while(hwirq != 0);
> 
> Or maybe the != 0 is not the good condition, but the idea is to handle
> all pending interrupts. That said, the original code from Maxime was
> not doing that as well.

Yes, that would be a good change.

Thanks,
Stefan

  reply	other threads:[~2012-11-16 10:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 22:46 [PATCH 0/6] Add basic support for Allwinner A1X SoCs Maxime Ripard
2012-11-15 22:46 ` [PATCH 1/6] clocksource: sunxi: Add Allwinner A1X Timer Driver Maxime Ripard
2012-11-16 13:13   ` Thomas Petazzoni
2012-11-16 13:14   ` Thomas Petazzoni
2012-11-15 22:46 ` [PATCH 2/6] irqchip: sunxi: Add irq controller driver Maxime Ripard
2012-11-16  7:35   ` Stefan Roese
2012-11-16  9:16     ` Maxime Ripard
2012-11-16 10:38       ` Thomas Petazzoni
2012-11-16 10:47         ` Stefan Roese [this message]
2012-11-15 22:46 ` [PATCH 3/6] ARM: sunxi: Add basic support for Allwinner A1x SoCs Maxime Ripard
2012-11-16  7:42   ` Stefan Roese
2012-11-16  9:17     ` Maxime Ripard
2012-11-15 22:46 ` [PATCH 4/6] ARM: sunxi: Add earlyprintk support Maxime Ripard
2012-11-16  7:47   ` Stefan Roese
2012-11-16  9:20     ` Maxime Ripard
2012-11-16 10:41   ` Thomas Petazzoni
2012-11-15 22:46 ` [PATCH 5/6] ARM: sunxi: Add device tree for the A13 and the Olinuxino board Maxime Ripard
2012-11-16  7:57   ` Stefan Roese
2012-11-16  9:24     ` Maxime Ripard
2012-11-15 22:46 ` [PATCH 6/6] ARM: sunxi: Add entry to MAINTAINERS Maxime Ripard
2012-11-16  7:16 ` [PATCH 0/6] Add basic support for Allwinner A1X SoCs Stefan Roese
2012-11-16  7:51 ` Arnd Bergmann
2012-11-16  9:00   ` Stefan Roese
2012-11-16  9:26   ` Maxime Ripard
2012-11-16 13:11 ` Thomas Petazzoni

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=50A619CD.7020305@denx.de \
    --to=sr@denx.de \
    --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).