1. 01 3月, 2012 1 次提交
  2. 10 8月, 2010 1 次提交
    • A
      iommu: inline iommu_num_pages · e269b085
      Anton Blanchard 提交于
      A profile of a network benchmark showed iommu_num_pages rather high up:
      
           0.52%  iommu_num_pages
      
      Looking at the profile, an integer divide is taking almost all of the time:
      
            %
               :      c000000000376ea4 <.iommu_num_pages>:
          1.93 :      c000000000376ea4:       fb e1 ff f8     std     r31,-8(r1)
          0.00 :      c000000000376ea8:       f8 21 ff c1     stdu    r1,-64(r1)
          0.00 :      c000000000376eac:       7c 3f 0b 78     mr      r31,r1
          3.86 :      c000000000376eb0:       38 84 ff ff     addi    r4,r4,-1
          0.00 :      c000000000376eb4:       38 05 ff ff     addi    r0,r5,-1
          0.00 :      c000000000376eb8:       7c 84 2a 14     add     r4,r4,r5
         46.95 :      c000000000376ebc:       7c 00 18 38     and     r0,r0,r3
         45.66 :      c000000000376ec0:       7c 84 02 14     add     r4,r4,r0
          0.00 :      c000000000376ec4:       7c 64 2b 92     divdu   r3,r4,r5
          0.00 :      c000000000376ec8:       38 3f 00 40     addi    r1,r31,64
          0.00 :      c000000000376ecc:       eb e1 ff f8     ld      r31,-8(r1)
          1.61 :      c000000000376ed0:       4e 80 00 20     blr
      
      Since every caller of iommu_num_pages passes in a constant power of two
      we can inline this such that the divide is replaced by a shift. The
      entire function is only a few instructions once optimised, so it is
      a good candidate for inlining overall.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e269b085
  3. 16 12月, 2009 1 次提交
    • A
      iommu-helper: use bitmap library · a66022c4
      Akinobu Mita 提交于
      Use bitmap library and kill some unused iommu helper functions.
      
      1. s/iommu_area_free/bitmap_clear/
      
      2. s/iommu_area_reserve/bitmap_set/
      
      3. Use bitmap_find_next_zero_area instead of find_next_zero_area
      
        This cannot be simple substitution because find_next_zero_area
        doesn't check the last bit of the limit in bitmap
      
      4. Remove iommu_area_free, iommu_area_reserve, and find_next_zero_area
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a66022c4
  4. 17 10月, 2008 1 次提交
  5. 22 9月, 2008 1 次提交
  6. 29 7月, 2008 1 次提交
  7. 26 7月, 2008 1 次提交
  8. 05 3月, 2008 1 次提交
  9. 06 2月, 2008 1 次提交