irqdomain.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _ASM_IRQDOMAIN_H
  2. #define _ASM_IRQDOMAIN_H
  3. #include <linux/irqdomain.h>
  4. #include <asm/hw_irq.h>
  5. #ifdef CONFIG_X86_LOCAL_APIC
  6. enum {
  7. /* Allocate contiguous CPU vectors */
  8. X86_IRQ_ALLOC_CONTIGUOUS_VECTORS = 0x1,
  9. };
  10. extern struct irq_domain *x86_vector_domain;
  11. extern void init_irq_alloc_info(struct irq_alloc_info *info,
  12. const struct cpumask *mask);
  13. extern void copy_irq_alloc_info(struct irq_alloc_info *dst,
  14. struct irq_alloc_info *src);
  15. #endif /* CONFIG_X86_LOCAL_APIC */
  16. #ifdef CONFIG_X86_IO_APIC
  17. struct device_node;
  18. struct irq_data;
  19. enum ioapic_domain_type {
  20. IOAPIC_DOMAIN_INVALID,
  21. IOAPIC_DOMAIN_LEGACY,
  22. IOAPIC_DOMAIN_STRICT,
  23. IOAPIC_DOMAIN_DYNAMIC,
  24. };
  25. struct ioapic_domain_cfg {
  26. enum ioapic_domain_type type;
  27. const struct irq_domain_ops *ops;
  28. struct device_node *dev;
  29. };
  30. extern const struct irq_domain_ops mp_ioapic_irqdomain_ops;
  31. extern int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq,
  32. unsigned int nr_irqs, void *arg);
  33. extern void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq,
  34. unsigned int nr_irqs);
  35. extern void mp_irqdomain_activate(struct irq_domain *domain,
  36. struct irq_data *irq_data);
  37. extern void mp_irqdomain_deactivate(struct irq_domain *domain,
  38. struct irq_data *irq_data);
  39. extern int mp_irqdomain_ioapic_idx(struct irq_domain *domain);
  40. #endif /* CONFIG_X86_IO_APIC */
  41. #ifdef CONFIG_PCI_MSI
  42. extern void arch_init_msi_domain(struct irq_domain *domain);
  43. #else
  44. static inline void arch_init_msi_domain(struct irq_domain *domain) { }
  45. #endif
  46. #ifdef CONFIG_HT_IRQ
  47. extern void arch_init_htirq_domain(struct irq_domain *domain);
  48. #else
  49. static inline void arch_init_htirq_domain(struct irq_domain *domain) { }
  50. #endif
  51. #endif