aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:40:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:40:17 -0400
commitbbce2ad2d711c12d93145a7bbdf086e73f414bcd (patch)
tree35432a39f68f4c5df44ed38037cbf05adadb923e /include/asm-generic
parent0f776dc377f6c87f4e4d4a5f63602f33fb93b31e (diff)
parent0f95e2ffc58f5d32a90eb1051d17aeebc21cf91d (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.8: API: - first part of skcipher low-level conversions - add KPP (Key-agreement Protocol Primitives) interface. Algorithms: - fix IPsec/cryptd reordering issues that affects aesni - RSA no longer does explicit leading zero removal - add SHA3 - add DH - add ECDH - improve DRBG performance by not doing CTR by hand Drivers: - add x86 AVX2 multibuffer SHA256/512 - add POWER8 optimised crc32c - add xts support to vmx - add DH support to qat - add RSA support to caam - add Layerscape support to caam - add SEC1 AEAD support to talitos - improve performance by chaining requests in marvell/cesa - add support for Araneus Alea I USB RNG - add support for Broadcom BCM5301 RNG - add support for Amlogic Meson RNG - add support Broadcom NSP SoC RNG" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (180 commits) crypto: vmx - Fix aes_p8_xts_decrypt build failure crypto: vmx - Ignore generated files crypto: vmx - Adding support for XTS crypto: vmx - Adding asm subroutines for XTS crypto: skcipher - add comment for skcipher_alg->base crypto: testmgr - Print akcipher algorithm name crypto: marvell - Fix wrong flag used for GFP in mv_cesa_dma_add_iv_op crypto: nx - off by one bug in nx_of_update_msc() crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct crypto: scatterwalk - Inline start/map/done crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start crypto: scatterwalk - Remove unnecessary advance in scatterwalk_pagedone crypto: scatterwalk - Fix test in scatterwalk_done crypto: api - Optimise away crypto_yield when hard preemption is on crypto: scatterwalk - add no-copy support to copychunks crypto: scatterwalk - Remove scatterwalk_bytes_sglen crypto: omap - Stop using crypto scatterwalk_bytes_sglen crypto: skcipher - Remove top-level givcipher interface crypto: user - Remove crypto_lookup_skcipher call crypto: cts - Convert to skcipher ...
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/io.h71
-rw-r--r--include/asm-generic/iomap.h8
2 files changed, 75 insertions, 4 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 002b81f6f2bc..7ef015eb3403 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -585,6 +585,16 @@ static inline u32 ioread32(const volatile void __iomem *addr)
585} 585}
586#endif 586#endif
587 587
588#ifdef CONFIG_64BIT
589#ifndef ioread64
590#define ioread64 ioread64
591static inline u64 ioread64(const volatile void __iomem *addr)
592{
593 return readq(addr);
594}
595#endif
596#endif /* CONFIG_64BIT */
597
588#ifndef iowrite8 598#ifndef iowrite8
589#define iowrite8 iowrite8 599#define iowrite8 iowrite8
590static inline void iowrite8(u8 value, volatile void __iomem *addr) 600static inline void iowrite8(u8 value, volatile void __iomem *addr)
@@ -609,11 +619,21 @@ static inline void iowrite32(u32 value, volatile void __iomem *addr)
609} 619}
610#endif 620#endif
611 621
622#ifdef CONFIG_64BIT
623#ifndef iowrite64
624#define iowrite64 iowrite64
625static inline void iowrite64(u64 value, volatile void __iomem *addr)
626{
627 writeq(value, addr);
628}
629#endif
630#endif /* CONFIG_64BIT */
631
612#ifndef ioread16be 632#ifndef ioread16be
613#define ioread16be ioread16be 633#define ioread16be ioread16be
614static inline u16 ioread16be(const volatile void __iomem *addr) 634static inline u16 ioread16be(const volatile void __iomem *addr)
615{ 635{
616 return __be16_to_cpu(__raw_readw(addr)); 636 return swab16(readw(addr));
617} 637}
618#endif 638#endif
619 639
@@ -621,15 +641,25 @@ static inline u16 ioread16be(const volatile void __iomem *addr)
621#define ioread32be ioread32be 641#define ioread32be ioread32be
622static inline u32 ioread32be(const volatile void __iomem *addr) 642static inline u32 ioread32be(const volatile void __iomem *addr)
623{ 643{
624 return __be32_to_cpu(__raw_readl(addr)); 644 return swab32(readl(addr));
645}
646#endif
647
648#ifdef CONFIG_64BIT
649#ifndef ioread64be
650#define ioread64be ioread64be
651static inline u64 ioread64be(const volatile void __iomem *addr)
652{
653 return swab64(readq(addr));
625} 654}
626#endif 655#endif
656#endif /* CONFIG_64BIT */
627 657
628#ifndef iowrite16be 658#ifndef iowrite16be
629#define iowrite16be iowrite16be 659#define iowrite16be iowrite16be
630static inline void iowrite16be(u16 value, void volatile __iomem *addr) 660static inline void iowrite16be(u16 value, void volatile __iomem *addr)
631{ 661{
632 __raw_writew(__cpu_to_be16(value), addr); 662 writew(swab16(value), addr);
633} 663}
634#endif 664#endif
635 665
@@ -637,10 +667,20 @@ static inline void iowrite16be(u16 value, void volatile __iomem *addr)
637#define iowrite32be iowrite32be 667#define iowrite32be iowrite32be
638static inline void iowrite32be(u32 value, volatile void __iomem *addr) 668static inline void iowrite32be(u32 value, volatile void __iomem *addr)
639{ 669{
640 __raw_writel(__cpu_to_be32(value), addr); 670 writel(swab32(value), addr);
641} 671}
642#endif 672#endif
643 673
674#ifdef CONFIG_64BIT
675#ifndef iowrite64be
676#define iowrite64be iowrite64be
677static inline void iowrite64be(u64 value, volatile void __iomem *addr)
678{
679 writeq(swab64(value), addr);
680}
681#endif
682#endif /* CONFIG_64BIT */
683
644#ifndef ioread8_rep 684#ifndef ioread8_rep
645#define ioread8_rep ioread8_rep 685#define ioread8_rep ioread8_rep
646static inline void ioread8_rep(const volatile void __iomem *addr, void *buffer, 686static inline void ioread8_rep(const volatile void __iomem *addr, void *buffer,
@@ -668,6 +708,17 @@ static inline void ioread32_rep(const volatile void __iomem *addr,
668} 708}
669#endif 709#endif
670 710
711#ifdef CONFIG_64BIT
712#ifndef ioread64_rep
713#define ioread64_rep ioread64_rep
714static inline void ioread64_rep(const volatile void __iomem *addr,
715 void *buffer, unsigned int count)
716{
717 readsq(addr, buffer, count);
718}
719#endif
720#endif /* CONFIG_64BIT */
721
671#ifndef iowrite8_rep 722#ifndef iowrite8_rep
672#define iowrite8_rep iowrite8_rep 723#define iowrite8_rep iowrite8_rep
673static inline void iowrite8_rep(volatile void __iomem *addr, 724static inline void iowrite8_rep(volatile void __iomem *addr,
@@ -697,6 +748,18 @@ static inline void iowrite32_rep(volatile void __iomem *addr,
697 writesl(addr, buffer, count); 748 writesl(addr, buffer, count);
698} 749}
699#endif 750#endif
751
752#ifdef CONFIG_64BIT
753#ifndef iowrite64_rep
754#define iowrite64_rep iowrite64_rep
755static inline void iowrite64_rep(volatile void __iomem *addr,
756 const void *buffer,
757 unsigned int count)
758{
759 writesq(addr, buffer, count);
760}
761#endif
762#endif /* CONFIG_64BIT */
700#endif /* CONFIG_GENERIC_IOMAP */ 763#endif /* CONFIG_GENERIC_IOMAP */
701 764
702#ifdef __KERNEL__ 765#ifdef __KERNEL__
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
index d8f8622fa044..650fede33c25 100644
--- a/include/asm-generic/iomap.h
+++ b/include/asm-generic/iomap.h
@@ -30,12 +30,20 @@ extern unsigned int ioread16(void __iomem *);
30extern unsigned int ioread16be(void __iomem *); 30extern unsigned int ioread16be(void __iomem *);
31extern unsigned int ioread32(void __iomem *); 31extern unsigned int ioread32(void __iomem *);
32extern unsigned int ioread32be(void __iomem *); 32extern unsigned int ioread32be(void __iomem *);
33#ifdef CONFIG_64BIT
34extern u64 ioread64(void __iomem *);
35extern u64 ioread64be(void __iomem *);
36#endif
33 37
34extern void iowrite8(u8, void __iomem *); 38extern void iowrite8(u8, void __iomem *);
35extern void iowrite16(u16, void __iomem *); 39extern void iowrite16(u16, void __iomem *);
36extern void iowrite16be(u16, void __iomem *); 40extern void iowrite16be(u16, void __iomem *);
37extern void iowrite32(u32, void __iomem *); 41extern void iowrite32(u32, void __iomem *);
38extern void iowrite32be(u32, void __iomem *); 42extern void iowrite32be(u32, void __iomem *);
43#ifdef CONFIG_64BIT
44extern void iowrite64(u64, void __iomem *);
45extern void iowrite64be(u64, void __iomem *);
46#endif
39 47
40/* 48/*
41 * "string" versions of the above. Note that they 49 * "string" versions of the above. Note that they