25 Jul, 2008

1 commit

  • To support Cooperative Memory Overcommitment (CMO), we need to check
    for failure from some of the tce hcalls.

    These changes for the pseries platform affect the powerpc architecture;
    patches for the other affected platforms are included in this patch.

    pSeries platform IOMMU code changes:
    * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and
    return an error.

    Architecture IOMMU code changes:
    * Calls to ppc_md.tce_build need to check return values and return
    DMA_MAPPING_ERROR for transient errors.

    Architecture changes:
    * struct machdep_calls for tce_build*_pSeriesLP functions need to change
    to indicate failure.
    * all other platforms will need updates to iommu functions to match the new
    calling semantics; they will return 0 on success. The other platforms
    default configs have been built, but no further testing was performed.

    Signed-off-by: Robert Jennings
    Acked-by: Olof Johansson
    Acked-by: Paul Mackerras
    Signed-off-by: Benjamin Herrenschmidt

    Robert Jennings
     

22 Jul, 2008

1 commit


14 Feb, 2008

1 commit


17 Aug, 2007

1 commit


07 May, 2007

1 commit


09 Mar, 2007

1 commit


04 Dec, 2006

2 commits

  • This patch adds full cell iommu support (and iommu disabled mode).

    It implements mapping/unmapping of iommu pages on demand using the
    standard powerpc iommu framework. It also supports running with
    iommu disabled for machines with less than 2GB of memory. (The
    default is off in that case, though it can be forced on with the
    kernel command line option iommu=force).

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Jeremy Kerr
     
  • This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
    is untouched for now.

    We use the new dev_archdata structure to add the dma operations pointer
    and associated data to struct device. While at it, we also add the OF node
    pointer and numa node. In the future, we might want to look into merging
    that with pci_dn as well.

    The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
    by a set of generic iommu and direct DMA ops (non PCI specific) that can be
    used by bus types. The toplevel implementation is now inline.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

01 Nov, 2006

1 commit

  • The 10Gigabit ethernet device drivers appear to be able to chew
    up all 256MB of TCE mappings on pSeries systems, as evidenced by
    numerous error messages:

    iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1

    Some experimentation indicates that this is essentially because
    one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
    the large 64K pages are enabled. Thus, it doesn't take much to
    exhaust all of the available DMA mappings for a high-speed card.

    This patch changes the iommu allocator to work with its own
    unique, distinct page size. Although the patch is long, its
    actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
    and then uses this in all the places that matter.

    As a side effect, it also dramatically improves network performance
    on platforms with H-calls on iommu translation inserts/removes (since
    we no longer call it 16 times for a 1500 bytes packet when the iommu HW
    is still 4k).

    In the future, we might want to make the IOMMU_PAGE_SIZE a variable
    in the iommu_table instance, thus allowing support for different HW
    page sizes in the iommu itself.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Olof Johansson
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Linas Vepstas
     

13 Sep, 2006

1 commit


01 Jul, 2006

1 commit


29 Jun, 2006

1 commit


15 Jun, 2006

1 commit


21 Apr, 2006

1 commit

  • Turn on the DART already at 1GB. This is needed because of crippled
    devices in some systems, i.e. Airport Extreme cards, only supporting
    30-bit DMA addresses.

    Otherwise, users with between 1 and 2GB of memory will need to manually
    enable it with iommu=force, and that's no good.

    Some simple performance tests show that there's a slight impact of
    enabling DART, but it's in the 1-3% range (kernel build with disk I/O
    as well as over NFS).

    iommu=off can still be used for those who don't want to deal with the
    overhead (and don't need it for any devices).

    Signed-off-by: Olof Johansson
    Signed-off-by: Paul Mackerras

    Olof Johansson
     

10 Feb, 2006

1 commit


08 Feb, 2006

1 commit


07 Feb, 2006

1 commit

  • Currently most callers of lmb_alloc() don't check if it worked or not, if it
    ever does weird bad things will probably happen. The few callers who do check
    just panic or BUG_ON.

    So make lmb_alloc() panic internally, to catch bugs at the source. The few
    callers who did check the result no longer need to.

    The only caller that did anything interesting with the return result was
    careful_allocation(). For it we create __lmb_alloc_base() which _doesn't_ panic
    automatically, a little messy, but passable.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     

12 Jan, 2006

1 commit


09 Jan, 2006

2 commits

  • The patch enabling the new G5's with U4 broke initialization of the DART
    driver, causing it to trigger a BUG_ON for a case that is actually
    valid. This patch fixes it:

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • This adds some very basic support for the new machines, including the
    Quad G5 (tested), and other new dual core based machines and iMac G5
    iSight (untested). This is still experimental ! There is no thermal
    control yet, there is no proper handing of MSIs, etc.. but it
    boots, I have all 4 cores up on my machine. Compared to the previous
    version of this patch, this one adds DART IOMMU support for the U4
    chipset and thus should work fine on setups with more than 2Gb of RAM.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt