cpumask, irq: non-x86 build failures
authorMike Travis <travis@sgi.com>
Sun, 11 Jan 2009 17:22:58 +0000 (09:22 -0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 11 Jan 2009 18:13:45 +0000 (19:13 +0100)
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>
arch/x86/include/asm/apicdef.h
include/linux/irqnr.h
kernel/irq/handle.c

index 1a6454ef7f6c655f4c04c55426163c1c68173f34..63134e31e8b933acb973ee2e66f62a2f815bb326 100644 (file)
 #define APIC_BASE_MSR  0x800
 #define X2APIC_ENABLE  (1UL << 10)
 
-/* get MAX_IO_APICS */
-#include <asm/apicnum.h>
+#ifdef CONFIG_X86_32
+# define MAX_IO_APICS 64
+#else
+# define MAX_IO_APICS 128
+# define MAX_LOCAL_APIC 32768
+#endif
 
 /*
  * All x86-64 systems are xAPIC compatible.
index de66e4e1040650f5993421cbde33474387415513..887477bc2ab0841287460aef51517beb2377ea58 100644 (file)
 
 #else /* CONFIG_GENERIC_HARDIRQS */
 
-#include <asm/irq_vectors.h>   /* need possible max_nr_irqs() */
-
 extern int nr_irqs;
 extern struct irq_desc *irq_to_desc(unsigned int irq);
 
-# ifndef max_nr_irqs
-#  define max_nr_irqs(nr_cpus) NR_IRQS
-# endif
-
 # define for_each_irq_desc(irq, desc)                                  \
        for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs;           \
             irq++, desc = irq_to_desc(irq))                            \
index b39f32ac8f80a9a1f39ded9e1e47d8215e88412f..04d3e46031e51f71ca62ccc0015a6f9b3ac8c660 100644 (file)
@@ -58,6 +58,11 @@ int nr_irqs = NR_IRQS;
 EXPORT_SYMBOL_GPL(nr_irqs);
 
 #ifdef CONFIG_SPARSE_IRQ
+
+#ifndef max_nr_irqs
+#define max_nr_irqs(nr_cpus)   NR_IRQS
+#endif
+
 static struct irq_desc irq_desc_init = {
        .irq        = -1,
        .status     = IRQ_DISABLED,