1. 27 Sep, 2012 2 commits
  2. 21 Sep, 2012 3 commits
  3. 18 Sep, 2012 1 commit
  4. 15 Sep, 2012 3 commits
  5. 07 Sep, 2012 3 commits
    • David S. Miller's avatar
      sparc64: Use cpu_pgsz_mask for linear kernel mapping config. · c69ad0a3
      David S. Miller authored
      This required a little bit of reordering of how we set up the memory
      management early on.
      
      We now only know the final values of kern_linear_pte_xor[] after we
      take over the trap table and start processing TLB misses ourselves.
      
      So once we fill those values in we re-clear the kernel's 4M TSB and
      flush the TLBs.  That way if we find we support larger than 4M pages
      we won't have any stale smaller page size entries in the TSB.
      
      SUN4U Panther support for larger page sizes should now be extremely
      trivial but I have no hardware on which to test it and I believe
      that some of the sun4u TLB miss assembler needs to be audited first
      to make sure it really can handle larger than 4M PTEs properly.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c69ad0a3
    • David S. Miller's avatar
      sparc64: Probe cpu page size support more portably. · ce33fdc5
      David S. Miller authored
      On sun4v, interrogate the machine description.  This code is extremely
      defensive in nature, and a lot of the checks can probably be removed.
      
      On sun4u things are a lot simpler.  There are the page sizes all chips
      support, and then Panther adds 32MB and 256MB pages.
      
      Report the probed value in /proc/cpuinfo
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce33fdc5
    • David S. Miller's avatar
      sparc64: Support 2GB and 16GB page sizes for kernel linear mappings. · 4f93d21d
      David S. Miller authored
      SPARC-T4 supports 2GB pages.
      
      So convert kpte_linear_bitmap into an array of 2-bit values which
      index into kern_linear_pte_xor.
      
      Now kern_linear_pte_xor is used for 4 page size aligned regions,
      4MB, 256MB, 2GB, and 16GB respectively.
      
      Enabling 2GB pages is currently hardcoded using a check against
      sun4v_chip_type.  In the future this will be done more cleanly
      by interrogating the machine description which is the correct
      way to determine this kind of thing.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f93d21d
  6. 02 Sep, 2012 1 commit
    • David S. Miller's avatar
      sparc64: Fix bugs in unrolled 256-bit loops. · 699871bc
      David S. Miller authored
      Some dm-crypt testing revealed several bugs in the 256-bit unrolled
      loops.
      
      The DECRYPT_256_2() macro had two errors:
      
      1) Missing reload of KEY registers %f60 and %f62
      
      2) Missing "\" in penultimate line of definition.
      
      In aes_sparc64_ecb_decrypt_256, we were storing the second half of the
      encryption result from the wrong source registers.
      
      In aes_sparc64_ctr_crypt_256 we have to be careful when we fall out of
      the 32-byte-at-a-time loop and handle a trailing 16-byte chunk.  In
      that case we've clobbered the final key holding registers and have to
      restore them before executing the ENCRYPT_256() macro.  Inside of the
      32-byte-at-a-time loop things are OK, because we do this key register
      restoring during the first few rounds of the ENCRYPT_256_2() macro.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      699871bc
  7. 31 Aug, 2012 1 commit
  8. 30 Aug, 2012 3 commits
    • David S. Miller's avatar
      sparc64: Unroll CTR crypt loops in AES driver. · 4e71bb49
      David S. Miller authored
      Before:
      
      testing speed of ctr(aes) encryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 244 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 360 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 814 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 5021 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 240 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 378 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 939 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 6395 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 209 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 249 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 414 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 1073 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 7110 cycles (8192 bytes)
      
      testing speed of ctr(aes) decryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 225 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 233 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 344 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 810 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 5021 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 240 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 376 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 938 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 6380 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 214 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 251 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 411 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 1070 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 7114 cycles (8192 bytes)
      
      After:
      
      testing speed of ctr(aes) encryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 211 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 246 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 344 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 799 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 4975 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 210 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 236 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 365 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 888 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 6055 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 209 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 255 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 404 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 1010 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 6669 cycles (8192 bytes)
      
      testing speed of ctr(aes) decryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 210 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 233 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 340 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 818 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 4956 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 239 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 361 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 888 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 5996 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 214 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 248 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 395 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 1010 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 6664 cycles (8192 bytes)
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e71bb49
    • David S. Miller's avatar
      sparc64: Unroll ECB decryption loops in AES driver. · 30101315
      David S. Miller authored
      Before:
      
      testing speed of ecb(aes) decryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 223 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 230 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 325 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 719 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 4266 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 211 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 234 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 353 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 808 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 5344 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 214 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 243 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 393 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 939 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 6039 cycles (8192 bytes)
      
      After:
      
      testing speed of ecb(aes) decryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 226 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 231 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 313 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 681 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 3964 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 205 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 240 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 341 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 770 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 5050 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 216 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 250 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 371 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 869 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 5494 cycles (8192 bytes)
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30101315
    • David S. Miller's avatar
      sparc64: Unroll ECB encryption loops in AES driver. · 03d168ad
      David S. Miller authored
      The AES opcodes have a 3 cycle latency, so by doing 32-bytes at a
      time we avoid a pipeline bubble in between every round.
      
      For the 256-bit key case, it looks like we're doing more work in
      order to reload the KEY registers during the loop to make space
      for scarce temporaries.  But the load dual issues with the AES
      operations so we get the KEY reloads essentially for free.
      
      Before:
      
      testing speed of ecb(aes) encryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 264 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 231 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 329 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 715 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 4248 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 221 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 234 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 359 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 803 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 5366 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 209 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 255 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 379 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 938 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 6041 cycles (8192 bytes)
      
      After:
      
      testing speed of ecb(aes) encryption
      test 0 (128 bit key, 16 byte blocks): 1 operation in 266 cycles (16 bytes)
      test 1 (128 bit key, 64 byte blocks): 1 operation in 256 cycles (64 bytes)
      test 2 (128 bit key, 256 byte blocks): 1 operation in 305 cycles (256 bytes)
      test 3 (128 bit key, 1024 byte blocks): 1 operation in 676 cycles (1024 bytes)
      test 4 (128 bit key, 8192 byte blocks): 1 operation in 3981 cycles (8192 bytes)
      test 5 (192 bit key, 16 byte blocks): 1 operation in 210 cycles (16 bytes)
      test 6 (192 bit key, 64 byte blocks): 1 operation in 233 cycles (64 bytes)
      test 7 (192 bit key, 256 byte blocks): 1 operation in 340 cycles (256 bytes)
      test 8 (192 bit key, 1024 byte blocks): 1 operation in 766 cycles (1024 bytes)
      test 9 (192 bit key, 8192 byte blocks): 1 operation in 5136 cycles (8192 bytes)
      test 10 (256 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
      test 11 (256 bit key, 64 byte blocks): 1 operation in 268 cycles (64 bytes)
      test 12 (256 bit key, 256 byte blocks): 1 operation in 368 cycles (256 bytes)
      test 13 (256 bit key, 1024 byte blocks): 1 operation in 890 cycles (1024 bytes)
      test 14 (256 bit key, 8192 byte blocks): 1 operation in 5718 cycles (8192 bytes)
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03d168ad
  9. 29 Aug, 2012 4 commits
  10. 28 Aug, 2012 1 commit
  11. 26 Aug, 2012 1 commit
  12. 23 Aug, 2012 1 commit
  13. 22 Aug, 2012 1 commit
  14. 20 Aug, 2012 4 commits
  15. 19 Aug, 2012 11 commits