Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245781
| From | Qais Yousef <qais.yousef@imgtec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v2 PATCH 03/14] irq: add new struct ipi_mask |
| Date | 2015-10-13 16:30 +0200 |
| Message-ID | <qj8Kv-KS-27@gated-at.bofh.it> (permalink) |
| References | <qj4Qx-3vO-3@gated-at.bofh.it> <qj4QA-3vO-45@gated-at.bofh.it> <qj7Oq-7Q1-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/13/2015 02:26 PM, Thomas Gleixner wrote:
> On Tue, 13 Oct 2015, Qais Yousef wrote:
>> cpumask is limited to NR_CPUS. introduce ipi_mask which allows us to address
>> cpu range that is higher than NR_CPUS which is required for drivers to send
>> IPIs for coprocessor that are outside Linux CPU range.
>>
>> Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
>> ---
>> include/linux/irq.h | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/include/linux/irq.h b/include/linux/irq.h
>> index 11bf09288ddb..4b537e4d393b 100644
>> --- a/include/linux/irq.h
>> +++ b/include/linux/irq.h
>> @@ -125,6 +125,21 @@ enum {
>> struct msi_desc;
>> struct irq_domain;
>>
>> + /**
>> + * struct ipi_mask - IPI mask information
>> + * @cpumask: bitmap of cpumasks
>> + * @nbits: number of bits in cpumask
>> + * @global: whether the mask is SMP IPI ie: subset of cpu_possible_mask or not
>> + *
>> + * ipi_mask is similar to cpumask, but it provides nbits that's configurable
>> + * rather than fixed to NR_CPUS.
>> + */
>> +struct ipi_mask {
>> + unsigned long *cpumask;
>> + unsigned int nbits;
>> + bool global;
>> +};
> Can you make that:
>
> struct ipi_mask {
> unsigned int nbits;
> bool global;
> unsigned long cpu_bitmap[];
> };
>
> That allows you to allocate the data structure in one go. So the
> ipi_mask in irq_data_common becomes a pointer which is only filled in
> when ipi_mask is actually used.
>
> Note, I renamed cpumask to cpu_bitmap to avoid confusion with
> cpumasks.
>
> We also want a helper function
>
> struct cpumask *irq_data_get_ipi_mask(struct irq_data *data);
>
> so we can use normal cpumask operations for the majority of cases.
>
>
Will do.
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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