msi.h 838 B

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