Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irqchip/apple-aic: Add FW info retrieval support

Plug the new .get_fwspec_info() callback into the Apple AIC driver, using
some of the existing FIQ affinity handling infrastructure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Acked-by: Sven Peter <sven@kernel.org>
Link: https://patch.msgid.link/20251020122944.3074811-7-maz@kernel.org

authored by

Marc Zyngier and committed by
Thomas Gleixner
de575de8 68905ea6

+31 -3
+31 -3
drivers/irqchip/irq-apple-aic.c
··· 651 651 return 0; 652 652 } 653 653 654 + static int aic_irq_get_fwspec_info(struct irq_fwspec *fwspec, struct irq_fwspec_info *info) 655 + { 656 + const struct cpumask *mask; 657 + u32 intid; 658 + 659 + info->flags = 0; 660 + info->affinity = NULL; 661 + 662 + if (fwspec->param[0] != AIC_FIQ) 663 + return 0; 664 + 665 + if (fwspec->param_count == 3) 666 + intid = fwspec->param[1]; 667 + else 668 + intid = fwspec->param[2]; 669 + 670 + if (aic_irqc->fiq_aff[intid]) 671 + mask = &aic_irqc->fiq_aff[intid]->aff; 672 + else 673 + mask = cpu_possible_mask; 674 + 675 + info->affinity = mask; 676 + info->flags = IRQ_FWSPEC_INFO_AFFINITY_VALID; 677 + 678 + return 0; 679 + } 680 + 654 681 static int aic_irq_domain_translate(struct irq_domain *id, 655 682 struct irq_fwspec *fwspec, 656 683 unsigned long *hwirq, ··· 777 750 } 778 751 779 752 static const struct irq_domain_ops aic_irq_domain_ops = { 780 - .translate = aic_irq_domain_translate, 781 - .alloc = aic_irq_domain_alloc, 782 - .free = aic_irq_domain_free, 753 + .translate = aic_irq_domain_translate, 754 + .alloc = aic_irq_domain_alloc, 755 + .free = aic_irq_domain_free, 756 + .get_fwspec_info = aic_irq_get_fwspec_info, 783 757 }; 784 758 785 759 /*