msi.h 799 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __ASM_GENERIC_MSI_H
  2. #define __ASM_GENERIC_MSI_H
  3. #include <linux/types.h>
  4. #ifndef NUM_MSI_ALLOC_SCRATCHPAD_REGS
  5. # define NUM_MSI_ALLOC_SCRATCHPAD_REGS 2
  6. #endif
  7. struct msi_desc;
  8. /**
  9. * struct msi_alloc_info - Default structure for MSI interrupt allocation.
  10. * @desc: Pointer to msi descriptor
  11. * @hwirq: Associated hw interrupt number in the domain
  12. * @scratchpad: Storage for implementation specific scratch data
  13. *
  14. * Architectures can provide their own implementation by not including
  15. * asm-generic/msi.h into their arch specific header file.
  16. */
  17. typedef struct msi_alloc_info {
  18. struct msi_desc *desc;
  19. irq_hw_number_t hwirq;
  20. union {
  21. unsigned long ul;
  22. void *ptr;
  23. } scratchpad[NUM_MSI_ALLOC_SCRATCHPAD_REGS];
  24. } msi_alloc_info_t;
  25. #define GENERIC_MSI_DOMAIN_OPS 1
  26. #endif