public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Jiang Liu <jiang.liu@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] genirq: Abstract access to irq_chip flags
Date: Fri, 09 Jan 2015 09:43:57 +0000	[thread overview]
Message-ID: <54AFA2DD.5010105@arm.com> (raw)
In-Reply-To: <54AF4449.2040004@linux.intel.com>

On 09/01/15 03:00, Jiang Liu wrote:
> 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)) {
> ------------------------------------------------------------------

Ah, nice catch.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2015-01-09  9:44 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
2015-01-09  9:43     ` Marc Zyngier [this message]
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=54AFA2DD.5010105@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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