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


Groups > linux.kernel > #1245806

Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi

From Qais Yousef <qais.yousef@imgtec.com>
Newsgroups linux.kernel
Subject Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi
Date 2015-10-13 16:50 +0200
Message-ID <qj93R-18p-41@gated-at.bofh.it> (permalink)
References <qj4Qx-3vO-3@gated-at.bofh.it> <qj4QA-3vO-47@gated-at.bofh.it> <qj87M-8dT-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/13/2015 02:40 PM, Thomas Gleixner wrote:
> On Tue, 13 Oct 2015, Qais Yousef wrote:
>
> Lacks kerneldoc
>
>> +int __irq_desc_send_ipi(struct irq_desc *desc, const struct ipi_mask *dest)
>> +{
>> +	struct irq_data *data = irq_desc_get_irq_data(desc);
>> +	struct irq_chip *chip = irq_data_get_irq_chip(data);
>> +
>> +	if (!chip || !chip->irq_send_ipi)
>> +		return -EINVAL;
>> +
>> +	/*
>> +	 * Do not validate the mask for IPIs marked global. These are
>> +	 * regular IPIs so we can avoid the operation as their target
>> +	 * mask is the cpu_possible_mask.
>> +	 */
>> +	if (!dest->global) {
>> +		if (!bitmap_subset(dest->cpumask, data->ipi_mask.cpumask,
>> +				   dest->nbits))
>> +			return -EINVAL;
>> +	}
> This looks half thought out. You rely on the caller getting the global
> bit right. There should be a sanity check for this versus
> data->ipi_mask and also you need to validate nbits.

Yes I might have rushed this part as I did it last. I'll improve it.

>
>> +EXPORT_SYMBOL(irq_send_ipi);
> EXPORT_SYMBOL_GPL please
>
>

OK.

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

[RFC v2 PATCH 00/14] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 12:20 +0200
  [RFC v2 PATCH 03/14] irq: add new struct ipi_mask Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 12:20 +0200
    Re: [RFC v2 PATCH 03/14] irq: add new struct ipi_mask Thomas Gleixner <tglx@linutronix.de> - 2015-10-13 15:30 +0200
      Re: [RFC v2 PATCH 03/14] irq: add new struct ipi_mask Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 16:30 +0200
  [RFC v2 PATCH 08/14] irq: implement irq_send_ipi Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 12:20 +0200
    Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi kbuild test robot <lkp@intel.com> - 2015-10-13 13:20 +0200
    Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi kbuild test robot <lkp@intel.com> - 2015-10-13 13:40 +0200
    Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi Thomas Gleixner <tglx@linutronix.de> - 2015-10-13 15:50 +0200
      Re: [RFC v2 PATCH 08/14] irq: implement irq_send_ipi Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 16:50 +0200
  Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Thomas Gleixner <tglx@linutronix.de> - 2015-10-13 16:00 +0200
    Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-10-13 16:50 +0200
    Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-13 19:30 +0200
      Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Thomas Gleixner <tglx@linutronix.de> - 2015-10-13 19:30 +0200
  Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Davidlohr Bueso <dave@stgolabs.net> - 2015-10-14 17:10 +0200
    Re: [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Qais Yousef <qais.yousef@imgtec.com> - 2015-10-14 17:50 +0200

csiph-web