Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1231944

Re: [PATCH 4/6] irq: add a new generic IPI handling code to irq core

From Qais Yousef <qais.yousef@imgtec.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/6] irq: add a new generic IPI handling code to irq core
Date 2015-09-24 10:30 +0200
Message-ID <qca4G-60q-23@gated-at.bofh.it> (permalink)
References <qbTwR-78H-1@gated-at.bofh.it> <qbTGy-7k3-19@gated-at.bofh.it> <qbVyG-1BU-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/23/2015 05:50 PM, Jiang Liu wrote:
> On 2015/9/23 22:49, Qais Yousef wrote:
>>   
>> +/**
>> + * irq_reserve_ipi() - setup an IPI to destination cpumask
>> + * @domain: IPI domain
>> + * @dest: cpumask of cpus to receive the IPI
>> + * @devid: devid that requested the reservation
>> + *
>> + * Allocate a virq that can be used to send IPI to any CPU in dest mask.
>> + *
>> + * On success it'll return linux irq number and 0 on failure
>> + */
>> +unsigned int irq_reserve_ipi(struct irq_domain *domain,
>> +			     const struct cpumask *dest, void *devid)
> Hi Qais,
> 	I have caught the idea why we need "dest" here. Per my
> understanding, IPI could be sent to any active CPUs and the target
> CPUs are specified when calling send_ipi(). What's the benefit or
> usage to use "dest" to define a possible target scope here? And
> how cpu hotplug?
> Thanks!
> Gerry
>


The CPUs we want to send the IPI to are not Linux CPUs only. My use case 
is about sending IPI to audio coprocessor.
So "dest" doesn't have to be part of Linux online CPUs, hence we need to 
specify it so that the underlying controller will know how to map to 
that CPU. I should have put more info in the cover letter, not just the 
link to the discussion, apologies for that.

I'm not sure about cpu hotplug. We could call irq_destroy_ipi() when a 
cpu is hot unplugged, but the current behaviour is to statically reserve 
the IPI and keep them reserved. I think it makes sense to keep it this 
way for SMP IPIs or things will get complicated.

For a coprocessor, if we the 'module is unloaded', I'd expect the 
irq_destroy_ipi() to be called returning the reserved IPI to the pool.

Makes sense?

Thanks,
Qais
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 16:50 +0200
  [PATCH 1/6] irqdomain: add new IRQ_DOMAIN_FLAGS_IPI Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 16:50 +0200
  [PATCH 2/6] irqdomain: add a new send_ipi() to irq_domain_ops Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 16:50 +0200
    Re: [PATCH 2/6] irqdomain: add a new send_ipi() to irq_domain_ops Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-23 18:50 +0200
      Re: [PATCH 2/6] irqdomain: add a new send_ipi() to irq_domain_ops Qais Yousef <qais.yousef@imgtec.com> - 2015-09-24 10:20 +0200
  [PATCH 5/6] irqchip: mips-gic: add a IPI hierarchy domain Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 17:00 +0200
  [PATCH 6/6] irqchip: mips-gic: use the new generic IPI API Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 17:00 +0200
  [PATCH 4/6] irq: add a new generic IPI handling code to irq core Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 17:00 +0200
    Re: [PATCH 4/6] irq: add a new generic IPI handling code to irq core Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-23 19:00 +0200
      Re: [PATCH 4/6] irq: add a new generic IPI handling code to irq core Qais Yousef <qais.yousef@imgtec.com> - 2015-09-24 10:30 +0200
        Re: [PATCH 4/6] irq: add a new generic IPI handling code to irq  core Thomas Gleixner <tglx@linutronix.de> - 2015-09-29 18:20 +0200
  [PATCH 3/6] irqdomain: add struct irq_hwcfg and helper functions Qais Yousef <qais.yousef@imgtec.com> - 2015-09-23 17:00 +0200
  Re: [PATCH 0/6] Implement generic IPI support mechanism Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-23 19:00 +0200
    Re: [PATCH 0/6] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-09-24 10:40 +0200
      Re: [PATCH 0/6] Implement generic IPI support mechanism Thomas Gleixner <tglx@linutronix.de> - 2015-09-29 22:50 +0200
        Re: [PATCH 0/6] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-09-30 15:40 +0200
          Re: [PATCH 0/6] Implement generic IPI support mechanism Thomas Gleixner <tglx@linutronix.de> - 2015-09-30 16:10 +0200
            Re: [PATCH 0/6] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-09-30 16:10 +0200

csiph-web