07 Mar, 2007

1 commit


13 Feb, 2007

1 commit

  • Optimise swiotlb.c for size.

    text data bss dec hex filename
    5009 89 64 5162 142a lib/swiotlb.o-before
    4666 89 64 4819 12d3 lib/swiotlb.o-after

    For some reason my gcc (4.0.2) doesn't want to tailcall these things.

    swiotlb_sync_sg_for_device:
    pushq %rbp #
    movl $1, %r8d #,
    movq %rsp, %rbp #,
    call swiotlb_sync_sg #
    leave
    ret
    .size swiotlb_sync_sg_for_device, .-swiotlb_sync_sg_for_device
    .section .text.swiotlb_sync_sg_for_cpu,"ax",@progbits
    .globl swiotlb_sync_sg_for_cpu
    .type swiotlb_sync_sg_for_cpu, @function
    swiotlb_sync_sg_for_cpu:
    pushq %rbp #
    xorl %r8d, %r8d #
    movq %rsp, %rbp #,
    call swiotlb_sync_sg #
    leave
    ret

    Cc: Jan Beulich
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

06 Feb, 2007

4 commits

  • Add abstraction so that the file can be used by environments other than IA64
    and EM64T, namely for Xen.

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Tony Luck

    Jan Beulich
     
  • - add proper __init decoration to swiotlb's init code (and the code calling
    it, where not already the case)

    - replace uses of 'unsigned long' with dma_addr_t where appropriate

    - do miscellaneous simplicfication and cleanup

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Tony Luck

    Jan Beulich
     
  • Convert all phys_to_virt/virt_to_phys uses to bus_to_virt/virt_to_bus, as is
    what is meant and what is needed in (at least) some virtualized environments
    like Xen.

    Signed-off-by: Jan Beulich
    Acked-by: Muli Ben-Yehuda
    Signed-off-by: Andrew Morton
    Signed-off-by: Tony Luck

    Jan Beulich
     
  • This patch fixes
    - marking I-cache clean of pages DMAed to now only done for IA64
    - broken multiple inclusion in include/asm-x86_64/swiotlb.h
    - missing call to mark_clean in swiotlb_sync_sg()
    - a (perhaps only theoretical) issue in swiotlb_dma_supported() when
    io_tlb_end is exactly at the end of memory

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Tony Luck

    Jan Beulich
     

25 Mar, 2006

1 commit


12 Jan, 2006

1 commit

  • AK: I hacked Muli's original patch a lot and there were a lot
    of changes - all bugs are probably to blame on me now.
    There were also some changes in the fall back behaviour
    for swiotlb - in particular it doesn't try to use GFP_DMA
    now anymore. Also all DMA mapping operations use the
    same core dma_alloc_coherent code with proper fallbacks now.
    And various other changes and cleanups.

    Known problems: iommu=force swiotlb=force together breaks
    needs more testing.

    This patch cleans up x86_64's DMA mapping dispatching code. Right now
    we have three possible IOMMU types: AGP GART, swiotlb and nommu, and
    in the future we will also have Xen's x86_64 swiotlb and other HW
    IOMMUs for x86_64. In order to support all of them cleanly, this
    patch:

    - introduces a struct dma_mapping_ops with function pointers for each
    of the DMA mapping operations of gart (AMD HW IOMMU), swiotlb
    (software IOMMU) and nommu (no IOMMU).

    - gets rid of:

    if (swiotlb)
    return swiotlb_xxx();

    - PCI_DMA_BUS_IS_PHYS is now checked against the dma_ops being set
    This makes swiotlb faster by avoiding double copying in some cases.

    Signed-Off-By: Muli Ben-Yehuda
    Signed-Off-By: Jon D. Mason
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Muli Ben-Yehuda
     

07 Jan, 2006

1 commit


21 Dec, 2005

1 commit

  • The overflow checking condition in lib/swiotlb.c was wrong.
    It would first run a NULL pointer through virt_to_phys before
    testing it. Since pci_map_sg overflow is not that uncommon
    and causes data corruption (including broken file systems) when not
    properly detected I think it's better to fix it in 2.6.15.

    This affects x86-64 and IA64.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

01 Nov, 2005

1 commit


21 Oct, 2005

1 commit


30 Sep, 2005

6 commits