Commit 874d9b3a authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86/irq: Prepare consolidation of irq_alloc_info



struct irq_alloc_info is a horrible zoo of unnamed structs in a union. Many
of the struct fields can be generic and don't have to be type specific like
hpet_id, ioapic_id...

Provide a generic set of members to prepare for the consolidation. The goal
is to make irq_alloc_info have the same basic member as the generic
msi_alloc_info so generic MSI domain ops can be reused and yet more mess
can be avoided when (non-PCI) device MSI support comes along.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200826112331.849577844@linutronix.de
parent 6b6256e6
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -44,10 +44,25 @@ enum irq_alloc_type {
	X86_IRQ_ALLOC_TYPE_HPET_GET_PARENT,
};

/**
 * irq_alloc_info - X86 specific interrupt allocation info
 * @type:	X86 specific allocation type
 * @flags:	Flags for allocation tweaks
 * @devid:	Device ID for allocations
 * @hwirq:	Associated hw interrupt number in the domain
 * @mask:	CPU mask for vector allocation
 * @desc:	Pointer to msi descriptor
 * @data:	Allocation specific data
 */
struct irq_alloc_info {
	enum irq_alloc_type	type;
	u32			flags;
	const struct cpumask	*mask;	/* CPU mask for vector allocation */
	u32			devid;
	irq_hw_number_t		hwirq;
	const struct cpumask	*mask;
	struct msi_desc		*desc;
	void			*data;

	union {
		int		unused;
#ifdef	CONFIG_HPET_TIMER
@@ -87,11 +102,6 @@ struct irq_alloc_info {
			unsigned long	uv_offset;
			char		*uv_name;
		};
#endif
#if IS_ENABLED(CONFIG_VMD)
		struct {
			struct msi_desc *desc;
		};
#endif
	};
};