• Olof Johansson's avatar
    [PATCH] ppc64: IOMMU cleanups: Main cleanup patch · e6617020
    Olof Johansson authored
    Earlier cleanup efforts of the ppc64 IOMMU code have mostly been targeted
    at simplifying the allocation schemes and modularising things for the
    various platforms.  The IOMMU init functions are still a mess.  This is an
    attempt to clean them up and make them somewhat easier to follow.
    
    The new rules are:
    
    1. iommu_init_early_<arch> is called before any PCI/VIO init is done
    2. The pcibios fixup routines will call the iommu_{bus,dev}_setup functions
       appropriately as devices are added.
    
    TCE space allocation has changed somewhat:
    
    * On LPARs, nothing is really different. ibm,dma-window properties are still
      used to determine table sizes.
    * On pSeries SMP-mode (non-LPAR), the full TCE space per PHB is split up
      in 256MB chunks, each handed out to one child bus/slot as needed. This
      makes current max 7 child buses per PHB, something we're currently below
      on all machine models I'm aware of.
    * Exception to the above: Pre-POWER4 machines with Python PHBs have a full
      GB of DMA space allocated at the PHB level, since there are no EADS-level
      tables on such systems.
    * PowerMac and Maple still work like before: all buses/slots share one table.
    * VIO works like before, ibm,my-dma-window is used like before.
    * iSeries has not been touched much at all, besides the changed unit of
      the it_size variable in struct iommu_table.
    
    Other things changed:
    * Powermac and maple PCI/IOMMU inits have been changed a bit to conform to
      the new init structure
    * pci_dma_direct.c has been renamed pci_direct_iommu.c to match
      pci_iommu.c (see separate patch)
    * Likewise, a couple of the pci direct init functions have been renamed.
    Signed-off-by: default avatarOlof Johansson <olof@austin.ibm.com>
    Acked-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    e6617020
pSeries_pci.c 13.7 KB