1. 30 10月, 2012 2 次提交
    • A
      swiotlb: Use physical addresses for swiotlb_tbl_unmap_single · 61ca08c3
      Alexander Duyck 提交于
      This change makes it so that the unmap functionality also uses physical
      addresses.  This helps to further reduce the use of virt_to_phys and
      phys_to_virt functions.
      
      In order to clarify things since we now have 2 physical addresses in use
      inside of swiotlb_tbl_unmap_single I am renaming phys to orig_addr, and
      dma_addr to tlb_addr.  This way is should be clear that orig_addr is
      contained within io_orig_addr and tlb_addr is an address within the
      io_tlb_addr buffer.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      61ca08c3
    • A
      swiotlb: Return physical addresses when calling swiotlb_tbl_map_single · e05ed4d1
      Alexander Duyck 提交于
      This change makes it so that swiotlb_tbl_map_single will return a physical
      address instead of a virtual address when called.  The advantage to this once
      again is that we are avoiding a number of virt_to_phys and phys_to_virt
      translations by working with everything as a physical address.
      
      One change I had to make in order to support using physical addresses is that
      I could no longer trust 0 to be a invalid physical address on all platforms.
      So instead I made it so that ~0 is returned on error.  This should never be a
      valid return value as it implies that only one byte would be available for
      use.
      
      In order to clarify things since we now have 2 physical addresses in use
      inside of swiotlb_tbl_map_single I am renaming phys to orig_addr, and
      dma_addr to tlb_addr.  This way is should be clear that orig_addr is
      contained within io_orig_addr and tlb_addr is an address within the
      io_tlb_addr buffer.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      e05ed4d1
  2. 22 8月, 2012 1 次提交
  3. 06 12月, 2011 1 次提交
  4. 07 6月, 2011 1 次提交
    • F
      swiotlb: Export swioltb_nr_tbl and utilize it as appropiate. · 5f98ecdb
      FUJITA Tomonori 提交于
      By default the io_tlb_nslabs is set to zero, and gets set to
      whatever value is passed in via swiotlb_init_with_tbl function.
      The default value passed in is 64MB. However, if the user provides
      the 'swiotlb=<nslabs>' the default value is ignored and
      the value provided by the user is used... Except when the SWIOTLB
      is used under Xen - there the default value of 64MB is used and
      the Xen-SWIOTLB has no mechanism to get the 'io_tlb_nslabs' filled
      out by setup_io_tlb_npages functions. This patch provides a function
      for the Xen-SWIOTLB to call to see if the io_tlb_nslabs is set
      and if so use that value.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      5f98ecdb
  5. 07 6月, 2010 3 次提交
  6. 28 5月, 2010 1 次提交
  7. 15 11月, 2009 1 次提交
  8. 10 11月, 2009 2 次提交
    • F
      swiotlb: Defer swiotlb init printing, export swiotlb_print_info() · ad32e8cb
      FUJITA Tomonori 提交于
      This enables us to avoid printing swiotlb memory info when we
      initialize swiotlb. After swiotlb initialization, we could find
      that we don't need swiotlb.
      
      This patch removes the code to print swiotlb memory info in
      swiotlb_init() and exports the function to do that.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      Cc: tony.luck@intel.com
      Cc: benh@kernel.crashing.org
      LKML-Reference: <1257849980-22640-9-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      [ -v2: merge up conflict ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ad32e8cb
    • F
      swiotlb: Add swiotlb_free() function · 5740afdb
      FUJITA Tomonori 提交于
      swiotlb_free() function frees all allocated memory for swiotlb.
      
      We need to initialize swiotlb before IOMMU initialization (x86
      and powerpc needs to allocate memory from bootmem allocator). If
      IOMMU initialization is successful, we need to free swiotlb
      resource (don't want to waste 64MB).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      LKML-Reference: <1257849980-22640-8-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      [ -v2: build fix for the !CONFIG_SWIOTLB case ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5740afdb
  9. 28 7月, 2009 4 次提交
  10. 08 4月, 2009 1 次提交
  11. 11 1月, 2009 1 次提交
  12. 06 1月, 2009 2 次提交
  13. 28 12月, 2008 1 次提交
  14. 18 12月, 2008 2 次提交
  15. 17 12月, 2008 2 次提交
  16. 17 10月, 2008 1 次提交