All of lore.kernel.org
 help / color / mirror / Atom feed
* Exporting a few bits of irq infrastructure.
@ 2011-03-19 17:16 Jonathan Cameron
  2011-03-25 11:57 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Cameron @ 2011-03-19 17:16 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-iio@vger.kernel.org

Hi Thomas,

Just a quick enquiry.  Is there a reason to not allow
exporting the symbols handle_simple_irq and irq_to_desc?
Or is it simply a case that there is not normally a reason
for having irq chips registered via modules?

My implementation of what I think you were suggesting the other
day for handling our IIO triggers registers a separate irq
chip for each trigger (currently with a compile time number
of irq's per trigger).  These are allocated from a pool set
up in a boards platform init code. The device drivers can then query to
get the next available irq for a given trigger and request
that.  Some trigggers are entirely instantiated based on
a request form userspace (or should be anyway - see Arnd's observations
on iio-trig-sysfs).  This could be done with a layer of indirection, but
that would be annoyingly fiddly!

Anyhow, right now the patch is dependent on (cut out of a larger patch)

iff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..eb3d53b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -487,6 +487,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
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 282f202..d3765e2 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -109,6 +109,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
 {
 	return radix_tree_lookup(&irq_desc_tree, irq);
 }
+EXPORT_SYMBOL(irq_to_desc);
 
 static void delete_irq_desc(unsigned int irq)
 {
-- 
1.7.3.4


We also need set_irq_flags in arch/arm/kernel/irq.c I think, but for
that I clearly need to also ask the arm guys so lets sort the two above
first.

Thanks,

Jonathan

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Exporting a few bits of irq infrastructure.
  2011-03-19 17:16 Exporting a few bits of irq infrastructure Jonathan Cameron
@ 2011-03-25 11:57 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2011-03-25 11:57 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Thomas Gleixner, linux-iio@vger.kernel.org

On 03/19/11 17:16, Jonathan Cameron wrote:
> Hi Thomas,
Hi again, just wondering if you have a moment to comment on these
exports?  If not I'll post them to LKML and see if someone shouts!

Thanks,

Jonathan
> 
> Just a quick enquiry.  Is there a reason to not allow
> exporting the symbols handle_simple_irq and irq_to_desc?
> Or is it simply a case that there is not normally a reason
> for having irq chips registered via modules?
> 
> My implementation of what I think you were suggesting the other
> day for handling our IIO triggers registers a separate irq
> chip for each trigger (currently with a compile time number
> of irq's per trigger).  These are allocated from a pool set
> up in a boards platform init code. The device drivers can then query to
> get the next available irq for a given trigger and request
> that.  Some trigggers are entirely instantiated based on
> a request form userspace (or should be anyway - see Arnd's observations
> on iio-trig-sysfs).  This could be done with a layer of indirection, but
> that would be annoyingly fiddly!
> 
> Anyhow, right now the patch is dependent on (cut out of a larger patch)
> 
> iff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index baa5c4a..eb3d53b 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -487,6 +487,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
> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> index 282f202..d3765e2 100644
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -109,6 +109,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
>  {
>  	return radix_tree_lookup(&irq_desc_tree, irq);
>  }
> +EXPORT_SYMBOL(irq_to_desc);
>  
>  static void delete_irq_desc(unsigned int irq)
>  {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-25 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-19 17:16 Exporting a few bits of irq infrastructure Jonathan Cameron
2011-03-25 11:57 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.