* [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
@ 2014-11-21 3:23 Jiang Liu
2014-11-23 10:33 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: Jiang Liu @ 2014-11-21 3:23 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Grant Likely, Marc Zyngier,
Yijing Wang, Yingjoe Chen, Suravee Suthikulpanit, Borislav Petkov,
H. Peter Anvin, Benjamin Herrenschmidt, Matthias Brugger
Cc: Jiang Liu, Tony Luck, linux-kernel, linux-pci, linux-arm-kernel
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);
}
/**
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
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
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2014-11-23 10:33 UTC (permalink / raw)
To: Jiang Liu
Cc: Ingo Molnar, Grant Likely, Marc Zyngier, Yijing Wang,
Yingjoe Chen, Suravee Suthikulpanit, Borislav Petkov,
H. Peter Anvin, Benjamin Herrenschmidt, Matthias Brugger,
Tony Luck, linux-kernel, linux-pci, linux-arm-kernel
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.
Thanks,
tglx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
2014-11-23 10:33 ` Thomas Gleixner
@ 2014-11-23 10:36 ` Thomas Gleixner
2014-11-23 13:28 ` Jiang Liu
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2014-11-23 10:36 UTC (permalink / raw)
To: Jiang Liu
Cc: Ingo Molnar, Grant Likely, Marc Zyngier, Yijing Wang,
Yingjoe Chen, Suravee Suthikulpanit, Borislav Petkov,
H. Peter Anvin, Benjamin Herrenschmidt, Matthias Brugger,
Tony Luck, linux-kernel, linux-pci, linux-arm-kernel
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,
tglx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
2014-11-23 10:36 ` Thomas Gleixner
@ 2014-11-23 13:28 ` Jiang Liu
0 siblings, 0 replies; 4+ messages in thread
From: Jiang Liu @ 2014-11-23 13:28 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Ingo Molnar, Grant Likely, Marc Zyngier, Yijing Wang,
Yingjoe Chen, Suravee Suthikulpanit, Borislav Petkov,
H. Peter Anvin, Benjamin Herrenschmidt, Matthias Brugger,
Tony Luck, linux-kernel, linux-pci, linux-arm-kernel
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-23 13:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).