Messages in this thread | | | Date | Sat, 24 Jan 2015 08:43:07 +0800 | From | Jiang Liu <> | Subject | Re: [PATCH v2 2/2] genirq: Allow irq_desc to carry the union of stacked irq_chip flags |
| |
On 2015/1/23 23:55, Thomas Gleixner wrote: > On Wed, 14 Jan 2015, Marc Zyngier wrote: > >> The current infrastructure for stacked domains doesn't propagate >> irq_chip flags, and as we only look at the top-level irq_chip, >> we may miss a number of critical flags. >> >> This patch accumulates the flags into a new set, stored at the >> irq_desc level, with an additional flag to indicate that this is >> a stack of irqchip. The accessor is updated to return the right one. > >> static inline unsigned long irq_desc_get_chip_flags(struct irq_desc *desc) >> { >> +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY >> + if (desc->chip_flags & IRQCHIP_STACKED_CHIPS) >> + return desc->chip_flags; >> +#endif >> return desc->irq_data.chip->flags; > > We can avoid the extra conditional if we just make the accumulated > flags unconditional and collect them even for the !hierarchy case. > > Also this patch is missing that chips can be swapped at runtime either > via the normal interfaces or via __irq_set_chip_handler_name_locked(). > > This needs to be addressed otherwise we might end up looking at the > wrong flags. I'm splitting irq_data into irq_common_data and irq_data, seems we could host flags by using irq_common_data instead of irq_desc.
> > Thanks, > > tglx >
| |