[PATCH v2 25/27] staging: ccree: remove unneeded includes

2018-01-03 Thread Gilad Ben-Yossef
Remove include files not needed for compilation. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_aead.c| 7 --- drivers/staging/ccree/cc_buffer_mgr.c | 6 -- drivers/staging/ccree/cc_cipher.c | 4 drivers/staging/ccree/cc_driver.c | 31

[PATCH v2 26/27] staging: ccree: update TODO

2018-01-03 Thread Gilad Ben-Yossef
Update TODO to reflect work done Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO index 6d8702b..b8e163d 100644 --- a/drivers/staging/ccree/TODO +++ b

[PATCH v2 27/27] staging: ccree: add missing include

2018-01-03 Thread Gilad Ben-Yossef
Add the missing include of include file with function declarations. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/ccree/cc_debugfs.c b/drivers/staging/ccree/cc_debugfs.c index 363a0ef..e07cbb1 100644

[PATCH v2 21/27] staging: ccree: fold common code into service func

2018-01-03 Thread Gilad Ben-Yossef
Fold common code in hash call into service functions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 339 ++- 1 file changed, 116 insertions(+), 223 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree

[PATCH v2 23/27] stating: ccree: fix allocation of void sized buf

2018-01-03 Thread Gilad Ben-Yossef
We were allocating buffers using sizeof(*struct->field) where field was type void. Fix it by having a local variable with the real type. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_ivgen.c| 9 - drivers/staging/ccree/ssi_sram_mgr.c

[PATCH v2 22/27] staging: ccree: put pointer next to var name

2018-01-03 Thread Gilad Ben-Yossef
Put pointer next to var name as per coding style. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 01f4756

[PATCH v2 13/27] staging: ccree: check DMA pool buf !NULL before free

2018-01-03 Thread Gilad Ben-Yossef
If we ran out of DMA pool buffers, we get into the unmap code path with a NULL before. Deal with this by checking the virtual mapping is not NULL. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 11/27] stating: ccree: revert "staging: ccree: fix leak of import() after init()"

2018-01-03 Thread Gilad Ben-Yossef
me at the time. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index ffcd1f0..e05c87d 100644 -

[PATCH v2 08/27] staging: ccree: remove unused leftover field

2018-01-03 Thread Gilad Ben-Yossef
Remove the unused monitor_desc field. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index ac6846f..18e2e1d 100644 --- a/drivers

[PATCH v2 07/27] staging: ccree: tag debugfs init/exit func properly

2018-01-03 Thread Gilad Ben-Yossef
The debugfs global init and exit functions were missing __init and __exit tags, potentially wasting memory. Fix it by properly tagging them. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 02/27] staging: ccree: fold hash defs into queue defs

2018-01-03 Thread Gilad Ben-Yossef
Fold the two remaining enum in hash defs into the queue defs that are using them and delete the hash defs include file. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 13 + drivers/staging/ccree/hash_defs.h| 23 --- drivers

[PATCH v2 00/27] staging: ccree: fixes and cleanups

2018-01-03 Thread Gilad Ben-Yossef
know about that keeps it from moving out of staging to the best of my understanding and would like to ask for a review before moving out of staging. Thanks and happy new year ;-) Signed-off-by: Gilad Ben-Yossef Changes from v1: - Fixed wrong use of CPP style comments in SPDX include file heade

Re: [PATCH] staging: ccree: mark debug_regs[] as static

2018-01-03 Thread Gilad Ben-Yossef
ic struct debugfs_reg32 debug_regs[] = { > CC_DEBUG_REG(HOST_SIGNATURE), > CC_DEBUG_REG(HOST_IRR), > CC_DEBUG_REG(HOST_POWER_DOWN_EN), > -- > 2.9.0 > Thank you Arnd. I ran into this issue myself via a sparse check (I did not have s3cmci compiled in) and was sur

Re: [PATCH 01/26] staging: ccree: SPDXify driver

2018-01-01 Thread Gilad Ben-Yossef
On Mon, Jan 1, 2018 at 3:53 PM, Philippe Ombredanne wrote: > Gilad, > > On Mon, Jan 1, 2018 at 1:06 PM, Gilad Ben-Yossef wrote: >> Replace verbatim GPL v2 copy with SPDX tag. >> >> Signed-off-by: Gilad Ben-Yossef > > > >> --- a/drivers/staging/ccre

[PATCH 02/26] staging: ccree: fold hash defs into queue defs

2018-01-01 Thread Gilad Ben-Yossef
Fold the two remaining enum in hash defs into the queue defs that are using them and delete the hash defs include file. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 13 + drivers/staging/ccree/hash_defs.h| 23 --- drivers

[PATCH 09/26] staging: ccree: breakup send_request

2018-01-01 Thread Gilad Ben-Yossef
The send_request() function was doing too much. Break it up for better readability and as basis for next patch in series Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 6 +- drivers/staging/ccree/ssi_cipher.c | 3 +- drivers/staging/ccree/ssi_hash.c

[PATCH 05/26] staging: ccree: pick alloc mem flags based on req flags

2018-01-01 Thread Gilad Ben-Yossef
The ccree driver was allocating memory using GFP_KERNEL flag always, ignoring the flags set in the crypto request. Fix it by choosing gfp flags based on crypto request flags. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 19 +++-- drivers/staging/ccree

[PATCH 04/26] staging: ccree: remove GFP_DMA flag from mem allocs

2018-01-01 Thread Gilad Ben-Yossef
Remove bogus GFP_DMA flag from memory allocations. ccree driver does not operate over an ISA or similar limited bus. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c | 15 ++- 2 files changed, 7 insertions(+), 10

[PATCH 06/26] staging: ccree: copy larval digest from RAM

2018-01-01 Thread Gilad Ben-Yossef
The ccree driver was using a DMA operation to copy larval digest from the ccree SRAM to RAM. Replace it with a simple memcpy. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 + drivers/staging/ccree/ssi_hash.c | 121 - drivers

[PATCH 11/26] stating: ccree: revert "staging: ccree: fix leak of import() after init()"

2018-01-01 Thread Gilad Ben-Yossef
me at the time. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index cc11344..9d71b33 100644 -

[PATCH 13/26] staging: ccree: check DMA pool buf !NULL before free

2018-01-01 Thread Gilad Ben-Yossef
If we ran out of DMA pool buffers, we get into the unmap code path with a NULL before. Deal with this by checking the virtual mapping is not NULL. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 16/26] staging: ccree: remove unused field

2018-01-01 Thread Gilad Ben-Yossef
Remove unused struct field. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 9d71b33..c64b4b5 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b

[PATCH 17/26] staging: ccree: use array for double buffer

2018-01-01 Thread Gilad Ben-Yossef
The ccree hash code is using a double buffer to hold data for processing but manages the buffers and their associated data count in two separate fields and uses a predicate to chose which to use. Move to using a proper 2 members array for a much cleaner code. Signed-off-by: Gilad Ben-Yossef

[PATCH 14/26] staging: ccree: handle end of sg list gracefully

2018-01-01 Thread Gilad Ben-Yossef
If we are asked for number of entries of an offset bigger than the sg list we should not crash. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree

[PATCH 25/26] staging: ccree: remove unneeded includes

2018-01-01 Thread Gilad Ben-Yossef
Remove include files not needed for compilation. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_aead.c| 7 --- drivers/staging/ccree/cc_buffer_mgr.c | 6 -- drivers/staging/ccree/cc_cipher.c | 4 drivers/staging/ccree/cc_driver.c | 31

[PATCH 26/26] staging: ccree: update TODO

2018-01-01 Thread Gilad Ben-Yossef
Update TODO to reflect work done Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO index 6d8702b..b8e163d 100644 --- a/drivers/staging/ccree/TODO +++ b

[PATCH 21/26] staging: ccree: fold common code into service func

2018-01-01 Thread Gilad Ben-Yossef
Fold common code in hash call into service functions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 339 ++- 1 file changed, 116 insertions(+), 223 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree

[PATCH 20/26] staging: ccree: fix indentation of func params

2018-01-01 Thread Gilad Ben-Yossef
Fix indentation of some function params in hash code for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 46 +--- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b

[PATCH 22/26] staging: ccree: put pointer next to var name

2018-01-01 Thread Gilad Ben-Yossef
Put pointer next to var name as per coding style. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index b71200a

[PATCH 19/26] staging: ccree: do not map bufs in ahash_init

2018-01-01 Thread Gilad Ben-Yossef
API op. This also properly deals with hash_import() not knowing if hash_init was called or not as it now no longer matters. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 192 +-- 1 file changed, 103 insertions(+), 89 deletions(-) diff

[PATCH 23/26] stating: ccree: fix allocation of void sized buf

2018-01-01 Thread Gilad Ben-Yossef
We were allocating buffers using sizeof(*struct->field) where field was type void. Fix it by having a local variable with the real type. Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 3 ++- drivers/staging/ccree/ssi_ivgen.c

[PATCH 18/26] staging: ccree: allocate hash bufs inside req ctx

2018-01-01 Thread Gilad Ben-Yossef
Move to allocating the buffers needed for requests as part of the request structure instead of malloc'ing each one on it's own, making for simpler (and more efficient) code. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_h

[PATCH 15/26] staging: ccree: use Makefile to include PM code

2018-01-01 Thread Gilad Ben-Yossef
Replace ugly ifdefs with some inline macros and Makefile magic for optionally including power management related code for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Makefile | 3 ++- drivers/staging/ccree/ssi_pm.c | 9 +--- drivers

[PATCH 12/26] staging: ccree: failing the suspend is not an error

2018-01-01 Thread Gilad Ben-Yossef
PM suspend returning a none zero value is not an error. It simply indicates a suspend is not advised right now so don't treat it as an error. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --

[PATCH 10/26] staging: ccree: add backlog processing

2018-01-01 Thread Gilad Ben-Yossef
Crypto API tfm providers are required to provide a backlog service, if so indicated, that queues up requests in the case of the provider being busy and processing them later. The ccree driver did not provide this facility. Add it now. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree

[PATCH 07/26] staging: ccree: tag debugfs init/exit func properly

2018-01-01 Thread Gilad Ben-Yossef
The debugfs global init and exit functions were missing __init and __exit tags, potentially wasting memory. Fix it by properly tagging them. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 08/26] staging: ccree: remove unused leftover field

2018-01-01 Thread Gilad Ben-Yossef
Remove the unused monitor_desc field. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index bf66286..5812ffd 100644 --- a/drivers

[PATCH 01/26] staging: ccree: SPDXify driver

2018-01-01 Thread Gilad Ben-Yossef
Replace verbatim GPL v2 copy with SPDX tag. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h| 17 ++--- drivers/staging/ccree/cc_debugfs.c | 17 ++--- drivers/staging/ccree/cc_debugfs.h | 17 ++--- drivers/staging

[PATCH 03/26] staging: ccree: fold reg common defines into driver

2018-01-01 Thread Gilad Ben-Yossef
Fold the 2 macro defined in dx_reg_common.h into the file they are used in and delete the file. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h | 4 ++-- drivers/staging/ccree/dx_reg_common.h | 13 - drivers/staging/ccree/ssi_driver.h| 5 +++-- 3

[PATCH 00/26] staging: ccree: fixes and cleanups

2018-01-01 Thread Gilad Ben-Yossef
of changes, I've handled anything that I know about that keeps it from moving out of staging to the best of my understanding and would like to ask for a review before moving out of staging. Thanks and happy new year ;-) Signed-off-by: Gilad Ben-Yossef Gilad Ben-Yossef (26): staging:

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Wed, Dec 27, 2017 at 5:35 AM, Herbert Xu wrote: > On Tue, Dec 26, 2017 at 02:21:53PM +0200, Gilad Ben-Yossef wrote: >> >> See how SKCIPHER_REQUEST_ON_STACK is being used with an asymmetric skcipher >> in drivers/md/dm-integrity.c > > That's just broken. SKCIPHE

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Tue, Dec 26, 2017 at 12:40 PM, Herbert Xu wrote: > On Tue, Dec 26, 2017 at 11:06:02AM +0200, Gilad Ben-Yossef wrote: >> >> The hash state needs to be DMAed in and out of the hardware on each operation >> and I have no guarantee that the ahash request is allocated fr

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Tue, Dec 26, 2017 at 5:07 AM, Herbert Xu wrote: > On Mon, Dec 25, 2017 at 10:07:54AM +0200, Gilad Ben-Yossef wrote: >> Hi there, >> >> I have ran into something I am unsure about regarding the ccree driver >> implementation and would love to get some guidance: >

[QUESTION] hash import and request initialization

2017-12-25 Thread Gilad Ben-Yossef
here or is the B scenario simply not legal? Many thanks and Happy Xmas if this applies to you, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru

[PATCH RESEND] checkpatch: add *_ON_STACK to declaration_macros

2017-12-20 Thread Gilad Ben-Yossef
Add the crypto API *_ON_STACK to $declaration_macros. Resolves the following false warning: WARNING: Missing a blank line after declarations + int err; + SHASH_DESC_ON_STACK(desc, ctx_p->shash_tfm); Signed-off-by: Gilad Ben-Yossef --- scri

[PATCH] staging: ccree: use size_t consistently

2017-12-19 Thread Gilad Ben-Yossef
Fix declaration, implementation and wrapper function to use the same size_t type we actually define the parameter to be. Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params") Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 2 +- drive

[PATCH v2 3/6] crypto: tcrypt: allow setting num of bufs

2017-12-17 Thread Gilad Ben-Yossef
parameter that allows setting the number of multiple buffers/requests used, leaving the default at 8. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index

[PATCH v2 4/6] crypto: tcrypt: add multi buf ahash jiffies test

2017-12-17 Thread Gilad Ben-Yossef
The multi buffer concurrent requests ahash speed test only supported the cycles mode. Add support for the so called jiffies mode that test performance of bytes/sec. We only add support for digest mode at the moment. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 112

[PATCH v2 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-17 Thread Gilad Ben-Yossef
The performance of some aead tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async aead concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c

[PATCH v2 0/6] crypto: tcrypt: fix and add multi buf speed tests

2017-12-17 Thread Gilad Ben-Yossef
none multi buffer speed test code better, but given that tcrypt as a whole is a developer testing harness rather than production code, the value of this activity seems questionable. Do let me know if you disagree. Signed-off-by: Gilad Ben-Yossef Changes from v1: - re-spin on top of latest

[PATCH v2 5/6] crypto: tcrypt: add multibuf skcipher speed test

2017-12-17 Thread Gilad Ben-Yossef
The performance of some skcipher tfm providers is affected by the amount of parallelism possible with the processing. Introduce an async skcipher concurrent multiple buffer processing speed test to be able to test performance of such tfm providers. Signed-off-by: Gilad Ben-Yossef --- crypto

[PATCH v2 2/6] crypto: tcrypt: fix AEAD decryption speed test

2017-12-17 Thread Gilad Ben-Yossef
speed tests. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index a0c4e0d..69c8e63 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -329,10 +329,30

[PATCH v2 1/6] crypto: tcrypt: use multi buf for ahash mb test

2017-12-17 Thread Gilad Ben-Yossef
life scenario with regard to data cache and TLB behaviours etc. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 28b4882..a0c4e0d 100644 --- a/crypto/tcrypt.c +++ b/crypto

Re: [PATCH 04/10] staging: ccree: staging: ccree: replace sysfs by debugfs interface

2017-12-16 Thread Gilad Ben-Yossef
On Thu, Dec 14, 2017 at 4:30 PM, Philippe Ombredanne wrote: > Gilad, > > On Thu, Dec 14, 2017 at 3:02 PM, Gilad Ben-Yossef wrote: >> The ccree driver has had a none standard sysfs interface for debugging. >> Replace it with a proper debugfs interface. >> >>

[PATCH 01/10] staging: ccree: drop ifdef CONFIG_OF in code

2017-12-14 Thread Gilad Ben-Yossef
As we already depend on CONFIG_OF via Kconfig no need to support conditional build without it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c

[PATCH 02/10] staging: ccree: clean up PM registration

2017-12-14 Thread Gilad Ben-Yossef
Clean up power management registration. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 16 +++- drivers/staging/ccree/ssi_pm.c | 4 drivers/staging/ccree/ssi_pm.h | 3 +++ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a

[PATCH 03/10] staging: ccree: add explicit module init/exit func

2017-12-14 Thread Gilad Ben-Yossef
We need to do a module global scope init/exit operation to support the debugfs interface we are about to introduce in the next patch, so wean the module of the boiler plate saving macro as it will no longer be sufficient. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c

[PATCH 05/10] staging: ccree: remove CC_IRQ_DELAY dead code

2017-12-14 Thread Gilad Ben-Yossef
Remove dead code from older version which is not supported in current hardware. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_config.h | 1 - drivers/staging/ccree/ssi_driver.c | 11 --- 2 files changed, 12 deletions(-) diff --git a/drivers/staging/ccree/ssi_config.h

[PATCH 04/10] staging: ccree: staging: ccree: replace sysfs by debugfs interface

2017-12-14 Thread Gilad Ben-Yossef
The ccree driver has had a none standard sysfs interface for debugging. Replace it with a proper debugfs interface. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Makefile | 3 +- drivers/staging/ccree/cc_debugfs.c | 114 +++ drivers/staging/ccree

[PATCH 06/10] staging: ccree: remove useless debug code

2017-12-14 Thread Gilad Ben-Yossef
Remove a bunch of useless debug code ifdef'ed out Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 45 - drivers/staging/ccree/ssi_config.h | 3 --- drivers/staging/ccree/ssi_driver.c | 13 -- drivers/staging/

[PATCH 09/10] staging: ccree: fix fips event irq handling build

2017-12-14 Thread Gilad Ben-Yossef
When moving from internal for kernel FIPS infrastructure the FIPS event irq handling code was left with the old ifdef by mistake. Fix it. Fixes: b7e607bf33a2 ("staging: ccree: move FIPS support to kernel infrastructure") Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --

[PATCH 08/10] staging: ccree: remove ssi_config.h

2017-12-14 Thread Gilad Ben-Yossef
Now that the only thing left in ssi_config is the maximum DMA mask length we get move that to ssi_driver.h and get rid of the file. All of ccree is now runtime configurable or under Kbuild control. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_debugfs.c | 1 - drivers

[PATCH 10/10] staging: ccree: update TODO

2017-12-14 Thread Gilad Ben-Yossef
Update TODO with handling on sysfs -> debugfs transition Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/TODO | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO index f44edcd..6d8702b 100644 --- a/driv

[PATCH 07/10] staging: ccree: turn compile time debug log to params

2017-12-14 Thread Gilad Ben-Yossef
The ccree driver has some support to dump runtime data to kernel log to assist in debugging. The code used to be enabled by a build time flag. Refactor to enable it via module/kernel parameters. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_config.h | 2 -- drivers/staging

[PATCH 00/10] staging: ccree: cleanups & fixes

2017-12-14 Thread Gilad Ben-Yossef
- More cleanups and dead code removal. - Handle TODO item of moving none standard sysfs interface to debugfs - One fix to FIPS event irq handling code Gilad Ben-Yossef (10): staging: ccree: drop ifdef CONFIG_OF in code staging: ccree: clean up PM registration staging: ccree: add explicit

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-13 Thread Gilad Ben-Yossef
On Wed, Dec 13, 2017 at 2:31 PM, Herbert Xu wrote: > On Wed, Dec 13, 2017 at 11:12:10AM +0200, Gilad Ben-Yossef wrote: >> >> I'm sorry if I'm confused but as the cover letter stated, the patch >> set is supposed to >> go on top of the patch entitled

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-13 Thread Gilad Ben-Yossef
Hi Herbert, On Mon, Dec 11, 2017 at 1:35 PM, Herbert Xu wrote: > On Thu, Nov 30, 2017 at 10:09:32AM +0000, Gilad Ben-Yossef wrote: >> The performance of some aead tfm providers is affected by >> the amount of parallelism possible with the processing. >> >> Introdu

[PATCH 02/24] staging: ccree: fix hash naming convention

2017-12-12 Thread Gilad Ben-Yossef
by switching to a simpler, consistent naming convention for the file. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 10 +- drivers/staging/ccree/ssi_driver.c | 8 +- drivers/staging/ccree/ssi_hash.c | 494 ++--- drivers/staging/ccree

[PATCH 03/24] staging: ccree: amend hash func def for readability

2017-12-12 Thread Gilad Ben-Yossef
Func definitions in the hash implementation were did not adhere to coding style. Fix them for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ccree

[PATCH 06/24] staging: ccree: fix func def and decl coding style

2017-12-12 Thread Gilad Ben-Yossef
Fix functions definition and declaration indentation according to coding style guide lines for better code readability Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 5 +- drivers/staging/ccree/ssi_buffer_mgr.c | 144 + drivers

[PATCH 07/24] staging: ccree: simplify expression with local var

2017-12-12 Thread Gilad Ben-Yossef
Simplify expression by using a local variable for better code readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers

[PATCH 10/24] staging: ccree: fix req mgr func def coding style

2017-12-12 Thread Gilad Ben-Yossef
Fix request manager functions definition indentation according to coding style guide lines for better code readability Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 21 + drivers/staging/ccree/ssi_request_mgr.h | 9 - 2 files changed

[PATCH 12/24] staging: ccree: fix cipher naming convention

2017-12-12 Thread Gilad Ben-Yossef
The blkcipher files were using a func naming convention which was inconsistent (ssi vs. cc), included a long prefix (ssi_ablkcipher) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging

[PATCH 15/24] staging: ccree: fix ivgen func def coding style

2017-12-12 Thread Gilad Ben-Yossef
Fix ivgen functions definition indentation according to coding style guide lines for better code readability Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_ivgen.c | 16 +--- drivers/staging/ccree/ssi_ivgen.h | 10 +++--- 2 files changed, 8 insertions(+), 18

[PATCH 14/24] staging: ccree: fix ivgen naming convention

2017-12-12 Thread Gilad Ben-Yossef
The ivgen files were using a func naming convention which was inconsistent (ssi vs. cc), included a long prefix (ssi_ivgen) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree

[PATCH 16/24] staging: ccree: drop unsupported MULTI2 mode code

2017-12-12 Thread Gilad Ben-Yossef
Remove the code support for MULTI2 mode which is not supported by the current hardware. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_crypto_ctx.h| 17 drivers/staging/ccree/cc_hw_queue_defs.h | 2 - drivers/staging/ccree/ssi_cipher.c | 167

[PATCH 17/24] staging: ccree: remove SSI_CC_HAS_ macros

2017-12-12 Thread Gilad Ben-Yossef
Remove macro controlling build of various features. This needs to happen dynamically in registration time. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 33 - drivers/staging/ccree/ssi_buffer_mgr.c | 4 drivers/staging/ccree

[PATCH 20/24] staging: ccree: rename vars/structs/enums from ssi_ to cc_

2017-12-12 Thread Gilad Ben-Yossef
Unify naming convention by renaming all ssi_ vars/structs/enums and variables to cc_* Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 82 +-- drivers/staging/ccree/ssi_aead.h| 14 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 30

[PATCH 22/24] staging: ccree: fix sram mgr naming convention

2017-12-12 Thread Gilad Ben-Yossef
The SRAM manager files were using a naming convention which was inconsistent (ssi vs. cc) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 8 drivers

[PATCH 23/24] staging: ccree: simplify freeing SRAM memory address

2017-12-12 Thread Gilad Ben-Yossef
The code freeing the SRAM memory address was zeroing the address on release although there is nothing secret about it. Simplify the code by simply calling kfree directly. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_sram_mgr.c | 7 +-- 1 file changed, 1 insertion(+), 6

[PATCH 24/24] staging: ccree: fix FIPS mgr naming convention

2017-12-12 Thread Gilad Ben-Yossef
The FIPS manager files were using a naming convention which was inconsistent (ssi vs. cc) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 6 +++--- drivers/staging

[PATCH 19/24] staging: ccree: rename all DX to CC

2017-12-12 Thread Gilad Ben-Yossef
Unify naming convention by renaming all DX macros to CC. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/cc_hw_queue_defs.h | 4 +- drivers/staging/ccree/cc_lli_defs.h | 2 +- drivers/staging/ccree/dx_crys_kernel.h | 314 +++ drivers/staging

[PATCH 21/24] staging: ccree: fix buf mgr naming convention

2017-12-12 Thread Gilad Ben-Yossef
The buffer manager files were using a func naming convention which was inconsistent (ssi vs. cc) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 28

[PATCH 18/24] staging: ccree: rename all SSI to CC

2017-12-12 Thread Gilad Ben-Yossef
Unify naming convention by renaming all SSI macros to CC. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 26 +-- drivers/staging/ccree/ssi_aead.h| 6 +-- drivers/staging/ccree/ssi_buffer_mgr.c | 78 - drivers

[PATCH 13/24] staging: ccree: fix cipher func def coding style

2017-12-12 Thread Gilad Ben-Yossef
Fix cipher functions definition indentation according to coding style guide lines for better code readability Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a

[PATCH 09/24] staging: ccree: fix reg mgr naming convention

2017-12-12 Thread Gilad Ben-Yossef
The request manager files were using a func naming convention which was inconsistent (ssi vs. cc), included a useless prefix (ssi_request_mgr) and often too long. Make the code more readable by switching to a simpler, consistent naming convention. Signed-off-by: Gilad Ben-Yossef --- drivers

[PATCH 11/24] staging: ccree: remove cipher sync blkcipher remains

2017-12-12 Thread Gilad Ben-Yossef
Remove the remains of no longer existing support for running blkcipher is sync mode. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 156 - 1 file changed, 51 insertions(+), 105 deletions(-) diff --git a/drivers/staging/ccree

[PATCH 08/24] staging: ccree: fix func call param indentation

2017-12-12 Thread Gilad Ben-Yossef
Fix function call parameter indentation according to coding style guide lines. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 28 +++- drivers/staging/ccree/ssi_hash.c | 10 -- 2 files changed, 15 insertions(+), 23 deletions

[PATCH 05/24] staging: ccree: shorten parameter name

2017-12-12 Thread Gilad Ben-Yossef
Shorten parameter name for better code readability Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index 75a578e..62d45e9

[PATCH 04/24] staging: ccree: func params should follow func name

2017-12-12 Thread Gilad Ben-Yossef
Fix some call sites with func params not following func name in AEAD code. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c

[PATCH 01/24] staging: ccree: remove ahash wrappers

2017-12-12 Thread Gilad Ben-Yossef
Remove a no longer needed abstraction around ccree hash crypto API internals that used to allow same ops to be used in synchronous and asynchronous fashion. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c | 260 --- 1 file changed, 76

[PATCH 00/24] staging: ccree: cleanups and simplification

2017-12-12 Thread Gilad Ben-Yossef
patch entitled "staging: ccree: Uninitialized return in ssi_ahash_import()" sent to the list. Signed-off-by: Gilad Ben-Yossef Gilad Ben-Yossef (24): staging: ccree: remove ahash wrappers staging: ccree: fix hash naming convention staging: ccree: amend hash func def for readability

Re: [PATCH 01/10] staging: ccree: remove inline qualifiers

2017-12-06 Thread Gilad Ben-Yossef
On Mon, Dec 4, 2017 at 11:36 AM, Dan Carpenter wrote: > On Sun, Dec 03, 2017 at 01:58:12PM +0000, Gilad Ben-Yossef wrote: >> The ccree drivers was marking a lot of big functions in C file as >> static inline for no good reason. Remove the inline qualifier from >> any but the

Re: [PATCH] staging: ccree: ssi_aead: fixed all coding style warnings.

2017-12-06 Thread Gilad Ben-Yossef
s's tree and not Greg's staging-next tree which already contains fixes for many of the issues your patch is addressing. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru

[PATCH 04/10] staging: ccree: fix indentation of var assignment

2017-12-03 Thread Gilad Ben-Yossef
Fix indentation of var assignment split across lines for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index

[PATCH 03/10] staging: ccree: remove more unnecessary parentheses

2017-12-03 Thread Gilad Ben-Yossef
The removal of likely/unlikely unearthed some more unnecessary parentheses. Remove them for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 6 +++--- drivers/staging/ccree/ssi_request_mgr.c | 2

[PATCH 05/10] staging: ccree: remove braces for single statement blocks

2017-12-03 Thread Gilad Ben-Yossef
Remove braces from single statement if clause. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_request_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index e890cb6

[PATCH 10/10] staging: ccree: amend aead func def for readability

2017-12-03 Thread Gilad Ben-Yossef
Func definitions in the aead implementation were did not adhere to coding style. Fix them for better readability. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 141 ++- 1 file changed, 51 insertions(+), 90 deletions(-) diff --git a

[PATCH 06/10] staging: ccree: remove interim DT docs

2017-12-03 Thread Gilad Ben-Yossef
As proper DT bindings doc where submitted and ACKed, remove the interim one. Signed-off-by: Gilad Ben-Yossef --- .../devicetree/bindings/crypto/arm-cryptocell.txt | 27 -- 1 file changed, 27 deletions(-) delete mode 100644 drivers/staging/ccree/Documentation/devicetree

[PATCH 08/10] staging: ccree: NULLify backup_info when unused

2017-12-03 Thread Gilad Ben-Yossef
;) Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 9019615..7b484f1 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drive

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