- 21 8月, 2013 20 次提交
-
-
由 Joel Fernandes 提交于
For AM437x SoC, ARCH_OMAP2 and ARCH_OMAP3 is not enabled in the defconfig. We follow same thing as SHA driver, and add depends on ARCH_OMAP2PLUS so that the config is selectable for AES driver on AM437x SoC builds. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Keeps request_irq exit/error code paths simpler. Suggested-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Use devm_kzalloc instead of kzalloc. With this change, there is no need to call kfree in error/exit paths. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
For cases where offset/length of on any page of the input SG is not aligned by AES_BLOCK_SIZE, we copy all the pages from the input SG list into a contiguous buffer and prepare a single element SG list for this buffer with length as the total bytes to crypt. This is requried for cases such as when an SG list of 16 bytes total size contains 16 pages each containing 1 byte. DMA using the direct buffers of such instances is not possible. For this purpose, we first detect if the unaligned case and accordingly allocate enough number of pages to satisfy the request and prepare SG lists. We then copy data into the buffer, and copy data out of it on completion. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
In cases where requesting for DMA channels fails for some reason, or channel numbers are not provided in DT or platform data, we switch to PIO-only mode also checking if platform provides IRQ numbers and interrupt register offsets in DT and platform data. All dma-only paths are avoided in this mode. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
We initialize the scatter gather walk lists needed for PIO mode and avoid all DMA paths such as mapping/unmapping buffers by checking for the pio_only flag. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
We add an IRQ handler that implements a state-machine for PIO-mode and data structures for walking the scatter-gather list. The IRQ handler is called in succession both when data is available to read or next data can be sent for processing. This process continues till the entire in/out SG lists have been walked. Once the SG-list has been completely walked, the IRQ handler schedules the done_task tasklet. Also add a useful macro that is used through out the IRQ code for a common pattern of calculating how much an SG list has been walked. This improves code readability and avoids checkpatch errors. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Add IRQ information to pdata and helper macros. These are required for PIO-mode support. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Intermdiate buffers were allocated, mapped and used for DMA. These are no longer required as we use the SGs from crypto layer directly in previous commits in the series. Also along with it, remove the logic for copying SGs etc as they are no longer used, and all the associated variables in omap_aes_device. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Earlier functions that did a similar sync are replaced by the dma_sync_sg_* which can operate on entire SG list. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
In early version of this driver, assumptions were made such as DMA layer requires contiguous buffers etc. Due to this, new buffers were allocated, mapped and used for DMA. These assumptions are no longer true and DMAEngine scatter-gather DMA doesn't have such requirements. We simply the DMA operations by directly using the scatter-gather buffers provided by the crypto layer instead of creating our own. Lot of logic that handled DMA'ing only X number of bytes of the total, or as much as fitted into a 3rd party buffer is removed and is no longer required. Also, good performance improvement of atleast ~20% seen with encrypting a buffer size of 8K (1800 ops/sec vs 1400 ops/sec). Improvement will be higher for much larger blocks though such benchmarking is left as an exercise for the reader. Also DMA usage is much more simplified and coherent with rest of the code. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Crypto layer only passes nbytes but number of SG elements is needed for mapping or unmapping SGs at one time using dma_map* API and also needed to pass in for dmaengine prep function. We call function added to scatterwalk for this purpose in omap_aes_handle_queue to populate the values which are used later. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
When DEBUG is enabled, these macros can be used to print variables in integer and hex format, and clearly display which registers, offsets and values are being read/written , including printing the names of the offsets and their values. Using statement expression macros in read path as, Suggested-by: NJoe Perches <joe@perches.com> Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Joel Fernandes 提交于
Crypto layer only passes nbytes to encrypt but in omap-aes driver we need to know number of SG elements to pass to dmaengine slave API. We add function for the same to scatterwalk library. Signed-off-by: NJoel Fernandes <joelf@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
This patch fixes a bug in the nx-aes-gcm implementation. Corrected the code so that the authtag is always verified after decrypting and not just when there is associated data included. Also, corrected the code to retrieve the input authtag from src instead of dst. Reviewed-by: NFionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: NJoy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Alex Porosanu 提交于
This patch adds an option to the Kconfig file for SEC which enables the user to see the debug messages that are printed inside the SEC driver. Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Alex Porosanu 提交于
CAAM driver contains one macro (xstr) used for printing the line location in a file where a memdump is done. This patch replaces the xstr macro with the already existing __stringify macro that performs the same function. Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 John Haxby 提交于
This affects xen pv guests with sufficiently old versions of xen and sufficiently new hardware. On such a system, a guest with a btrfs root won't even boot. Signed-off-by: NJohn Haxby <john.haxby@oracle.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Julia Lawall 提交于
Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Julia Lawall 提交于
Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 14 8月, 2013 5 次提交
-
-
由 Julia Lawall 提交于
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Marcelo Cerri 提交于
The NX driver uses the transformation context to store several fields containing data related to the state of the operations in progress. Since a single tfm can be used by different kernel threads at the same time, we need to protect the data stored into the context. This patch makes use of spin locks to protect the data where a race condition can happen. Reviewed-by: NFionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: NJoy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Andi Kleen 提交于
Tables used from assembler should be marked __visible to let the compiler know. Signed-off-by: NAndi Kleen <ak@linux.intel.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Jingoo Han 提交于
These local symbols are used only in this file. Fix the following sparse warnings: drivers/crypto/amcc/crypto4xx_alg.c:35:6: warning: symbol 'set_dynamic_sa_command_0' was not declared. Should it be static? drivers/crypto/amcc/crypto4xx_alg.c:55:6: warning: symbol 'set_dynamic_sa_command_1' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Jingoo Han 提交于
This local symbol is used only in this file. Fix the following sparse warnings: drivers/crypto/sahara.c:420:6: warning: symbol 'sahara_watchdog' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 09 8月, 2013 10 次提交
-
-
由 Jingoo Han 提交于
'rng_dev' is used only in this file. Fix the following sparse warning: drivers/char/hw_random/picoxcell-rng.c:36:15: warning: symbol 'rng_dev' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Fionnuala Gunter 提交于
This patch fixes a bug that is triggered when cts(cbc(aes)) is used with nx-crypto driver on input larger than 32 bytes. The chaining value from co-processor was not being saved. This value is needed because it is used as the IV by cts(cbc(aes)). Signed-off-by: NFionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
Add support for OMAP4 version of TRNG module that is present on OMAP4, AM33xx and OMAP5 SoCs. The modules have several differences including register offsets, output size, triggering rng and how configuring FROs. To handle these differences, a platform_data structure is defined and contains routine pointers, register offsets. OMAP2 specific routines are prefixed with 'omap2_' and OMAP4 specific routines are prefixed with 'omap4_'. Note: Few Hard coded values are from the TI AM33xx SDK. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
The omap_init_rng() routine in devices.c only needs to be called when there is no device tree present. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
Add Device Tree suport to the omap-rng driver. Currently, only support for OMAP2 and OMAP3 is being added but support for OMAP4 and OMAP5 will be added in a subsequent patch. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
platform_set_drvdata() is called twice in driver probe. Removing the duplicated call. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
Use devm_kzalloc() to make cleanup paths simpler. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
module_platform_driver() makes the code simpler. Using the macro in the driver. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Marcelo Cerri 提交于
The co-processor has several limits regarding the length of scatter/gather lists and the total number of bytes in it. These limits are available in the device tree, as following: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": used for synchronous operations, it is an array of structures that contains information regarding the limits that must be considered for each mode and operation. The most important limits in it are: - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. This patch updates the NX driver to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Reviewed-by: NFionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: NJoy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Marcelo Cerri 提交于
The co-processor receives data to be hashed through scatter/gather lists pointing to physical addresses. When a vmalloc'ed data is given, the driver must calculate the physical address to each page of the data. However the current version of it just calculates the physical address once and keeps incrementing it even when a page boundary is crossed. This patch fixes this behaviour. Reviewed-by: NFionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: NJoy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 01 8月, 2013 5 次提交
-
-
由 Cristian Stoica 提交于
This patch removes redundant execution of the same test suite in cases where alg and driver variables are the same (e.g. when alg_test is called from tcrypt_test) Signed-off-by: NCristian Stoica <cristian.stoica@freescale.com> Reviewed-by: NHoria Geanta <horia.geanta@freescale.com> Reviewed-by: NRuchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Ruchika Gupta 提交于
Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Andreas Robinson 提交于
Additional and optional dependencies not found while building the kernel and modules, can now be declared explicitly. Signed-off-by: NAndreas Robinson <andr345@gmail.com> Acked-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
Use devm_kzalloc() to make cleanup paths simpler. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Lokesh Vutla 提交于
Using devm_request_irq() rather than request_irq(). So removing free_irq() calls from the probe error path and the remove handler. Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-