[PATCH] cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs

Frederic Barrat fbarrat at linux.vnet.ibm.com
Thu May 5 15:58:51 AEST 2016



Le 05/05/2016 02:14, Ian Munsie a écrit :
> Excerpts from Frederic Barrat's message of 2016-05-05 00:26:09 +1000:
>> I believe there's a potential problem there for powerVM guest.
>> In afu_allocate_irqs(), the allocation of the bitmap for the AFU
>> interrupts should return NULL (since count = 0). Therefore we'll skip
>> the allocation for the irq names. Yet we need one for the PSL interrupt.
>> I'm not too sure of what the effect of calling cxl_map_irq with a NULL
>> name is (later, in afu_register_hwirqs), but it's likely not very good.
>> That is admittedly a latent pb introduced by the powerVM patch, only
>> revealed here.
>
> Actually I believe it should be fine - kcalloc should return
> ZERO_SIZE_POINTER, not NULL and the names should still be allocated.
> I'm pretty sure we already rely on this for AFUs that don't use any
> interrupts per context, otherwise they would fail with -ENOMEM.

You're right, all is fine.

Reviewed-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>

   Fred



More information about the Linuxppc-dev mailing list