X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ia64%2Fhw_irq.h;h=d990e9e57f21aad64bffd2d99f6f7c599c017352;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=a72134370811b1343f3f7033115f295cbd0cd361;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index a72134370..d990e9e57 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h @@ -15,7 +15,11 @@ #include #include +#ifndef CONFIG_XEN typedef u8 ia64_vector; +#else +typedef u16 ia64_vector; +#endif /* * 0 special @@ -47,9 +51,20 @@ typedef u8 ia64_vector; #define IA64_CMC_VECTOR 0x1f /* corrected machine-check interrupt vector */ /* * Vectors 0x20-0x2f are reserved for legacy ISA IRQs. + * Use vectors 0x30-0xe7 as the default device vector range for ia64. + * Platforms may choose to reduce this range in platform_irq_setup, but the + * platform range must fall within + * [IA64_DEF_FIRST_DEVICE_VECTOR..IA64_DEF_LAST_DEVICE_VECTOR] */ -#define IA64_FIRST_DEVICE_VECTOR 0x30 -#define IA64_LAST_DEVICE_VECTOR 0xe7 +extern int ia64_first_device_vector; +extern int ia64_last_device_vector; + +#define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 +#define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 +#define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector +#define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector +#define IA64_MAX_DEVICE_VECTORS (IA64_DEF_LAST_DEVICE_VECTOR - IA64_DEF_FIRST_DEVICE_VECTOR + 1) +#define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ #define IA64_PERFMON_VECTOR 0xee /* performanc monitor interrupt vector */ @@ -78,17 +93,22 @@ enum { extern __u8 isa_irq_to_vector_map[16]; #define isa_irq_to_vector(x) isa_irq_to_vector_map[(x)] -extern unsigned long ipi_base_addr; - extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */ extern int assign_irq_vector (int irq); /* allocate a free vector */ +extern void free_irq_vector (int vector); +extern int reserve_irq_vector (int vector); extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); -static inline void -hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) +static inline void ia64_resend_irq(unsigned int vector) { +#ifdef CONFIG_XEN + extern void resend_irq_on_evtchn(unsigned int i); + if (is_running_on_xen()) + resend_irq_on_evtchn(vector); + else +#endif /* CONFIG_XEN */ platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); } @@ -96,21 +116,9 @@ hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) * Default implementations for the irq-descriptor API: */ -extern irq_desc_t _irq_desc[NR_IRQS]; +extern irq_desc_t irq_desc[NR_IRQS]; #ifndef CONFIG_IA64_GENERIC -static inline irq_desc_t * -__ia64_irq_desc (unsigned int irq) -{ - return _irq_desc + irq; -} - -static inline ia64_vector -__ia64_irq_to_vector (unsigned int irq) -{ - return (ia64_vector) irq; -} - static inline unsigned int __ia64_local_vector_to_irq (ia64_vector vec) { @@ -128,18 +136,11 @@ __ia64_local_vector_to_irq (ia64_vector vec) * and to obtain the irq descriptor for a given irq number. */ -/* Return a pointer to the irq descriptor for IRQ. */ -static inline irq_desc_t * -irq_descp (int irq) -{ - return platform_irq_desc(irq); -} - /* Extract the IA-64 vector that corresponds to IRQ. */ static inline ia64_vector irq_to_vector (int irq) { - return platform_irq_to_vector(irq); + return (ia64_vector) irq; } /*