All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhanzhenbo@gmail.com (Steve zhan)
To: linux-arm-kernel@lists.infradead.org
Subject: Question:add
Date: Fri, 11 Jan 2013 18:24:16 +0800	[thread overview]
Message-ID: <20130111102416.GA18438@android11.spreadtrum.com> (raw)

All:
	I have find that arm gic driver have not register irq_disable
method, as below:
static struct irq_chip gic_chip = {
	.name			= "GIC",
	.irq_mask		= gic_mask_irq,
	.irq_unmask		= gic_unmask_irq,
	.irq_eoi		= gic_eoi_irq,
	.irq_set_type		= gic_set_type,
	.irq_retrigger		= gic_retrigger,
#ifdef CONFIG_SMP
	.irq_set_affinity	= gic_set_affinity,
#endif
	.irq_set_wake		= gic_set_wake,
};

Question is: 
	When some drivers want to disable irq, maybe it will call 
linux standard inerface: irq_disable() that defined in include\
linux\interrupt.h, this function will call
void irq_disable(struct irq_desc *desc)
{
	irq_state_set_disabled(desc);
	if (desc->irq_data.chip->irq_disable) {
		desc->irq_data.chip->irq_disable(&desc->irq_data);
		irq_state_set_masked(desc);
	}
}

Because gic have not register irq_diable method, so the interrupt can
not disable immediately, it is enable until the interrupt come next time,
then disalbed by mask because irq_state_set_disable(desc);

I have checked irq_enable method:
void irq_enable(struct irq_desc *desc)
{
	irq_state_clr_disabled(desc);
	if (desc->irq_data.chip->irq_enable)
		desc->irq_data.chip->irq_enable(&desc->irq_data);
	else
		desc->irq_data.chip->irq_unmask(&desc->irq_data);
	irq_state_clr_masked(desc);
}
This method have do unmask when irq_enable method is not exist.

Is it a good idea to add irq_mask call in irq_disable()?


Regards,
Steve

                 reply	other threads:[~2013-01-11 10:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20130111102416.GA18438@android11.spreadtrum.com \
    --to=zhanzhenbo@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.