* [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
@ 2011-05-04 16:18 Jonathan Cameron
2011-05-11 9:44 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2011-05-04 16:18 UTC (permalink / raw)
To: linux-kernel; +Cc: tglx, Jonathan Cameron
V2: add irq_alloc_descs and irq_free_descs for dynamic pool allocation.
This is to allow their use in IIO. We have complete control of
both the irq_chip creation and requesting of irqs so would like
to be able to build as a module. That requires these exports.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
kernel/irq/chip.c | 2 ++
kernel/irq/irqdesc.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 4af1e2b..ad409d3 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -310,6 +310,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
out_unlock:
raw_spin_unlock(&desc->lock);
}
+EXPORT_SYMBOL_GPL(handle_simple_irq);
/**
* handle_level_irq - Level type irq handler
@@ -612,6 +613,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
irq_put_desc_unlock(desc, flags);
}
+EXPORT_SYMBOL_GPL(irq_modify_status);
/**
* irq_cpu_online - Invoke all irq_cpu_online functions.
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 2c039c9..5ac14e2 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
{
return radix_tree_lookup(&irq_desc_tree, irq);
}
+EXPORT_SYMBOL_GPL(irq_to_desc);
static void delete_irq_desc(unsigned int irq)
{
@@ -311,6 +312,7 @@ void irq_free_descs(unsigned int from, unsigned int cnt)
bitmap_clear(allocated_irqs, from, cnt);
mutex_unlock(&sparse_irq_lock);
}
+EXPORT_SYMBOL_GPL(irq_free_descs);
/**
* irq_alloc_descs - allocate and initialize a range of irq descriptors
@@ -351,6 +353,7 @@ err:
mutex_unlock(&sparse_irq_lock);
return ret;
}
+EXPORT_SYMBOL_GPL(irq_alloc_descs);
/**
* irq_reserve_irqs - mark irqs allocated
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-04 16:18 [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs Jonathan Cameron
@ 2011-05-11 9:44 ` Jonathan Cameron
2011-05-13 13:48 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2011-05-11 9:44 UTC (permalink / raw)
Cc: linux-kernel, tglx
Hi Thomas/All,
Any feedback on this patch? We have a lot of code dependent on this and
with the merge window approaching would like to know if this will be going
in or not.
Thanks and sorry for pestering!
Jonathan
On 05/04/11 17:18, Jonathan Cameron wrote:
> V2: add irq_alloc_descs and irq_free_descs for dynamic pool allocation.
>
> This is to allow their use in IIO. We have complete control of
> both the irq_chip creation and requesting of irqs so would like
> to be able to build as a module. That requires these exports.
>
> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> kernel/irq/chip.c | 2 ++
> kernel/irq/irqdesc.c | 3 +++
> 2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index 4af1e2b..ad409d3 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -310,6 +310,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
> out_unlock:
> raw_spin_unlock(&desc->lock);
> }
> +EXPORT_SYMBOL_GPL(handle_simple_irq);
>
> /**
> * handle_level_irq - Level type irq handler
> @@ -612,6 +613,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
>
> irq_put_desc_unlock(desc, flags);
> }
> +EXPORT_SYMBOL_GPL(irq_modify_status);
>
> /**
> * irq_cpu_online - Invoke all irq_cpu_online functions.
> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> index 2c039c9..5ac14e2 100644
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
> {
> return radix_tree_lookup(&irq_desc_tree, irq);
> }
> +EXPORT_SYMBOL_GPL(irq_to_desc);
>
> static void delete_irq_desc(unsigned int irq)
> {
> @@ -311,6 +312,7 @@ void irq_free_descs(unsigned int from, unsigned int cnt)
> bitmap_clear(allocated_irqs, from, cnt);
> mutex_unlock(&sparse_irq_lock);
> }
> +EXPORT_SYMBOL_GPL(irq_free_descs);
>
> /**
> * irq_alloc_descs - allocate and initialize a range of irq descriptors
> @@ -351,6 +353,7 @@ err:
> mutex_unlock(&sparse_irq_lock);
> return ret;
> }
> +EXPORT_SYMBOL_GPL(irq_alloc_descs);
>
> /**
> * irq_reserve_irqs - mark irqs allocated
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-11 9:44 ` Jonathan Cameron
@ 2011-05-13 13:48 ` Jonathan Cameron
2011-05-13 15:17 ` Thomas Gleixner
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2011-05-13 13:48 UTC (permalink / raw)
Cc: linux-kernel, tglx
Hi Thomas.
Just a quick request that you give a yes or no to this.
Thanks and sorry for repeated pestering!
Jonathan
> Hi Thomas/All,
>
> Any feedback on this patch? We have a lot of code dependent on this and
> with the merge window approaching would like to know if this will be going
> in or not.
>
> Thanks and sorry for pestering!
>
> Jonathan
>
> On 05/04/11 17:18, Jonathan Cameron wrote:
>> V2: add irq_alloc_descs and irq_free_descs for dynamic pool allocation.
>>
>> This is to allow their use in IIO. We have complete control of
>> both the irq_chip creation and requesting of irqs so would like
>> to be able to build as a module. That requires these exports.
>>
>> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
>> ---
>> kernel/irq/chip.c | 2 ++
>> kernel/irq/irqdesc.c | 3 +++
>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
>> index 4af1e2b..ad409d3 100644
>> --- a/kernel/irq/chip.c
>> +++ b/kernel/irq/chip.c
>> @@ -310,6 +310,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
>> out_unlock:
>> raw_spin_unlock(&desc->lock);
>> }
>> +EXPORT_SYMBOL_GPL(handle_simple_irq);
>>
>> /**
>> * handle_level_irq - Level type irq handler
>> @@ -612,6 +613,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
>>
>> irq_put_desc_unlock(desc, flags);
>> }
>> +EXPORT_SYMBOL_GPL(irq_modify_status);
>>
>> /**
>> * irq_cpu_online - Invoke all irq_cpu_online functions.
>> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
>> index 2c039c9..5ac14e2 100644
>> --- a/kernel/irq/irqdesc.c
>> +++ b/kernel/irq/irqdesc.c
>> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
>> {
>> return radix_tree_lookup(&irq_desc_tree, irq);
>> }
>> +EXPORT_SYMBOL_GPL(irq_to_desc);
>>
>> static void delete_irq_desc(unsigned int irq)
>> {
>> @@ -311,6 +312,7 @@ void irq_free_descs(unsigned int from, unsigned int cnt)
>> bitmap_clear(allocated_irqs, from, cnt);
>> mutex_unlock(&sparse_irq_lock);
>> }
>> +EXPORT_SYMBOL_GPL(irq_free_descs);
>>
>> /**
>> * irq_alloc_descs - allocate and initialize a range of irq descriptors
>> @@ -351,6 +353,7 @@ err:
>> mutex_unlock(&sparse_irq_lock);
>> return ret;
>> }
>> +EXPORT_SYMBOL_GPL(irq_alloc_descs);
>>
>> /**
>> * irq_reserve_irqs - mark irqs allocated
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-13 13:48 ` Jonathan Cameron
@ 2011-05-13 15:17 ` Thomas Gleixner
2011-05-13 15:39 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2011-05-13 15:17 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-kernel
On Fri, 13 May 2011, Jonathan Cameron wrote:
> Hi Thomas.
>
> Just a quick request that you give a yes or no to this.
>
> Thanks and sorry for repeated pestering!
Sorry for the delay.
> >> /**
> >> * irq_cpu_online - Invoke all irq_cpu_online functions.
> >> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> >> index 2c039c9..5ac14e2 100644
> >> --- a/kernel/irq/irqdesc.c
> >> +++ b/kernel/irq/irqdesc.c
> >> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
> >> {
> >> return radix_tree_lookup(&irq_desc_tree, irq);
> >> }
> >> +EXPORT_SYMBOL_GPL(irq_to_desc);
I'm fine with that, just this one makes me a bit wary. I have a closer
look over the weekend.
Thanks,
tglx
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-13 15:17 ` Thomas Gleixner
@ 2011-05-13 15:39 ` Jonathan Cameron
2011-05-14 15:52 ` Thomas Gleixner
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2011-05-13 15:39 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel
On 05/13/11 16:17, Thomas Gleixner wrote:
> On Fri, 13 May 2011, Jonathan Cameron wrote:
>
>> Hi Thomas.
>>
>> Just a quick request that you give a yes or no to this.
>>
>> Thanks and sorry for repeated pestering!
>
> Sorry for the delay.
>
>>>> /**
>>>> * irq_cpu_online - Invoke all irq_cpu_online functions.
>>>> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
>>>> index 2c039c9..5ac14e2 100644
>>>> --- a/kernel/irq/irqdesc.c
>>>> +++ b/kernel/irq/irqdesc.c
>>>> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
>>>> {
>>>> return radix_tree_lookup(&irq_desc_tree, irq);
>>>> }
>>>> +EXPORT_SYMBOL_GPL(irq_to_desc);
>
> I'm fine with that, just this one makes me a bit wary.
It does feel a little fishy. For reference of others - it's required as
generic_handle_irq is inline in the irqdesc.h and uses it.
> I have a closer
> look over the weekend.
>
> Thanks,
Thanks,
>
> tglx
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-13 15:39 ` Jonathan Cameron
@ 2011-05-14 15:52 ` Thomas Gleixner
2011-05-16 8:26 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2011-05-14 15:52 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-kernel
On Fri, 13 May 2011, Jonathan Cameron wrote:
> On 05/13/11 16:17, Thomas Gleixner wrote:
> > On Fri, 13 May 2011, Jonathan Cameron wrote:
> >
> >> Hi Thomas.
> >>
> >> Just a quick request that you give a yes or no to this.
> >>
> >> Thanks and sorry for repeated pestering!
> >
> > Sorry for the delay.
> >
> >>>> /**
> >>>> * irq_cpu_online - Invoke all irq_cpu_online functions.
> >>>> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> >>>> index 2c039c9..5ac14e2 100644
> >>>> --- a/kernel/irq/irqdesc.c
> >>>> +++ b/kernel/irq/irqdesc.c
> >>>> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
> >>>> {
> >>>> return radix_tree_lookup(&irq_desc_tree, irq);
> >>>> }
> >>>> +EXPORT_SYMBOL_GPL(irq_to_desc);
> >
> > I'm fine with that, just this one makes me a bit wary.
> It does feel a little fishy. For reference of others - it's required as
> generic_handle_irq is inline in the irqdesc.h and uses it.
I know and there is no real reason why generic_handle_irq needs to be
inline.
Thanks,
tglx
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs
2011-05-14 15:52 ` Thomas Gleixner
@ 2011-05-16 8:26 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2011-05-16 8:26 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel
On 05/14/11 16:52, Thomas Gleixner wrote:
> On Fri, 13 May 2011, Jonathan Cameron wrote:
>
>> On 05/13/11 16:17, Thomas Gleixner wrote:
>>> On Fri, 13 May 2011, Jonathan Cameron wrote:
>>>
>>>> Hi Thomas.
>>>>
>>>> Just a quick request that you give a yes or no to this.
>>>>
>>>> Thanks and sorry for repeated pestering!
>>>
>>> Sorry for the delay.
>>>
>>>>>> /**
>>>>>> * irq_cpu_online - Invoke all irq_cpu_online functions.
>>>>>> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
>>>>>> index 2c039c9..5ac14e2 100644
>>>>>> --- a/kernel/irq/irqdesc.c
>>>>>> +++ b/kernel/irq/irqdesc.c
>>>>>> @@ -110,6 +110,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
>>>>>> {
>>>>>> return radix_tree_lookup(&irq_desc_tree, irq);
>>>>>> }
>>>>>> +EXPORT_SYMBOL_GPL(irq_to_desc);
>>>
>>> I'm fine with that, just this one makes me a bit wary.
>> It does feel a little fishy. For reference of others - it's required as
>> generic_handle_irq is inline in the irqdesc.h and uses it.
>
> I know and there is no real reason why generic_handle_irq needs to be
> inline.
So you would be happy with moving generic_handle_irq implementation
out of irqdesc.h and exporting that instead of irq_to_desc?
The element that isn't obvious to me is where should generic_handle_irq go?
(i.e. which file?) I'm afraid I'm not familiar enough with the generic irq
stuff to get this right!
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-05-16 8:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 16:18 [PATCH] irq: export handle_simple_irq, irq_modify_status, irq_to_desc, irq_alloc_descs and irq_free_descs Jonathan Cameron
2011-05-11 9:44 ` Jonathan Cameron
2011-05-13 13:48 ` Jonathan Cameron
2011-05-13 15:17 ` Thomas Gleixner
2011-05-13 15:39 ` Jonathan Cameron
2011-05-14 15:52 ` Thomas Gleixner
2011-05-16 8:26 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox