[PATCH 08/17] crypto: inside-secure - remove unused parameter in invalidate_cache

2017-12-14 Thread Antoine Tenart
From: Ofer Heifetz The SafeXcel context isn't used in the cache invalidation function. This cosmetic patch removes it (as well as from the function prototype in the header file and when the function is called). Signed-off-by: Ofer Heifetz [Antoine: commit

[PATCH 16/17] crypto: inside-secure - EIP97 support

2017-12-14 Thread Antoine Tenart
The Inside Secure SafeXcel driver was firstly designed to support the EIP197 cryptographic engine which is an evolution (with much more feature, better performances) of the EIP97 cryptographic engine. This patch convert the Inside Secure SafeXcel driver to support both engines (EIP97 + EIP197).

[PATCH 06/17] crypto: inside-secure - EBUSY is not an error on async request

2017-12-14 Thread Antoine Tenart
From: Ofer Heifetz When initializing the IVs crypto_ahash_update() is called, which at some point will call crypto_enqueue_request(). This function can return -EBUSY when no resource is available and the request is queued. Since this is a valid case, -EBUSY shouldn't be

[PATCH 12/17] crypto: inside-secure - increase the ring size

2017-12-14 Thread Antoine Tenart
Increase the ring size to handle more requests in parallel, while keeping the batch size (for interrupt coalescing) to its previous value. The ring size and batch size are now unlinked. Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart

[PATCH 09/17] crypto: inside-secure - move request dequeueing into a workqueue

2017-12-14 Thread Antoine Tenart
This patch moves the request dequeueing into a workqueue to improve the coalescing of interrupts when sending requests to the engine; as the engine is capable of having one single interrupt for n requests sent. Using a workqueue allows to send more request at once. Suggested-by: Ofer Heifetz

[PATCH 07/17] crypto: inside-secure - move cipher crypto mode to request context

2017-12-14 Thread Antoine Tenart
From: Ofer Heifetz The cipher direction can be different for requests within the same transformation context. This patch moves the direction flag from the context to the request scope. Signed-off-by: Ofer Heifetz [Antoine: commit message] Signed-off-by:

[PATCH 05/17] crypto: inside-secure - refrain from unneeded invalidations

2017-12-14 Thread Antoine Tenart
From: Ofer Heifetz The check to know if an invalidation is needed (i.e. when the context changes) is done even if the context does not exist yet. This happens when first setting a key for ciphers and/or hmac operations. This commits adds a check in the _setkey functions to

[PATCH 02/17] crypto: inside-secure - fix typo in a comment

2017-12-14 Thread Antoine Tenart
Cosmetic patch fixing one typo in one of the driver's comments. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel_hash.c

[PATCH 00/17] crypto: inside-secure - various improvements

2017-12-14 Thread Antoine Tenart
Hi Herbert, This series depends on the previous one, "crypto: inside-secure - set of fixes"[1]. The series contains various improvements to the Inside Secure SafeXcel driver, which are bundled in a single series to avoid any conflict. - Patches 1-4 are cosmetic fixes (typo, more comments and

[PATCH 15/17] crypto: inside-secure - retry to proceed the request later on fail

2017-12-14 Thread Antoine Tenart
The dequeueing function was putting back a request in the crypto queue on failure (when not enough resources are available) which is not perfect as the request will be handled much later. This patch updates this logic by keeping a reference on the failed request to try proceeding it later when

[PATCH 04/17] crypto: inside-secure - comment the caching function

2017-12-14 Thread Antoine Tenart
Cosmetic patch adding a few comments to the ahash caching function to understand easily what calculations are made in the functions; and how the function is working. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 10 ++

[PATCH 01/17] crypto: inside-secure - remove extra empty line

2017-12-14 Thread Antoine Tenart
Cosmetic patch removing an extra empty line between header inclusions. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel_hash.c

[PATCH 03/17] crypto: inside-secure - remove useless memset

2017-12-14 Thread Antoine Tenart
This patch removes an useless memset in the ahash_export function, as the zeroed buffer will be entirely overridden the next line. Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 1

[PATCH 14/17] crypto: inside-secure - handle more result requests when counter is full

2017-12-14 Thread Antoine Tenart
This patch modifies the result handling logic to continue handling results when the completed requests counter is full and not showing the actual number of requests to handle. Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart ---

[PATCH 10/17] crypto: inside-secure - use threaded IRQs for result handling

2017-12-14 Thread Antoine Tenart
This patch moves the result handling from an IRQ handler to a threaded IRQ handler, to improve the number of complete requests being handled at once. Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart ---

[PATCH 17/17] Documentation/bindings: crypto: document the SafeXcel EIP97 compatible

2017-12-14 Thread Antoine Tenart
This patch adds the SafeXcel EIP97 compatible to the Inside Secure device tree bindings documentation. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 11/17] crypto: inside-secure - dequeue all requests at once

2017-12-14 Thread Antoine Tenart
This patch updates the dequeueing logic to dequeue all requests at once. Since we can have many requests in the queue, the interrupt coalescing is kept so that the ring interrupt fires every EIP197_MAX_BATCH_SZ at most. To allow dequeueing all requests at once while still using reasonable

[PATCH 13/17] crypto: inside-secure - acknowledge the result requests all at once

2017-12-14 Thread Antoine Tenart
This patches moves the result request acknowledgment from a per request process to acknowledging all the result requests handled at once. Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c |

[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

[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

[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

[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

[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 +++

[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 ---

[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

[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 |

[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

[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 --

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

2017-12-14 Thread Philippe Ombredanne
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. > > Signed-off-by: Gilad Ben-Yossef > --- /dev/null > +++