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