[PATCH 1/7] crypto: sun4i-ss: linearize buffers content must be kept

2020-09-17 Thread Corentin Labbe
When running the non-optimized cipher function, SS produce partial random output. This is due to linearize buffers being reseted after each loop. Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage") Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-s

[PATCH 5/7] crypto: sun4i-ss: initialize need_fallback

2020-09-17 Thread Corentin Labbe
The need_fallback is never initialized and seem to be always true at runtime. So all hardware operations are always bypassed. Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple of blocksize") Cc: Signed-off-by: Corentin Labbe --- drivers/crypto/allwinne

[PATCH 4/7] crypto: sun4i-ss: handle BigEndian for cipher

2020-09-17 Thread Corentin Labbe
c: Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c index c6

[PATCH 7/7] crypto: sun4i-ss: add SPDX header and remove blank lines

2020-09-17 Thread Corentin Labbe
This patchs fixes some remaining style issue. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/sun4i-ss

[PATCH 0/7] crypto: sun4i-ss: prevent always fallback for ciphers

2020-09-17 Thread Corentin Labbe
ch is "init" as true everytime. So basicly, since the patch introduced it, this probem hidden some bugs. This serie fixes all hidden problems, then fix the initialization of "need_fallback" and then add the stats like other allwinner drivers. Corentin Labbe (7): crypto:

[PATCH 6/7] crypto: sun4i-ss: enabled stats via debugfs

2020-09-17 Thread Corentin Labbe
This patch enable to access usage stats for each algorithm. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 .../allwinner/sun4i-ss/sun4i-ss-cipher.c | 21 .../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 54 +++ .../crypto

Re: [PATCH v2 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe()

2020-09-16 Thread Corentin Labbe
== -EPROBE_DEFER) > - return PTR_ERR(ss->reset); > - dev_err(>dev, "No reset control found\n"); > - return PTR_ERR(ss->reset); > - } > + if (IS_ERR(ss->reset)) > + return dev_err_probe(>dev, PTR_ERR(ss->reset), > + "No reset control found\n"); > > mutex_init(>mlock); > > -- > 2.17.1 > Hello Acked-by: Corentin Labbe Tested-by: Corentin Labbe Thanks

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-14 Thread Corentin Labbe
On Fri, Sep 11, 2020 at 02:13:55PM +1000, Herbert Xu wrote: > On Thu, Sep 10, 2020 at 02:22:48PM +0200, Corentin Labbe wrote: > > > > I get some md5 error on both A20+BE: > > alg: ahash: md5 test failed (wrong result) on test vector \"random: > > psize=129

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-14 Thread Corentin Labbe
On Fri, Sep 11, 2020 at 02:13:55PM +1000, Herbert Xu wrote: > On Thu, Sep 10, 2020 at 02:22:48PM +0200, Corentin Labbe wrote: > > > > I get some md5 error on both A20+BE: > > alg: ahash: md5 test failed (wrong result) on test vector \"random: > > psize=129

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-10 Thread Corentin Labbe
On Tue, Sep 08, 2020 at 03:00:36PM +1000, Herbert Xu wrote: > On Mon, Sep 07, 2020 at 06:00:29PM +0200, Corentin Labbe wrote: > > > > The put_unaligned should be _le32. > > > > This fix the modprobe tcrypt fail. > > Thanks. Yes the original code was correct

[PATCH v3] dt-bindings: crypto: Specify that allwinner,sun8i-a33-crypto needs reset

2020-09-07 Thread Corentin Labbe
When adding allwinner,sun8i-a33-crypto, I forgot to add that it needs reset. Furthermore, there are no need to use items to list only one compatible in compatible list. Fixes: f81547ba7a98 ("dt-bindings: crypto: add new compatible for A33 SS") Signed-off-by: Corentin Labbe --- Chang

Re: [PATCH] crypto: sun4i-ss - Fix SHA1 hash on A33-variant with BE CPU

2020-09-07 Thread Corentin Labbe
On Mon, Sep 07, 2020 at 04:24:00PM +1000, Herbert Xu wrote: > On Sun, Sep 06, 2020 at 04:52:24PM +0800, kernel test robot wrote: > > > > >> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: > > >> sparse: incorrect type in assignment (different base types) @@ > > >> expected

Re: [PATCH] crypto: sun4i-ss - Fix SHA1 hash on A33-variant with BE CPU

2020-09-07 Thread Corentin Labbe
On Mon, Sep 07, 2020 at 04:24:00PM +1000, Herbert Xu wrote: > On Sun, Sep 06, 2020 at 04:52:24PM +0800, kernel test robot wrote: > > > > >> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: > > >> sparse: incorrect type in assignment (different base types) @@ > > >> expected

Re: [linux-sunxi] Re: [PATCH v6 18/18] crypto: sun8i-ce: fix some style issue

2020-09-07 Thread Corentin Labbe
On Fri, Sep 04, 2020 at 12:37:19PM -0700, Joe Perches wrote: > On Fri, 2020-09-04 at 11:10 +0000, Corentin Labbe wrote: > > This patch fix a double empty line issue reported by checkpatch. > > While at it, since now the maximum line length is now 100, reorder some > > wrappe

[PATCH v6 15/18] crypto: sun8i-ce: Add support for the TRNG

2020-09-04 Thread Corentin Labbe
-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 ++ drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 18 +++ .../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 127 ++ drivers/crypto/allwinner/sun8i-ce

[PATCH v6 02/18] crypto: sun8i-ss: Add support for the PRNG

2020-09-04 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss

[PATCH v6 03/18] crypto: sun8i-ss: support hash algorithms

2020-09-04 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v6 04/18] crypto: sun8i-ss: fix a trivial typo

2020-09-04 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 377ea7acb54d

[PATCH v6 05/18] crypto: sun8i-ss: Add more comment on some structures

2020-09-04 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index

[PATCH v6 06/18] crypto: sun8i-ss: better debug printing

2020-09-04 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner

[PATCH v6 17/18] crypto: sun8i-ss: fix comparison of integer expressions of different signedness

2020-09-04 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v6 10/18] crypto: sun8i-ce: handle different error registers

2020-09-04 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions

[PATCH v6 14/18] crypto: sun8i-ce: Add support for the PRNG

2020-09-04 Thread Corentin Labbe
This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce

[PATCH v6 12/18] crypto: sun8i-ce: support hash algorithms

2020-09-04 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i

[PATCH v6 18/18] crypto: sun8i-ce: fix some style issue

2020-09-04 Thread Corentin Labbe
This patch fix a double empty line issue reported by checkpatch. While at it, since now the maximum line length is now 100, reorder some wrapped line. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 34 ++- .../crypto/allwinner/sun8i-ce/sun8i-ce

[PATCH v6 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-09-04 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i

[PATCH] MAINTAINERS: media: cec: fix files location

2020-09-04 Thread Corentin Labbe
Files have moved, fixes their path. Fixes: 4be5e8648b0c ("media: move CEC platform drivers to a separate directory") Signed-off-by: Corentin Labbe --- MAINTAINERS | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 11

[PATCH v6 13/18] crypto: sun8i-ce: Add stat_bytes debugfs

2020-09-04 Thread Corentin Labbe
This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h

[PATCH v6 16/18] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-09-04 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v6 08/18] crypto: sun8i-ce: move iv data to request context

2020-09-04 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers

[PATCH v6 07/18] crypto: sun8i-ce: handle endianness of t_common_ctl

2020-09-04 Thread Corentin Labbe
t;) Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 138759dc8190..08ed1ca12

[PATCH v6 09/18] crypto: sun8i-ce: split into prepare/run/unprepare

2020-09-04 Thread Corentin Labbe
This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i

[PATCH v6 01/18] crypto: sun8i-ss: Add SS_START define

2020-09-04 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v6 00/18] crypto: allwinner: add xRNG and hashes

2020-09-04 Thread Corentin Labbe
since v3: - rebased on latest next - removed useless cpu_to_le32() in sun8i-ss - added 2 last patches - add handle endianness of t_common_ctl patch Change since v4: - added a style issue patch Changes since v5: - handle failure pattern of pm_runtime_get_sync - Add missing linux/dma-mapping.h Corentin

[PATCH v2] dt-bindings: crypto: Specify that allwinner,sun8i-a33-crypto needs reset

2020-09-03 Thread Corentin Labbe
When adding allwinner,sun8i-a33-crypto, I forgot to add that it needs reset. Furthermore, there are no need to use items to list only one compatible in compatible list. Fixes: f81547ba7a98 ("dt-bindings: crypto: add new compatible for A33 SS") Signed-off-by: Corentin Labbe --- Chang

[PATCH] dt-bindings: crypto: Specify that allwinner,sun8i-a33-crypto needs reset

2020-09-02 Thread Corentin Labbe
When adding allwinner,sun8i-a33-crypto, I forgot to add that it needs reset. Furthermore, there are no need to use items to list only one compatible in compatible list. Fixes: f81547ba7a98 ("dt-bindings: crypto: add new compatible for A33 SS") Signed-off-by: Corentin Labbe --- ..

Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s

2020-09-02 Thread Corentin Labbe
On Tue, Sep 01, 2020 at 01:40:15PM +0200, Maxime Ripard wrote: > On Tue, Sep 01, 2020 at 12:57:19PM +0200, Corentin Labbe wrote: > > On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote: > > > On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote: > > >

Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s

2020-09-01 Thread Corentin Labbe
On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote: > On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote: > > Like A33 "sun4i-ss" has a difference, it give SHA1 digest > > directly in BE. So add new compatible. > > > > Tested-by: Martin Cerveny > > The Tested-by tag is

Re: [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS

2020-08-31 Thread Corentin Labbe
er/sun4i-ss/sun4i-ss-core.c | 7 +++ > 1 file changed, 7 insertions(+) > Your commit message is wrong, "sun4i-ss" has no difference, but V3S yes. Your other patch has the same problem. Otherwise you could add: Acked-by: Corentin Labbe Regards

Re: [PATCH] ARM: dts: sun8i: v3s: Enable crypto engine

2020-08-31 Thread Corentin Labbe
ata = _a33_variant > }, > + { .compatible = "allwinner,sun8i-v3s-crypto", > + .data = _v3s_variant > + }, > {} > }; > MODULE_DEVICE_TABLE(of, a20ss_crypto_of_match_table); > -- > 2.17.1 > You should split at least drivers/crypto and the dts part, as drivers/crypto patchs are merged via the cryptodev tree and dts/doc will be merged via the sunxi tree. And ideally split patch in 3, the doc, the dts and the crypto. See how I added the same for A33 in: https://lore.kernel.org/linux-arm-kernel/20191120152833.20443-1-clabbe.montj...@gmail.com/ Anyway the content is good. Acked-by: Corentin Labbe Thanks

Re: [PATCH v2 1/4] crypto: inside-secure - use kfree_sensitive()

2020-08-27 Thread Corentin Labbe
On Thu, Aug 27, 2020 at 09:43:59AM +0300, Denis Efremov wrote: > Use kfree_sensitive() instead of open-coding it. > > Signed-off-by: Denis Efremov > --- > drivers/crypto/inside-secure/safexcel_hash.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git

Re: [PATCH v2 2/4] crypto: amlogic - use kfree_sensitive()

2020-08-27 Thread Corentin Labbe
r the whole serie you didnt use getmaintainers, so nor sunxi and amlogic maintainers where CC. And my baylibre address which is the address for this driver. Anyway, for this case the patch is trivial enough. Tested-by: Corentin Labbe Acked-by: Corentin Labbe Regards

Re: [PATCH v2 3/4] crypto: sun8i-ce - use kfree_sensitive()

2020-08-27 Thread Corentin Labbe
tions(-) > Acked-by: Corentin Labbe Tested-by: Corentin Labbe Thanks

Re: [PATCH v2 4/4] crypto: sun8i-ss - use kfree_sensitive()

2020-08-27 Thread Corentin Labbe
tions(-) > Acked-by: Corentin Labbe Tested-by: Corentin Labbe Thanks

Re: [PATCH] crypto: sun8i-ss - remove redundant memzero_explicit()

2020-08-27 Thread Corentin Labbe
On Thu, Aug 27, 2020 at 10:40:23AM +0300, Denis Efremov wrote: > Remove redundant memzero_explicit() in sun8i_ss_cipher() before calling > kfree_sensitive(). kfree_sensitive() will zero the memory with > memzero_explicit(). > > Signed-off-by: Denis Efremov > --- >

Re: [PATCH] crypto: amlogic - use kfree_sensitive()

2020-08-26 Thread Corentin Labbe
On Wed, Aug 26, 2020 at 04:16:57PM +0300, Denis Efremov wrote: > Use kfree_sensitive() instead of open-coding it. > > Signed-off-by: Denis Efremov > --- > drivers/crypto/amlogic/amlogic-gxl-cipher.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git

[PATCH v5 13/18] crypto: sun8i-ce: Add stat_bytes debugfs

2020-08-21 Thread Corentin Labbe
This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h

[PATCH v5 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-08-21 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i

[PATCH v5 03/18] crypto: sun8i-ss: support hash algorithms

2020-08-21 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v5 16/18] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-08-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v5 15/18] crypto: sun8i-ce: Add support for the TRNG

2020-08-21 Thread Corentin Labbe
-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 ++ drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 18 +++ .../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 124 ++ drivers/crypto/allwinner/sun8i-ce

[PATCH v5 12/18] crypto: sun8i-ce: support hash algorithms

2020-08-21 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i

[PATCH v5 18/18] crypto: sun8i-ce: fix some style issue

2020-08-21 Thread Corentin Labbe
This patch fix a double empty line issue reported by checkpatch. While at it, since now the maximum line length is now 100, reorder some wrapped line. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 34 ++- .../crypto/allwinner/sun8i-ce/sun8i-ce

[PATCH v5 17/18] crypto: sun8i-ss: fix comparison of integer expressions of different signedness

2020-08-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v5 14/18] crypto: sun8i-ce: Add support for the PRNG

2020-08-21 Thread Corentin Labbe
This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce

[PATCH v5 10/18] crypto: sun8i-ce: handle different error registers

2020-08-21 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions

[PATCH v5 09/18] crypto: sun8i-ce: split into prepare/run/unprepare

2020-08-21 Thread Corentin Labbe
This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i

[PATCH v5 06/18] crypto: sun8i-ss: better debug printing

2020-08-21 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner

[PATCH v5 08/18] crypto: sun8i-ce: move iv data to request context

2020-08-21 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers

[PATCH v5 07/18] crypto: sun8i-ce: handle endianness of t_common_ctl

2020-08-21 Thread Corentin Labbe
t;) Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 138759dc8190..08ed1ca12

[PATCH v5 05/18] crypto: sun8i-ss: Add more comment on some structures

2020-08-21 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index

[PATCH v5 04/18] crypto: sun8i-ss: fix a trivial typo

2020-08-21 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 377ea7acb54d

[PATCH v5 02/18] crypto: sun8i-ss: Add support for the PRNG

2020-08-21 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss

[PATCH v5 00/18] crypto: allwinner: add xRNG and hashes

2020-08-21 Thread Corentin Labbe
since v3: - rebased on latest next - removed useless cpu_to_le32() in sun8i-ss - added 2 last patches - add handle endianness of t_common_ctl patch Change since v4: - added a style issue patch Corentin Labbe (18): crypto: sun8i-ss: Add SS_START define crypto: sun8i-ss: Add support for the PRNG

[PATCH v5 01/18] crypto: sun8i-ss: Add SS_START define

2020-08-21 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] drivers/hwmon/adm1029.c: use simple i2c probe

2020-08-17 Thread Corentin Labbe
9_probe, > .id_table = adm1029_id, > .detect = adm1029_detect, > .address_list = normal_i2c, > -- > 2.25.4 > Hello Tested-by: Corentin Labbe Thanks

Re: [PATCH] drivers/hwmon/adm1029.c: use simple i2c probe

2020-08-14 Thread Corentin Labbe
9_probe, > .id_table = adm1029_id, > .detect = adm1029_detect, > .address_list = normal_i2c, > -- > 2.25.4 > Hello Acked-by: Corentin LABBE But please give me a few day to test it.

Re: [PATCH] crypto: sun8i-ce - Fix writel byte-order on big-endian

2020-08-01 Thread Corentin Labbe
On Tue, Jul 28, 2020 at 04:00:40PM +1000, Herbert Xu wrote: > On Tue, Jul 28, 2020 at 01:10:13PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > master > > head: 92ed301919932f13b9172e525674157e983d > > commit:

[PATCH v4 07/17] crypto: sun8i-ce: handle endianness of t_common_ctl

2020-07-21 Thread Corentin Labbe
t;) Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 0bf8f29c5ae8..0b47a51e1

[PATCH v4 02/17] crypto: sun8i-ss: Add support for the PRNG

2020-07-21 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss

[PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context

2020-07-21 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers

[PATCH v4 06/17] crypto: sun8i-ss: better debug printing

2020-07-21 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner

[PATCH v4 10/17] crypto: sun8i-ce: handle different error registers

2020-07-21 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions

[PATCH v4 00/17] crypto: allwinner: add xRNG and hashes

2020-07-21 Thread Corentin Labbe
since v3: - rebased on latest next - removed useless cpu_to_le32() in sun8i-ss - added 2 last patches - add handle endianness of t_common_ctl patch Corentin Labbe (17): crypto: sun8i-ss: Add SS_START define crypto: sun8i-ss: Add support for the PRNG crypto: sun8i-ss: support hash algorithms

[PATCH v4 04/17] crypto: sun8i-ss: fix a trivial typo

2020-07-21 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 377ea7acb54d

[PATCH v4 09/17] crypto: sun8i-ce: split into prepare/run/unprepare

2020-07-21 Thread Corentin Labbe
This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i

[PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-07-21 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i

[PATCH v4 15/17] crypto: sun8i-ce: Add support for the TRNG

2020-07-21 Thread Corentin Labbe
-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 ++ drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 18 +++ .../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 124 ++ drivers/crypto/allwinner/sun8i-ce

[PATCH v4 14/17] crypto: sun8i-ce: Add support for the PRNG

2020-07-21 Thread Corentin Labbe
This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce

[PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-07-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v4 17/17] crypto: sun8i-ss: fix comparison of integer expressions of different signedness

2020-07-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v4 13/17] crypto: sun8i-ce: Add stat_bytes debugfs

2020-07-21 Thread Corentin Labbe
This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h

[PATCH v4 12/17] crypto: sun8i-ce: support hash algorithms

2020-07-21 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i

[PATCH v4 03/17] crypto: sun8i-ss: support hash algorithms

2020-07-21 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v4 05/17] crypto: sun8i-ss: Add more comment on some structures

2020-07-21 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index

[PATCH v4 01/17] crypto: sun8i-ss: Add SS_START define

2020-07-21 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH -next] crypto: allwinner - Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-20 Thread Corentin Labbe
allwinner/sun8i-ss/sun8i-ss-core.c | 15 ++- > 2 files changed, 4 insertions(+), 26 deletions(-) > Acked-by: Corentin Labbe Tested-by: Corentin Labbe Thanks

Re: [PATCH v3 00/16] Allwinner A100 Initial support

2020-07-08 Thread Corentin Labbe
On Wed, Jul 08, 2020 at 03:19:26PM +0800, Frank Lee wrote: > This patch set adds initial support for allwinner a100 soc, > which is a 64-bit tablet chip. > Hello Does a product already exists with it ? I couldnt found any. Does a datasheet is availlable ? Regards

[PATCH] sparc: sparc64_defconfig: add necessary configs for qemu

2020-07-02 Thread Corentin Labbe
The sparc64 qemu machines uses pcnet32 network hardware by default, so for simple boot testing using qemu, having PCNET32 is useful. Same for its storage which is a PATA_CMD64. Signed-off-by: Corentin Labbe --- arch/sparc/configs/sparc64_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v3 03/14] crypto: sun8i-ss: support hash algorithms

2020-06-21 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v3 02/14] crypto: sun8i-ss: Add support for the PRNG

2020-06-21 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss

[PATCH v3 11/14] crypto: sun8i-ce: support hash algorithms

2020-06-21 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i

[PATCH v3 04/14] crypto: sun8i-ss: fix a trivial typo

2020-06-21 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 350a611b0b9e

[PATCH v3 06/14] crypto: sun8i-ss: better debug printing

2020-06-21 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner

[PATCH v3 10/14] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-06-21 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i

[PATCH v3 09/14] crypto: sun8i-ce: handle different error registers

2020-06-21 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions

[PATCH v3 00/14] crypto: allwinner: add xRNG and hashes

2020-06-21 Thread Corentin Labbe
since v2: - cleaned unused variables from sun8i-ce-prng - added some missing memzero_explicit Corentin Labbe (14): crypto: sun8i-ss: Add SS_START define crypto: sun8i-ss: Add support for the PRNG crypto: sun8i-ss: support hash algorithms crypto: sun8i-ss: fix a trivial typo crypto: sun8i-ss

[PATCH v3 07/14] crypto: sun8i-ce: move iv data to request context

2020-06-21 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers

[PATCH v3 05/14] crypto: sun8i-ss: Add more comment on some structures

2020-06-21 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index

[PATCH v3 01/14] crypto: sun8i-ss: Add SS_START define

2020-06-21 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

<    1   2   3   4   5   6   7   8   9   10   >