linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	Grant Likely <grant.likely@linaro.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Yijing Wang <wangyijing@huawei.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
Date: Sun, 23 Nov 2014 21:28:25 +0800	[thread overview]
Message-ID: <5471E0F9.7080003@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1411231135190.6439@nanos>

On 2014/11/23 18:36, Thomas Gleixner wrote:
> On Sun, 23 Nov 2014, Thomas Gleixner wrote:
> 
>> On Fri, 21 Nov 2014, Jiang Liu wrote:
>>
>>> Originally irq_domain_free_irqs_common() is designed to be used by
>>> irqdomains with parent. But there are desires to reuse for parentless
>>> irqdomains for code reduction.
>>> So check domain->parent before invoking irq_domain_free_irqs_parent().
>>>
>>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>>> ---
>>> Hi Thomas,
>>> 	This patch applies to tip/irq/irqdomain, it helps to reduce code
>>> size on ARM. Seems we still have chance to merge it into tip/irq/irqdomain:)
>>> Regards!
>>> Gerry
>>> ---
>>>  kernel/irq/irqdomain.c |    3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>>> index 029acf11efed..0449d2869e17 100644
>>> --- a/kernel/irq/irqdomain.c
>>> +++ b/kernel/irq/irqdomain.c
>>> @@ -975,7 +975,8 @@ void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq,
>>>  		if (irq_data)
>>>  			irq_domain_reset_irq_data(irq_data);
>>>  	}
>>> -	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
>>> +	if (domain->parent)
>>> +		irq_domain_free_irqs_parent(domain, virq, nr_irqs);
>>
>> irq_domain_free_irqs_parent()
>> {
>> 	if (domain->parent && domain->parent->ops->free)
>> 	   	...
>> }
>>
>> So the above is redundant and does not change anything.
> 
> Except that this function gets replaced later in the series and drops
> the parent check.
> 
> Though we should not put the conditionals on the call sites. We want
> the functions handle it.
> 
> /me goes fixing.
Thanks, Thomas!

> 
> Thanks,
> 
> 	tglx
> 

      reply	other threads:[~2014-11-23 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21  3:23 [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain Jiang Liu
2014-11-23 10:33 ` Thomas Gleixner
2014-11-23 10:36   ` Thomas Gleixner
2014-11-23 13:28     ` Jiang Liu [this message]

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=5471E0F9.7080003@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=benh@kernel.crashing.org \
    --cc=bp@alien8.de \
    --cc=grant.likely@linaro.org \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=wangyijing@huawei.com \
    --cc=yingjoe.chen@mediatek.com \
    /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).