diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-18 15:11:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-18 15:11:14 -0400 |
commit | 8b53c76533aa4356602aea98f98a2f3b4051464c (patch) | |
tree | ab10ba58e21501407f8108a6bb9003daa2176962 /lib/mpi/longlong.h | |
parent | 6cfae0c26b21dce323fe8799b66cf4bc996e3565 (diff) | |
parent | 9575d1a5c0780ea26ff8dd29c94a32be32ce3c85 (diff) |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu:
"API:
- Add the ability to abort a skcipher walk.
Algorithms:
- Fix XTS to actually do the stealing.
- Add library helpers for AES and DES for single-block users.
- Add library helpers for SHA256.
- Add new DES key verification helper.
- Add surrounding bits for ESSIV generator.
- Add accelerations for aegis128.
- Add test vectors for lzo-rle.
Drivers:
- Add i.MX8MQ support to caam.
- Add gcm/ccm/cfb/ofb aes support in inside-secure.
- Add ofb/cfb aes support in media-tek.
- Add HiSilicon ZIP accelerator support.
Others:
- Fix potential race condition in padata.
- Use unbound workqueues in padata"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (311 commits)
crypto: caam - Cast to long first before pointer conversion
crypto: ccree - enable CTS support in AES-XTS
crypto: inside-secure - Probe transform record cache RAM sizes
crypto: inside-secure - Base RD fetchcount on actual RD FIFO size
crypto: inside-secure - Base CD fetchcount on actual CD FIFO size
crypto: inside-secure - Enable extended algorithms on newer HW
crypto: inside-secure: Corrected configuration of EIP96_TOKEN_CTRL
crypto: inside-secure - Add EIP97/EIP197 and endianness detection
padata: remove cpu_index from the parallel_queue
padata: unbind parallel jobs from specific CPUs
padata: use separate workqueues for parallel and serial work
padata, pcrypt: take CPU hotplug lock internally in padata_alloc_possible
crypto: pcrypt - remove padata cpumask notifier
padata: make padata_do_parallel find alternate callback CPU
workqueue: require CPU hotplug read exclusion for apply_workqueue_attrs
workqueue: unconfine alloc/apply/free_workqueue_attrs()
padata: allocate workqueue internally
arm64: dts: imx8mq: Add CAAM node
random: Use wait_event_freezable() in add_hwgenerator_randomness()
crypto: ux500 - Fix COMPILE_TEST warnings
...
Diffstat (limited to 'lib/mpi/longlong.h')
-rw-r--r-- | lib/mpi/longlong.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 3bb6260d8f42..2dceaca27489 100644 --- a/lib/mpi/longlong.h +++ b/lib/mpi/longlong.h | |||
@@ -639,30 +639,12 @@ do { \ | |||
639 | ************** MIPS ***************** | 639 | ************** MIPS ***************** |
640 | ***************************************/ | 640 | ***************************************/ |
641 | #if defined(__mips__) && W_TYPE_SIZE == 32 | 641 | #if defined(__mips__) && W_TYPE_SIZE == 32 |
642 | #if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | ||
643 | #define umul_ppmm(w1, w0, u, v) \ | 642 | #define umul_ppmm(w1, w0, u, v) \ |
644 | do { \ | 643 | do { \ |
645 | UDItype __ll = (UDItype)(u) * (v); \ | 644 | UDItype __ll = (UDItype)(u) * (v); \ |
646 | w1 = __ll >> 32; \ | 645 | w1 = __ll >> 32; \ |
647 | w0 = __ll; \ | 646 | w0 = __ll; \ |
648 | } while (0) | 647 | } while (0) |
649 | #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
650 | #define umul_ppmm(w1, w0, u, v) \ | ||
651 | __asm__ ("multu %2,%3" \ | ||
652 | : "=l" ((USItype)(w0)), \ | ||
653 | "=h" ((USItype)(w1)) \ | ||
654 | : "d" ((USItype)(u)), \ | ||
655 | "d" ((USItype)(v))) | ||
656 | #else | ||
657 | #define umul_ppmm(w1, w0, u, v) \ | ||
658 | __asm__ ("multu %2,%3\n" \ | ||
659 | "mflo %0\n" \ | ||
660 | "mfhi %1" \ | ||
661 | : "=d" ((USItype)(w0)), \ | ||
662 | "=d" ((USItype)(w1)) \ | ||
663 | : "d" ((USItype)(u)), \ | ||
664 | "d" ((USItype)(v))) | ||
665 | #endif | ||
666 | #define UMUL_TIME 10 | 648 | #define UMUL_TIME 10 |
667 | #define UDIV_TIME 100 | 649 | #define UDIV_TIME 100 |
668 | #endif /* __mips__ */ | 650 | #endif /* __mips__ */ |
@@ -687,7 +669,7 @@ do { \ | |||
687 | : "d" ((UDItype)(u)), \ | 669 | : "d" ((UDItype)(u)), \ |
688 | "d" ((UDItype)(v))); \ | 670 | "d" ((UDItype)(v))); \ |
689 | } while (0) | 671 | } while (0) |
690 | #elif (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) | 672 | #else |
691 | #define umul_ppmm(w1, w0, u, v) \ | 673 | #define umul_ppmm(w1, w0, u, v) \ |
692 | do { \ | 674 | do { \ |
693 | typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ | 675 | typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ |
@@ -695,22 +677,6 @@ do { \ | |||
695 | w1 = __ll >> 64; \ | 677 | w1 = __ll >> 64; \ |
696 | w0 = __ll; \ | 678 | w0 = __ll; \ |
697 | } while (0) | 679 | } while (0) |
698 | #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
699 | #define umul_ppmm(w1, w0, u, v) \ | ||
700 | __asm__ ("dmultu %2,%3" \ | ||
701 | : "=l" ((UDItype)(w0)), \ | ||
702 | "=h" ((UDItype)(w1)) \ | ||
703 | : "d" ((UDItype)(u)), \ | ||
704 | "d" ((UDItype)(v))) | ||
705 | #else | ||
706 | #define umul_ppmm(w1, w0, u, v) \ | ||
707 | __asm__ ("dmultu %2,%3\n" \ | ||
708 | "mflo %0\n" \ | ||
709 | "mfhi %1" \ | ||
710 | : "=d" ((UDItype)(w0)), \ | ||
711 | "=d" ((UDItype)(w1)) \ | ||
712 | : "d" ((UDItype)(u)), \ | ||
713 | "d" ((UDItype)(v))) | ||
714 | #endif | 680 | #endif |
715 | #define UMUL_TIME 20 | 681 | #define UMUL_TIME 20 |
716 | #define UDIV_TIME 140 | 682 | #define UDIV_TIME 140 |