Skip to contentSkip to conversation

Linux-3.4-rc7 [build failure]

DISCUSSION Paweł Sikora 3 participants 3 messages May 13, 2012 IRQ

lore
Share & tools
lore
#0 lore raw

Hi all,
i see a build failure on modular kernel.

(...)
Kernel: arch/x86/boot/bzImage is ready (#15)
MODPOST 3501 modules
ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es). (...)

BR,
Paweł.

#1 lore raw
Quoted 10 lines · Paweł Sikora

Hi all,
i see a build failure on modular kernel.

(...)
Kernel: arch/x86/boot/bzImage is ready (#15)
MODPOST 3501 modules
ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es). (...)

This is caused by

commit df9541a60af0985c3a756dc5f99b9253d2565a07

Author: Thomas Gleixner <[email protected]>
Date:   Sat Apr 28 10:13:45 2012 +0200

gpio: pch9: Use proper flow type handlers

as it adds

	__irq_set_handler_locked(d->irq, handle_edge_irq);

but handle_edge_irq() is not exported for modules (and inlined __irq_set_handler_locked() requires irq_to_desc() exported as well)

Thus the patch below fixes it; adding Thomas to CC to get his Ack for this first though.

From: Jiri Kosina <[email protected]>
Subject: [PATCH] genirq: export handle_edge_irq() and irq_to_desc()

Export handle_edge_irq() and irq_to_desc() to modules to allow them to do things such as

	__irq_set_handler_locked(...., handle_edge_irq);

This fixes

ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!

when gpio-pch is being built as a module.

---
 kernel/irq/chip.c    |    1 +
 kernel/irq/irqdesc.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
kernel/irq/chip.c +1 -0
index 6080f6b..3914c1e 100644
@@ -518,6 +518,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
 out_unlock:
 	raw_spin_unlock(&desc->lock);
 }
+EXPORT_SYMBOL(handle_edge_irq);
 
 #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
 /**
kernel/irq/irqdesc.c +1 -0
index d86e254..192a302 100644
@@ -112,6 +112,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)
 {
Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 24 lines · Jiri Kosina
Quoted 10 lines · Paweł Sikora

Hi all,
i see a build failure on modular kernel.

(...)
Kernel: arch/x86/boot/bzImage is ready (#15)
MODPOST 3501 modules
ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es). (...)

This is caused by

commit df9541a60af0985c3a756dc5f99b9253d2565a07

Author: Thomas Gleixner <[email protected]>
Date:   Sat Apr 28 10:13:45 2012 +0200

gpio: pch9: Use proper flow type handlers

as it adds

Quoted 7 lines
	__irq_set_handler_locked(d->irq, handle_edge_irq);

but handle_edge_irq() is not exported for modules (and inlined __irq_set_handler_locked() requires irq_to_desc() exported as well)

Thus the patch below fixes it; adding Thomas to CC to get his Ack for this first though.

Hrmpf. I'll take it via irg/urgent

Quoted 53 lines

From: Jiri Kosina <[email protected]>
Subject: [PATCH] genirq: export handle_edge_irq() and irq_to_desc()

Export handle_edge_irq() and irq_to_desc() to modules to allow them to do things such as

	__irq_set_handler_locked(...., handle_edge_irq);

This fixes

ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined!
ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined!

when gpio-pch is being built as a module.

---
 kernel/irq/chip.c    |    1 +
 kernel/irq/irqdesc.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
kernel/irq/chip.c +1 -0
index 6080f6b..3914c1e 100644
@@ -518,6 +518,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
 out_unlock:
 	raw_spin_unlock(&desc->lock);
 }
+EXPORT_SYMBOL(handle_edge_irq);
 
 #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
 /**
kernel/irq/irqdesc.c +1 -0
index d86e254..192a302 100644
@@ -112,6 +112,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)
 {
Signature · 3 lines
-- 
Jiri Kosina
SUSE Labs