Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_GENERIC_MSI_H
|
|
#define __ASM_GENERIC_MSI_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#ifdef CONFIG_GENERIC_MSI_IRQ
|
|
|
|
#ifndef NUM_MSI_ALLOC_SCRATCHPAD_REGS
|
|
# define NUM_MSI_ALLOC_SCRATCHPAD_REGS 2
|
|
#endif
|
|
|
|
struct msi_desc;
|
|
|
|
/**
|
|
* struct msi_alloc_info - Default structure for MSI interrupt allocation.
|
|
* @desc: Pointer to msi descriptor
|
|
* @hwirq: Associated hw interrupt number in the domain
|
|
* @scratchpad: Storage for implementation specific scratch data
|
|
*
|
|
* Architectures can provide their own implementation by not including
|
|
* asm-generic/msi.h into their arch specific header file.
|
|
*/
|
|
typedef struct msi_alloc_info {
|
|
struct msi_desc *desc;
|
|
irq_hw_number_t hwirq;
|
|
unsigned long flags;
|
|
union {
|
|
unsigned long ul;
|
|
void *ptr;
|
|
} scratchpad[NUM_MSI_ALLOC_SCRATCHPAD_REGS];
|
|
} msi_alloc_info_t;
|
|
|
|
/* Device generating MSIs is proxying for another device */
|
|
#define MSI_ALLOC_FLAGS_PROXY_DEVICE (1UL << 0)
|
|
#define MSI_ALLOC_FLAGS_FIXED_MSG_DATA (1UL << 1)
|
|
|
|
#define GENERIC_MSI_DOMAIN_OPS 1
|
|
|
|
#endif /* CONFIG_GENERIC_MSI_IRQ */
|
|
|
|
#endif
|