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