From: Jiang Liu <jiang.liu@linux.intel.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] genirq: Abstract access to irq_chip flags
Date: Fri, 09 Jan 2015 11:00:25 +0800 [thread overview]
Message-ID: <54AF4449.2040004@linux.intel.com> (raw)
In-Reply-To: <1420738365-22063-2-git-send-email-marc.zyngier@arm.com>
On 2015/1/9 1:32, Marc Zyngier wrote:
> In order to safely migrate to a cumulative set of flags, start by
> abstracting the way we look at these flags. There is otherwise no
> change in semantics here.
<snit>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 8069237..b2a43e0 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -491,7 +491,7 @@ static int set_irq_wake_real(unsigned int irq, unsigned int on)
> struct irq_desc *desc = irq_to_desc(irq);
> int ret = -ENXIO;
>
> - if (irq_desc_get_chip(desc)->flags & IRQCHIP_SKIP_SET_WAKE)
> + if (irq_desc_get_chip_flags(desc) & IRQCHIP_SKIP_SET_WAKE)
> return 0;
>
> if (desc->irq_data.chip->irq_set_wake)
> @@ -589,7 +589,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
>
> flags &= IRQ_TYPE_SENSE_MASK;
>
> - if (chip->flags & IRQCHIP_SET_TYPE_MASKED) {
> + if (irq_desc_get_chip_flags(desc) & IRQCHIP_SET_TYPE_MASKED) {
> if (!irqd_irq_masked(&desc->irq_data))
> mask_irq(desc);
> if (!irqd_irq_disabled(&desc->irq_data))
> @@ -1043,7 +1043,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
> * chip flags, so we can avoid the unmask dance at the end of
> * the threaded handler for those.
> */
> - if (desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)
> + if (irq_desc_get_chip_flags(desc) & IRQCHIP_ONESHOT_SAFE)
> new->flags &= ~IRQF_ONESHOT;
>
> /*
Hi Mark,
Seems you missed on instance of IRQCHIP_ONESHOT_SAFE in
__setup_irq() as below.
Thanks!
Gerry
-----------------------------------------------------------------
} else if (new->handler == irq_default_primary_handler &&
!(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) {
------------------------------------------------------------------
> diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
> index 3ca5325..8ed029d 100644
> --- a/kernel/irq/pm.c
> +++ b/kernel/irq/pm.c
> @@ -88,7 +88,7 @@ static bool suspend_device_irq(struct irq_desc *desc, int irq)
> * chip level. The chip implementation indicates that with
> * IRQCHIP_MASK_ON_SUSPEND.
> */
> - if (irq_desc_get_chip(desc)->flags & IRQCHIP_MASK_ON_SUSPEND)
> + if (irq_desc_get_chip_flags(desc) & IRQCHIP_MASK_ON_SUSPEND)
> mask_irq(desc);
> return true;
> }
>
next prev parent reply other threads:[~2015-01-09 3:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 17:32 [PATCH 0/2] genirq: Make irqchip flags work with stacked irq domains Marc Zyngier
2015-01-08 17:32 ` [PATCH 1/2] genirq: Abstract access to irq_chip flags Marc Zyngier
2015-01-09 3:00 ` Jiang Liu [this message]
2015-01-09 9:43 ` Marc Zyngier
2015-01-08 17:32 ` [PATCH 2/2] genirq: Allow irq_desc to carry the union of stacked " Marc Zyngier
2015-01-09 3:07 ` [PATCH 0/2] genirq: Make irqchip flags work with stacked irq domains Jiang Liu
2015-01-09 9:52 ` Marc Zyngier
2015-01-13 10:41 ` Thomas Gleixner
2015-01-13 10:49 ` Marc Zyngier
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=54AF4449.2040004@linux.intel.com \
--to=jiang.liu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tglx@linutronix.de \
/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