Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448609
| From | Auger Eric <eric.auger@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe |
| Date | 2016-07-22 16:10 +0200 |
| Message-ID | <rXJjk-6SA-13@gated-at.bofh.it> (permalink) |
| References | <rWCWB-4qE-3@gated-at.bofh.it> <rWCWD-4qE-49@gated-at.bofh.it> <rWUTw-7mO-21@gated-at.bofh.it> <rXmmJ-81c-25@gated-at.bofh.it> <rXI3U-5Un-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Thomas,
On 22/07/2016 14:44, Thomas Gleixner wrote:
> On Thu, 21 Jul 2016, Auger Eric wrote:
>> On 20/07/2016 10:12, Thomas Gleixner wrote:
>>> On Tue, 19 Jul 2016, Eric Auger wrote:
>>>> +bool msi_doorbell_safe(void)
>>>> +{
>>>> + struct irqchip_doorbell *db;
>>>> + bool irq_remapping = true;
>>>> +
>>>> + mutex_lock(&irqchip_doorbell_mutex);
>>>> + list_for_each_entry(db, &irqchip_doorbell_list, next) {
>>>> + irq_remapping &= db->info.irq_remapping;
>>>
>>> db->info.irq_remapping is set in msi_doorbell_register(). So you can keep book
>>> about that there. No need to iterate here.
>> Yes makes sense to store the info at registration time. Currently this
>> function is not in any fast path but that's cleaner from a general
>> perspective. I will need to do such iteration at un-registration though.
>
> Two simple counter should be sufficient.
>
> nr_registered_bells;
> nr_remapped_bells;
Yes definitively smarter to use counters! mental viscosity.
Thanks
Eric
>
> ....
>
> Thanks,
>
> tglx
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v11 00/10] KVM PCIe/MSI passthrough on ARM/ARM64: kernel part 2/3: msi changes Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
[PATCH v11 02/10] genirq/msi: msi_compose wrapper Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
[PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
Re: [PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs Thomas Gleixner <tglx@linutronix.de> - 2016-07-20 11:10 +0200
Re: [PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs Auger Eric <eric.auger@redhat.com> - 2016-07-25 18:30 +0200
[PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
Re: [PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested Thomas Gleixner <tglx@linutronix.de> - 2016-07-20 11:20 +0200
Re: [PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested Auger Eric <eric.auger@redhat.com> - 2016-07-25 18:40 +0200
[PATCH v11 08/10] irqchip/gicv3-its: register the MSI global doorbell Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
[PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe Thomas Gleixner <tglx@linutronix.de> - 2016-07-20 10:20 +0200
Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe Auger Eric <eric.auger@redhat.com> - 2016-07-21 15:40 +0200
Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe Thomas Gleixner <tglx@linutronix.de> - 2016-07-22 14:50 +0200
Re: [PATCH v11 06/10] genirq/msi-doorbell: msi_doorbell_safe Auger Eric <eric.auger@redhat.com> - 2016-07-22 16:10 +0200
[PATCH v11 01/10] genirq/msi: export msi_get_domain_info Eric Auger <eric.auger@redhat.com> - 2016-07-19 15:10 +0200
csiph-web