Re: [PATCH 1/2] genirq: introduce update_irq_devid()

2019-08-11 Thread luoben
在 2019/8/9 上午3:56, Thomas Gleixner 写道: On Thu, 8 Aug 2019, Ben Luo wrote: +int update_irq_devid(unsigned int irq, void *dev_id, void *new_dev_id) +{ + struct irq_desc *desc = irq_to_desc(irq); + struct irqaction *action, **action_ptr; + unsigned long flags; + + WARN(in_

Re: [PATCH 1/2] genirq: introduce update_irq_devid()

2019-08-08 Thread Thomas Gleixner
On Thu, 8 Aug 2019, Ben Luo wrote: > +int update_irq_devid(unsigned int irq, void *dev_id, void *new_dev_id) > +{ > + struct irq_desc *desc = irq_to_desc(irq); > + struct irqaction *action, **action_ptr; > + unsigned long flags; > + > + WARN(in_interrupt(), > + "

[PATCH 1/2] genirq: introduce update_irq_devid()

2019-08-08 Thread Ben Luo
Sometimes, only the dev_id field of irqaction need to be changed. E.g. KVM VM with device passthru via VFIO may switch irq injection path between KVM irqfd and userspace eventfd. These two paths share the same irq num and handler for the same vector of a device, only with different dev_id referenci