• I
    powerpc/msi: Improve IRQ bitmap allocator · b0345bbc
    Ian Munsie 提交于
    Currently msi_bitmap_alloc_hwirqs() will round up any IRQ allocation requests
    to the nearest power of 2. eg. ask for 5 IRQs and you'll get 8. This wastes a
    lot of IRQs which can be a scarce resource.
    
    For cxl we may require multiple IRQs for every context that is attached to the
    accelerator. There may be 1000s of contexts attached, hence we can easily run
    out of IRQs, especially if we are needlessly wasting them.
    
    This changes the msi_bitmap_alloc_hwirqs() to allocate only the required number
    of IRQs, hence avoiding this wastage. It keeps the natural alignment
    requirement though.
    Signed-off-by: NIan Munsie <imunsie@au1.ibm.com>
    Signed-off-by: NMichael Neuling <mikey@neuling.org>
    Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
    b0345bbc
msi_bitmap.c 7.0 KB