mpic.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _POWERPC_SYSDEV_MPIC_H
  2. #define _POWERPC_SYSDEV_MPIC_H
  3. /*
  4. * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; version 2 of the
  9. * License.
  10. *
  11. */
  12. #ifdef CONFIG_PCI_MSI
  13. extern void mpic_msi_reserve_hwirq(struct mpic *mpic, irq_hw_number_t hwirq);
  14. extern int mpic_msi_init_allocator(struct mpic *mpic);
  15. extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num);
  16. extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num);
  17. extern int mpic_u3msi_init(struct mpic *mpic);
  18. #else
  19. static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
  20. irq_hw_number_t hwirq)
  21. {
  22. return;
  23. }
  24. static inline int mpic_u3msi_init(struct mpic *mpic)
  25. {
  26. return -1;
  27. }
  28. #endif
  29. extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
  30. extern void mpic_end_irq(unsigned int irq);
  31. extern void mpic_mask_irq(unsigned int irq);
  32. extern void mpic_unmask_irq(unsigned int irq);
  33. extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
  34. #endif /* _POWERPC_SYSDEV_MPIC_H */