powerpc/powernv/ioda1: Improve DMA32 segment track
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: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
801846d1de
commit
2b923ed1bd
@@ -142,6 +142,10 @@ struct pnv_phb {
|
||||
unsigned int *m32_segmap;
|
||||
unsigned int *io_segmap;
|
||||
|
||||
/* DMA32 segment maps - IODA1 only */
|
||||
unsigned int dma32_count;
|
||||
unsigned int *dma32_segmap;
|
||||
|
||||
/* IRQ chip */
|
||||
int irq_chip_init;
|
||||
struct irq_chip irq_chip;
|
||||
@@ -158,9 +162,6 @@ struct pnv_phb {
|
||||
*/
|
||||
unsigned char pe_rmap[0x10000];
|
||||
|
||||
/* 32-bit TCE tables allocation */
|
||||
unsigned long tce32_count;
|
||||
|
||||
/* TCE cache invalidate registers (physical and
|
||||
* remapped)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user