[PATCH] [2.6.22] powerpc: uninline and export virq_to_hw()

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE7045d

4 messages, 2 authors, 2007-06-04 · open the first message on its own page

[PATCH] [2.6.22] powerpc: uninline and export virq_to_hw()

From: Olof Johansson <hidden>
Date: 2007-06-04 04:41:04

Uninline virq_to_hw and export it so modules can use it. The alternative
would be to export the irq_map array instead, but it's an infrequently
called function, and keeping the array unexported seems considerably
cleaner.


Signed-off-by: Olof Johansson <redacted>
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 068377a..0df86cc 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -412,6 +412,12 @@ struct irq_map_entry irq_map[NR_IRQS];
 static unsigned int irq_virq_count = NR_IRQS;
 static struct irq_host *irq_default_host;
 
+irq_hw_number_t virq_to_hw(unsigned int virq)
+{
+	return irq_map[virq].hwirq;
+}
+EXPORT_SYMBOL_GPL(virq_to_hw);
+
 struct irq_host *irq_alloc_host(unsigned int revmap_type,
 				unsigned int revmap_arg,
 				struct irq_host_ops *ops,
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index 4734cc1..05dd5a3 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -138,10 +138,7 @@ struct irq_map_entry {
 
 extern struct irq_map_entry irq_map[NR_IRQS];
 
-static inline irq_hw_number_t virq_to_hw(unsigned int virq)
-{
-	return irq_map[virq].hwirq;
-}
+extern irq_hw_number_t virq_to_hw(unsigned int virq);
 
 /**
  * irq_alloc_host - Allocate a new irq_host data structure

Re: [PATCH] [2.6.22] powerpc: uninline and export virq_to_hw()

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-06-04 05:20:22

On Sun, 2007-06-03 at 23:47 -0500, Olof Johansson wrote:
Uninline virq_to_hw and export it so modules can use it. The
alternative
would be to export the irq_map array instead, but it's an infrequently
called function, and keeping the array unexported seems considerably
cleaner.
It's called in fairly hot IRQ code path (the PIC themselves use it) no ?

Ben.

Re: [PATCH] [2.6.22] powerpc: uninline and export virq_to_hw()

From: Olof Johansson <hidden>
Date: 2007-06-04 05:21:03

On Mon, Jun 04, 2007 at 03:20:10PM +1000, Benjamin Herrenschmidt wrote:
On Sun, 2007-06-03 at 23:47 -0500, Olof Johansson wrote:
quoted
Uninline virq_to_hw and export it so modules can use it. The
alternative
would be to export the irq_map array instead, but it's an infrequently
called function, and keeping the array unexported seems considerably
cleaner.
It's called in fairly hot IRQ code path (the PIC themselves use it) no ?
I looked before I did the change. All of those open-code it.


-Olof

Re: [PATCH] [2.6.22] powerpc: uninline and export virq_to_hw()

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-06-04 05:27:28

On Mon, 2007-06-04 at 00:27 -0500, Olof Johansson wrote:
quoted
It's called in fairly hot IRQ code path (the PIC themselves use it)
no ?

I looked before I did the change. All of those open-code it.
Ah ok :-) Yeah, well, I remember open coding it when I wrote the PIC
code for virq's then somebody added virq_to_hw() :-)

Good to go then,

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help