Index: 2006-01-05/include/asm-x86_64/irq.h =================================================================== --- 2006-01-05.orig/include/asm-x86_64/irq.h 2006-01-06 11:47:20.828670512 +0100 +++ 2006-01-05/include/asm-x86_64/irq.h 2006-01-06 09:53:04.000000000 +0100 @@ -10,7 +10,7 @@ * */ -#define TIMER_IRQ 0 +#include /* * 16 8259A IRQ's, 208 potential APIC interrupt sources. @@ -31,6 +31,10 @@ #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */ +#ifndef CONFIG_XEN + +#define TIMER_IRQ 0 + #ifdef CONFIG_PCI_MSI #define NR_IRQS FIRST_SYSTEM_VECTOR #define NR_IRQ_VECTORS NR_IRQS @@ -39,6 +43,35 @@ #define NR_IRQ_VECTORS 1024 #endif +#else /* CONFIG_XEN */ + +/* + * The flat IRQ space is divided into two regions: + * 1. A one-to-one mapping of real physical IRQs. This space is only used + * if we have physical device-access privilege. This region is at the + * start of the IRQ space so that existing device drivers do not need + * to be modified to translate physical IRQ numbers into our IRQ space. + * 3. A dynamic mapping of inter-domain and Xen-sourced virtual IRQs. These + * are bound using the provided bind/unbind functions. + */ + +#define PIRQ_BASE 0 +#define NR_PIRQS 256 + +#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS) +#define NR_DYNIRQS 256 + +#define NR_IRQS (NR_PIRQS + NR_DYNIRQS) +#define NR_IRQ_VECTORS NR_IRQS + +#define pirq_to_irq(_x) ((_x) + PIRQ_BASE) +#define irq_to_pirq(_x) ((_x) - PIRQ_BASE) + +#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE) +#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE) + +#endif /* CONFIG_XEN */ + static __inline__ int irq_canonicalize(int irq) { return ((irq == 2) ? 9 : irq); @@ -48,6 +81,10 @@ static __inline__ int irq_canonicalize(i #define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ #endif +#ifdef CONFIG_XEN +#define irq_ctx_init(cpu) do { } while (0) +#endif + #ifdef CONFIG_HOTPLUG_CPU #include extern void fixup_irqs(cpumask_t map); Index: 2006-01-05/include/asm-x86_64/mach-xen/asm/irq.h =================================================================== --- 2006-01-05.orig/include/asm-x86_64/mach-xen/asm/irq.h 2006-01-06 11:47:20.829670360 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ifndef _ASM_IRQ_H -#define _ASM_IRQ_H - -/* - * linux/include/asm/irq.h - * - * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar - * - * IRQ/IPI changes taken from work by Thomas Radke - * - */ - -#include -#include -/* include comes from machine specific directory */ -#include "irq_vectors.h" -#include - -static __inline__ int irq_canonicalize(int irq) -{ - return ((irq == 2) ? 9 : irq); -} - -#ifdef CONFIG_X86_LOCAL_APIC -#define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ -#endif - -#define KDB_VECTOR 0xf9 - -# define irq_ctx_init(cpu) do { } while (0) - -#ifdef CONFIG_HOTPLUG_CPU -#include -extern void fixup_irqs(cpumask_t map); -#endif - -#define __ARCH_HAS_DO_SOFTIRQ 1 - -#endif /* _ASM_IRQ_H */ Index: 2006-01-05/include/asm-x86_64/mach-xen/irq_vectors.h =================================================================== --- 2006-01-05.orig/include/asm-x86_64/mach-xen/irq_vectors.h 2006-01-06 11:14:54.000000000 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -/* - * This file should contain #defines for all of the interrupt vector - * numbers used by this architecture. - * - * In addition, there are some standard defines: - * - * FIRST_EXTERNAL_VECTOR: - * The first free place for external interrupts - * - * SYSCALL_VECTOR: - * The IRQ vector a syscall makes the user to kernel transition - * under. - * - * TIMER_IRQ: - * The IRQ number the timer interrupt comes in at. - * - * NR_IRQS: - * The total number of interrupt vectors (including all the - * architecture specific interrupts) needed. - * - */ -#ifndef _ASM_IRQ_VECTORS_H -#define _ASM_IRQ_VECTORS_H - -/* - * First APIC vector available to drivers: (vectors 0x30-0xee) - * we start at 0x31 to spread out vectors evenly between priority - * levels. (0x80 is the syscall vector) - */ -#define FIRST_SYSTEM_VECTOR 0xef - -/* - * 16 8259A IRQ's, 208 potential APIC interrupt sources. - * Right now the APIC is mostly only used for SMP. - * 256 vectors is an architectural limit. (we can have - * more than 256 devices theoretically, but they will - * have to use shared interrupts) - * Since vectors 0x00-0x1f are used/reserved for the CPU, - * the usable vector space is 0x20-0xff (224 vectors) - */ - -/* - * The maximum number of vectors supported by i386 processors - * is limited to 256. For processors other than i386, NR_VECTORS - * should be changed accordingly. - */ -#define NR_VECTORS 256 - -/* - * The flat IRQ space is divided into two regions: - * 1. A one-to-one mapping of real physical IRQs. This space is only used - * if we have physical device-access privilege. This region is at the - * start of the IRQ space so that existing device drivers do not need - * to be modified to translate physical IRQ numbers into our IRQ space. - * 3. A dynamic mapping of inter-domain and Xen-sourced virtual IRQs. These - * are bound using the provided bind/unbind functions. - */ - -#define PIRQ_BASE 0 -#define NR_PIRQS 256 - -#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS) -#define NR_DYNIRQS 256 - -#define NR_IRQS (NR_PIRQS + NR_DYNIRQS) -#define NR_IRQ_VECTORS NR_IRQS - -#define pirq_to_irq(_x) ((_x) + PIRQ_BASE) -#define irq_to_pirq(_x) ((_x) - PIRQ_BASE) - -#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE) -#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE) - -#endif /* _ASM_IRQ_VECTORS_H */ Index: 2006-01-05/arch/x86_64/kernel/entry-xen.S =================================================================== --- 2006-01-05.orig/arch/x86_64/kernel/entry-xen.S 2006-01-06 11:47:20.826670816 +0100 +++ 2006-01-05/arch/x86_64/kernel/entry-xen.S 2006-01-06 09:55:24.000000000 +0100 @@ -51,8 +51,6 @@ #include #include -#include "irq_vectors.h" - #include "xen_entry.S" .code64