[PATCH] Fix build error with !SMP && !GENERIC_HARDIRQS
From: Alexander Shiyan
Date: Fri Mar 23 2012 - 03:23:33 EST
When compile kernel with !SMP && !GENERIC_HARDIRQS we are have
following error:
CC kernel/irq/manage.o
kernel/irq/manage.c:41: error: expected identifier or '(' before 'asm'
This error appears because header contain other definition for
synchronize_irq in include/linux/hardirq.h.
extern void synchronize_irq(unsigned int irq);
This patch fix this problem.
Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
---
kernel/irq/manage.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index b0ccd1a..854a463 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -28,6 +28,7 @@ static int __init setup_forced_irqthreads(char *arg)
early_param("threadirqs", setup_forced_irqthreads);
#endif
+#if !defined(synchronize_irq)
/**
* synchronize_irq - wait for pending IRQ handlers (on other CPUs)
* @irq: interrupt number to wait for
@@ -71,6 +72,7 @@ void synchronize_irq(unsigned int irq)
wait_event(desc->wait_for_threads, !atomic_read(&desc->threads_active));
}
EXPORT_SYMBOL(synchronize_irq);
+#endif
#ifdef CONFIG_SMP
cpumask_var_t irq_default_affinity;
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/