Documentation/core-api/irq/irq-domain.rst
Following changes are needed to support hierarchy irq_domain:1) a new field 'parent' is added to structirq_domain; it's used to
maintain irq_domain hierarchy information.2) a new field 'parent_data' is added to structirq_data; it's used to
build hierarchy irq_data to match hierarchy irq_domains. The irq_data
is used to store irq_domain pointer and hardware irq number.3) new callbacks are added to structirq_domain_ops to support hierarchy
irq_domain operations.
/**
* irq_domain_alloc_irqs_parent - Allocate interrupts from parent domain
* @irq_base: Base IRQ number
* @nr_irqs: Number of IRQs to allocate
* @arg: Allocation data (arch/domain specific)
*
* Check whether the domain has been setup recursive. If not allocate
* through the parent domain.
*/intirq_domain_alloc_irqs_parent(structirq_domain*domain,unsignedint irq_base,unsignedint nr_irqs,void*arg){if(!domain->parent)return-ENOSYS;returnirq_domain_alloc_irqs_hierarchy(domain->parent, irq_base,
nr_irqs, arg);}EXPORT_SYMBOL_GPL(irq_domain_alloc_irqs_parent);
kernel/irq/chip.c
/**
* irq_chip_enable_parent - Enable the parent interrupt (defaults to unmask if
* NULL)
* @data: Pointer to interrupt specific data
*/voidirq_chip_enable_parent(structirq_data*data){
data = data->parent_data;if(data->chip->irq_enable)
data->chip->irq_enable(data);else
data->chip->irq_unmask(data);}EXPORT_SYMBOL_GPL(irq_chip_enable_parent);/**
* irq_chip_ack_parent - Acknowledge the parent interrupt
* @data: Pointer to interrupt specific data
*/voidirq_chip_ack_parent(structirq_data*data){
data = data->parent_data;
data->chip->irq_ack(data);}EXPORT_SYMBOL_GPL(irq_chip_ack_parent);/**
* irq_chip_eoi_parent - Invoke EOI on the parent interrupt
* @data: Pointer to interrupt specific data
*/voidirq_chip_eoi_parent(structirq_data*data){
data = data->parent_data;
data->chip->irq_eoi(data);}EXPORT_SYMBOL_GPL(irq_chip_eoi_parent);