mpic.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. extern int mpic_pasemi_msi_init(struct mpic *mpic);
  19. #else
  20. static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
  21. irq_hw_number_t hwirq)
  22. {
  23. return;
  24. }
  25. static inline int mpic_u3msi_init(struct mpic *mpic)
  26. {
  27. return -1;
  28. }
  29. static inline int mpic_pasemi_msi_init(struct mpic *mpic)
  30. {
  31. return -1;
  32. }
  33. #endif
  34. extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
  35. extern void mpic_set_vector(unsigned int virq, unsigned int vector);
  36. extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
  37. #endif /* _POWERPC_SYSDEV_MPIC_H */