• A
    powerpc/powernv/ioda/ioda2: Rework TCE invalidation in tce_build()/tce_free() · decbda25
    Alexey Kardashevskiy 提交于
    The pnv_pci_ioda_tce_invalidate() helper invalidates TCE cache. It is
    supposed to be called on IODA1/2 and not called on p5ioc2. It receives
    start and end host addresses of TCE table.
    
    IODA2 actually needs PCI addresses to invalidate the cache. Those
    can be calculated from host addresses but since we are going
    to implement multi-level TCE tables, calculating PCI address from
    a host address might get either tricky or ugly as TCE table remains flat
    on PCI bus but not in RAM.
    
    This moves pnv_pci_ioda_tce_invalidate() from generic pnv_tce_build/
    pnt_tce_free and defines IODA1/2-specific callbacks which call generic
    ones and do PHB-model-specific TCE cache invalidation. P5IOC2 keeps
    using generic callbacks as before.
    
    This changes pnv_pci_ioda2_tce_invalidate() to receives TCE index and
    number of pages which are PCI addresses shifted by IOMMU page shift.
    
    No change in behaviour is expected.
    Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
    Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
    Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
    decbda25
pci.c 19.0 KB