aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2009-01-11 12:22:58 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-11 13:13:45 -0500
commit92296c6d6e908c35fca287a21af27be814af9c75 (patch)
treeba4a85a77b5bb3b609348dafafb710d567d1810a
parent542d865bbed4ce1f050f586e53cf1cfadda93766 (diff)
cpumask, irq: non-x86 build failures
Ingo Molnar wrote: > All non-x86 architectures fail to build: > > In file included from /home/mingo/tip/include/linux/random.h:11, > from /home/mingo/tip/include/linux/stackprotector.h:6, > from /home/mingo/tip/init/main.c:17: > /home/mingo/tip/include/linux/irqnr.h:26:63: error: asm/irq_vectors.h: No such file or directory Do not include asm/irq_vectors.h in generic code - it's not available on all architectures. Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/apicdef.h8
-rw-r--r--include/linux/irqnr.h6
-rw-r--r--kernel/irq/handle.c5
3 files changed, 11 insertions, 8 deletions
diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 1a6454ef7f6c..63134e31e8b9 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -132,8 +132,12 @@
132#define APIC_BASE_MSR 0x800 132#define APIC_BASE_MSR 0x800
133#define X2APIC_ENABLE (1UL << 10) 133#define X2APIC_ENABLE (1UL << 10)
134 134
135/* get MAX_IO_APICS */ 135#ifdef CONFIG_X86_32
136#include <asm/apicnum.h> 136# define MAX_IO_APICS 64
137#else
138# define MAX_IO_APICS 128
139# define MAX_LOCAL_APIC 32768
140#endif
137 141
138/* 142/*
139 * All x86-64 systems are xAPIC compatible. 143 * All x86-64 systems are xAPIC compatible.
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index de66e4e10406..887477bc2ab0 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -23,15 +23,9 @@
23 23
24#else /* CONFIG_GENERIC_HARDIRQS */ 24#else /* CONFIG_GENERIC_HARDIRQS */
25 25
26#include <asm/irq_vectors.h> /* need possible max_nr_irqs() */
27
28extern int nr_irqs; 26extern int nr_irqs;
29extern struct irq_desc *irq_to_desc(unsigned int irq); 27extern struct irq_desc *irq_to_desc(unsigned int irq);
30 28
31# ifndef max_nr_irqs
32# define max_nr_irqs(nr_cpus) NR_IRQS
33# endif
34
35# define for_each_irq_desc(irq, desc) \ 29# define for_each_irq_desc(irq, desc) \
36 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ 30 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
37 irq++, desc = irq_to_desc(irq)) \ 31 irq++, desc = irq_to_desc(irq)) \
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index b39f32ac8f80..04d3e46031e5 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -58,6 +58,11 @@ int nr_irqs = NR_IRQS;
58EXPORT_SYMBOL_GPL(nr_irqs); 58EXPORT_SYMBOL_GPL(nr_irqs);
59 59
60#ifdef CONFIG_SPARSE_IRQ 60#ifdef CONFIG_SPARSE_IRQ
61
62#ifndef max_nr_irqs
63#define max_nr_irqs(nr_cpus) NR_IRQS
64#endif
65
61static struct irq_desc irq_desc_init = { 66static struct irq_desc irq_desc_init = {
62 .irq = -1, 67 .irq = -1,
63 .status = IRQ_DISABLED, 68 .status = IRQ_DISABLED,