From: slapdau@yahoo•com.au (Craig McGeachie)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] irq: bcm2835: Re-implement the hardware IRQ handler.
Date: Wed, 02 Oct 2013 19:31:20 +1300 [thread overview]
Message-ID: <524BBDB8.70301@yahoo.com.au> (raw)
In-Reply-To: <524B7E90.30000@wwwdotorg.org>
On 10/02/2013 03:01 PM, Stephen Warren wrote:
>>>> +static struct irq_chip bmc2835_chip = {
>>>> + .name = "bmc2835-level",
>>>> + .irq_mask = bmc2835_mask_irq,
>>>> + .irq_unmask = bmc2835_unmask_irq,
>>>> + .irq_ack = bmc2835_mask_irq,
>>>> +};
>>>
>>> Why should an IRQ be masked by the ack operation?
>>
>> To be honest, I don't know for sure. I took my cue from
>> Documentation/arm/Interrupts.
>>
>> ack - required. May be the same function as mask for IRQs
>> handled by do_level_IRQ.
>>
>> Some other irq_chips are set up the same way and I can't see any other
>> way of implementing an acknowledgement function. And my experience with
>> a never ending flow of interrupts while writing the mailbox driver made
>> me think it might be good idea for the BMC2835 as well.
>
> OK, it makes sense to implement that.
>
Possibly not. I've dug a little deeper and followed the call chain
through handle_level_irq() to mask_ack_irq().
static inline void mask_ack_irq(struct irq_desc *desc)
{
if (desc->irq_data.chip->irq_mask_ack)
desc->irq_data.chip->irq_mask_ack(&desc->irq_data);
else {
desc->irq_data.chip->irq_mask(&desc->irq_data);
if (desc->irq_data.chip->irq_ack)
desc->irq_data.chip->irq_ack(&desc->irq_data);
}
irq_state_set_masked(desc);
}
I've not looked further to find out why code and documentation are
different, but it looks like the .irq_ack is unnecessary, but harmless
beyond an unneeded function call. I plan to drop it.
Cheers,
Craig.
next prev parent reply other threads:[~2013-10-02 6:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1379751251-2799-1-git-send-email-slapdau@yahoo.com.au>
[not found] ` <5e0b6222e8648fb0c63aa649ee70b29d11f4924f@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid>
2013-09-26 8:19 ` [PATCH] irq: bcm2835: Re-implement the hardware IRQ handler Craig McGeachie
2013-09-26 11:28 ` Simon Arlott
2013-10-02 2:12 ` Stephen Warren
2013-10-02 7:35 ` Craig McGeachie
2013-10-05 2:19 ` Craig McGeachie
[not found] ` <1379755112-19446-1-git-send-email-slapdau@yahoo.com.au>
2013-09-24 3:38 ` Stephen Warren
2013-09-24 8:09 ` Craig McGeachie
2013-10-02 2:01 ` Stephen Warren
2013-10-02 6:31 ` Craig McGeachie [this message]
2013-10-04 9:40 ` Craig McGeachie
2013-09-25 6:00 ` Craig McGeachie
2013-10-02 2:04 ` Stephen Warren
2013-10-02 7:25 ` Craig McGeachie
2013-09-27 9:57 ` [PATCH v3] irq: bmc2835: " Craig McGeachie
2013-10-02 2:23 ` Stephen Warren
2013-10-02 8:51 ` Craig McGeachie
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=524BBDB8.70301@yahoo.com.au \
--to=slapdau@yahoo$(echo .)com.au \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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