• Gavin Shan's avatar
    powerpc/powernv/ioda1: Improve DMA32 segment track · 2b923ed1
    Gavin Shan authored
    In current implementation, the DMA32 segments required by one specific
    PE isn't calculated with the information hold in the PE independently.
    It conflicts with the PCI hotplug design: PE centralized, meaning the
    PE's DMA32 segments should be calculated from the information hold in
    the PE independently.
    
    This introduces an array (@dma32_segmap) for every PHB to track the
    DMA32 segmeng usage. Besides, this moves the logic calculating PE's
    consumed DMA32 segments to pnv_pci_ioda1_setup_dma_pe() so that PE's
    DMA32 segments are calculated/allocated from the information hold in
    the PE (DMA32 weight). Also the logic is improved: we try to allocate
    as much DMA32 segments as we can. It's acceptable that number of DMA32
    segments less than the expected number are allocated.
    Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
    Reviewed-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    2b923ed1
pci-ioda.c 95 KB