mask if we failed to
set a 32-bit DMA mask, and only if both fail do we fail the driver.
Adjust this so that if either setting fails, we fail the driver - and
thereby end up properly setting both the DMA mask and the coherent
DMA mask in the fallback case.
Signed-off-by: Russell King rmk+ker
it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/e1000e/netdev.c | 18 ++
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git
it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/igb/igb_main.c | 18 ++
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers
it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/igbvf/netdev.c | 18 ++
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers
if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 16 +---
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
b
mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 +--
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe
Provide a helper to set both the DMA and coherent DMA masks to the
same value - this avoids duplicated code in a number of drivers,
sometimes with buggy error handling, and also allows us identify
which drivers do things differently.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 15 +--
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/block/nvme-core.c | 10 --
1 files changed, 4
The code sequence:
dev-coherent_dma_mask = DMA_BIT_MASK(24);
dev-dma_mask = dev-coherent_dma_mask;
bypasses the architectures check on the DMA mask. It can be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.
Signed-off-by: Russell
architectures. So make use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.
Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/mmc/card/queue.c |3 ++-
1 files changed, 2
register_platform_device_full() can setup the DMA mask provided the
appropriate member is set in struct platform_device_info. So lets
make that be the case. This avoids a direct reference to the DMA
masks by this driver.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/dma
the platform_device_register_full()
avoids some of this explicit initialization.
Convert the driver to use platform_device_register_full(), and as it
makes use of coherent DMA, also call dma_set_coherent_mask() to ensure
that the architecture gets to check the mask.
Signed-off-by: Russell King rmk+ker
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/crypto/ixp4xx_crypto.c | 37 +
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 21180d6..8306185 100644
--- a/drivers
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/musb/am35x.c| 50 ++
drivers/usb/musb/da8xx.c| 49 ++---
drivers/usb/musb/davinci.c | 48 ++--
drivers/usb/musb
...@ti.com
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
arch/arm/include/asm/dma-mapping.h |8
arch/arm/mm/init.c | 10 --
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/dma-mapping.h
b/arch/arm/include/asm
architectures. So make use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.
Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/scsi/scsi_lib.c |2 +-
1 files changed, 1 insertions
...@ti.com
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
include/linux/dma-mapping.h |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 27d1421..fd4aee2 100644
--- a/include/linux/dma-mapping.h
assumptions about dma_mask wherever it could
be miss-interpreted.
Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
block/blk-settings.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk
This driver doesn't need to directly access DMA masks if it uses the
platform_device_register_full() API rather than
platform_device_register_simple() - the former function can initialize
the DMA mask appropriately.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/firmware
the DMA mask to a PFN using
the device specific dma_to_pfn() macro. This is the reverse of the
pfn_to_dma() macro which is used to get the DMA address for the device.
This gives us a PFN mask, which we can then check against the PFN
limit of the DMA zone.
Signed-off-by: Russell King rmk+ker
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/ata/pata_ixp4xx_cf.c |5 -
drivers/gpu/drm/exynos/exynos_drm_drv.c |6 +-
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |5 +++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/pata_ixp4xx_cf.c
AMBA Primecell devices always treat streaming and coherent DMA exactly
the same, so there's no point in having the masks separated.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/amba/bus.c |6 +-
drivers/of/platform.c|3 ---
include/linux/amba/bus.h
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/dma/pl330.c |4
1 files changed, 4 insertions(+), 0 deletions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/emulex/benet/be_main.c | 12 ++--
1
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/sfc/efx.c | 12 +---
1 files changed
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/staging/et131x/et131x.c | 17 ++---
1 files
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/intel/e1000/e1000_main.c |9 ++---
1
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/wireless/b43legacy/dma.c |9 +++--
1 files
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/host/bcma-hcd.c |3 +--
1 files changed, 1
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/video/amba-clcd.c |5 +
1 files changed, 5 insertions(+), 0
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/host/ssb-hcd.c |3 +--
1 files changed, 1 insertions
with via dma_set_mask()/
dma_is_supported().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
include/linux/dma-mapping.h | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index ec951f9..27d1421
dma_coerce_coherent_and_mask()
function.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
sound/arm/pxa2xx-pcm.c |9 +++--
sound/soc/atmel/atmel-pcm.c | 11 ---
sound/soc/blackfin/bf5xx-ac97-pcm.c | 11 ---
sound/soc/blackfin/bf5xx-i2s-pcm.c | 10
Add a comment to explain why this driver doesn't call any of the DMA
API dma_set_mask() functions.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/host/ohci-sa.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ohci-sa
Convert this code sequence:
pdev-dev.coherent_dma_mask = DMA_BIT_MASK(64);
pdev-dev.dma_mask = pdev-dev.coherent_dma_mask;
to use dma_coerce_mask_and_coherent() to avoid bypassing the architecture
check on the DMA mask.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
(), avoiding the direct initialization
of this mask.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/dma/dw/platform.c |8 +++-
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index e35d975..453822c 100644
initialization
of this mask.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/media/platform/omap3isp/isp.c |6 +++---
drivers/media/platform/omap3isp/isp.h |3 ---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/omap3isp/isp.c
b/drivers
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/wireless/b43/dma.c |9 +++--
1 files changed, 3
The code sequence:
dev-dma_mask = dev-coherent_dma_mask;
dev-coherent_dma_mask = dma_mask;
bypasses the architectures check on the DMA mask. It can be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.
Signed-off-by: Russell King rmk
.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/nxp/lpc_eth.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c
b/drivers/net/ethernet/nxp/lpc_eth.c
index a061b93..ba3ca18 100644
--- a/drivers/net
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/chipidea/ci_hdrc_imx.c |5 +++--
drivers/usb/dwc3/dwc3-exynos.c |5 +++--
drivers/usb/gadget/lpc32xx_udc.c |4 +++-
drivers/usb/host/ehci-atmel.c |5 +++--
drivers/usb/host/ehci-octeon.c |4 +++-
drivers/usb/host
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/octeon/octeon_mgmt.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c
b/drivers/net/ethernet/octeon/octeon_mgmt.c
index 622aa75..2006a07 100644
--- a/drivers
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/usb/chipidea/ci_hdrc_imx.c |4 +---
drivers/usb/dwc3/dwc3-exynos.c |4 +---
drivers/usb/host/ehci-atmel.c |4 +---
drivers/usb/host/ehci-omap.c |4 +---
drivers/usb/host/ehci-orion.c |4
-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/staging/dwc2/platform.c|5 +++--
drivers/staging/imx-drm/imx-drm-core.c |8 ++--
drivers/staging/imx-drm/ipuv3-crtc.c |4 +++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/dwc2/platform.c b
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/net/ethernet/broadcom/b44.c |3 +--
1 files changed, 1
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
drivers/dma/amba-pl08x.c |5 +
1 files changed, 5 insertions(+), 0
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
arch/powerpc/kernel/vio.c |3 +--
1 files changed, 1 insertions
is already runtime-conditional on NEON being supported, so
there's no point compiling it out depending on the minimum build
architecture.
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
---
This is more a request for acks since I'd like to keep it/push it through
my tree to reduce the autobuilder
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -55,7 +55,7 @@
* cpu_arm926_proc_init()
*/
ENTRY(cpu_arm926_proc_init)
- mov pc, lr
+ ret lr
/*
* cpu_arm926_proc_fin()
@@ -65,7 +65,7 @@ ENTRY(cpu_arm926_proc_fin)
bic r0, r0, #0x1000
be harmless as
the only thing which matters is to have all the data loaded into SRAM
prior to launching the operation.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 74 +--
1 file changed, 36 insertions(
che-but-no-user-data case to make the next change clearer.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index c46
Move the calls to mv_cesa_dma_add_frag() into the parent function,
mv_cesa_ahash_dma_req_init(). This is in preparation to changing
when we generate the operation blocks, as we need to avoid generating
a block for a partial hash block at the end of the user data.
Signed-off-by: Russell King <
Move the test for the last request out of mv_cesa_ahash_dma_last_req()
to its caller, and move the mv_cesa_dma_add_frag() down into this
function.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 30 +++---
1 file chang
The endianness of the bit length used in the final stage depends on the
endianness of the algorithm - md5 hashes need it to be in little endian
format, whereas SHA hashes need it in big endian format. Use the
previously added algorithm endianness flag to control this.
Signed-off-by: Russell King
Rather than determining whether we're using a MD5 hash by looking at
the digest size, switch to a cleaner solution using a per-request flag
initialised by the method type.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 1 +
drivers/crypto/m
ash to the result.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 2 +-
drivers/crypto/marvell/hash.c | 25 ++---
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypt
Ensure that the template operation is fully initialised, otherwise we
end up loading data from the kernel stack into the engines, which can
upset the hash results.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 12 ++--
1 file chan
-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index 8111e73ca848..f567243da005 100644
--- a/drivers/crypto/m
Avoid adding the final operation within the loop, but instead add it
outside. We combine this with the handling for the no-data case.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 24 +---
1 file changed, 17 insertions
Multiple locations in the driver test the operation context fragment
type, checking whether it is a first fragment or not. Introduce a
mv_cesa_mac_op_is_first_frag() helper, which returns true if the
fragment operation is for a first fragment.
Signed-off-by: Russell King <rmk+
When adding the software padding, this must be done using the first/mid
fragment mode, and any subsequent operation needs to be a mid-fragment.
Fix this.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 8
1 file changed, 8 deletions(-)
mv_cesa_get_op_cfg() does not write to its argument, it only reads.
So, let's make it const.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/marvell/cesa.h b/d
makes the loop operation more obvious and understandable.
2. move the operation generation for the cache-only case.
This prepares the code for the next step in its transformation, and also
uncovers a bug that will be fixed in the next patch.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org
these parts.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 35 ---
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index b8ed04
s.com>
Reported-by: Thomas Petazzoni <thomas.petazz...@free-electrons.com>
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c
as a separate operation.
This ensures that the hardware only ever sees multiples of the hash
block size to be operated on for software padded hashes, thus ensuring
that the engine always indicates that it has finished the calculation.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org
Print the errno code when hash registration fails, so we know why the
failure occurred. This aids debugging.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/
g that bad
behaviour by CAAM.
Fixes: 7d5196aba3c8 ("crypto: caam - Correct DMA unmap size in
ahash_update_ctx()")
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cry
waste of resources. So, remove this code.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index
The kernel's coding style suggests that closing braces for initialisers
should not be aligned to the open brace column. The CodingStyle doc
shows how this should be done. Remove the additional tab.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caam
-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 44 ++
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index dcee360065f3..7dd80b
olution here - we replace sg_count() with
__sg_count(), so src_nents now contains the real number of scatterlist
entries, and we then change the test for using the hardware scatterlist
to src_nents > 1 rather than just non-zero.
This change passes my sshd, openssl tests hashing /bin and tcryp
When tdma->src is freed in mv_cesa_dma_cleanup(), we convert the DMA
address from a little-endian value prior to calling dma_pool_free().
However, mv_cesa_dma_add_op() assigns tdma->src without first converting
the DMA address to little endian. Fix this.
Signed-off-by: Russell King &l
Much of the driver uses cpu_to_le32() to convert values for descriptors
to little endian before writing. Use __le32 to define the hardware-
accessed parts of the descriptors, and ensure most places where it's
reasonable to do so use cpu_to_le32() when assigning to these.
Signed-off-by: Russell
cur_dma is part of the software state, not read by the hardware.
Storing it in LE32 format is wrong, use dma_addr_t for this.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 4 +++-
drivers/crypto/marvell/tdma.c | 6 +++---
2 files chan
Use the IO memcpy() functions when copying from/to MMIO memory.
These locations were found via sparse.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cipher.c | 11 ++-
drivers/crypto/marvell/hash.c | 16
2 files chang
Use gfp_t not u32 for the GFP flags.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 6 ++
drivers/crypto/marvell/tdma.c | 5 ++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/marvell/cesa.h b/drivers/
Use relaxed IO accessors where appropriate.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/cesa.h | 2 +-
drivers/crypto/marvell/cipher.c | 2 +-
drivers/crypto/marvell/hash.c | 7 +++
drivers/crypto/marvell/tdma.c | 20 ++---
Print the errno code when hash registration fails, so we know why the
failure occurred. This aids debugging.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/
-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 44 ++
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index dcee360065f3..7dd80b
: 3d03d100 0026
sg@892: ed03d958: 7e8aa700 4020
which replaces the 0x06 length with the correct 0x26 bytes of previously
unhashed data.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 2 +-
1 file chan
waste of resources. So, remove this code.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index
ort function only partially initialises
this structure, we end up with a lot of members which are left with
whatever data was in memory prior to sock_kmalloc().
Add zero-initialisation of this structure.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/h
-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
crypto/algif_hash.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 1396ad0787fc..f450584cb940 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -177,12 +
this to:
err = crypto_ahash_export(req, state);
which proceeds to write to 'state' as if it was a "struct md5_state",
"struct sha1_state" etc. Add the necessary initialisers for the
.statesize member.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers
ort function only partially initialises
this structure, we end up with a lot of members which are left with
whatever data was in memory prior to sock_kmalloc().
Add zero-initialisation of this structure.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/h
this to:
err = crypto_ahash_export(req, state);
which proceeds to write to 'state' as if it was a "struct md5_state",
"struct sha1_state" etc. Add the necessary initialisers for the
.statesize member.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers
-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
crypto/ahash.c | 3 ++-
crypto/shash.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 8acb886032ae..9c1dc8d6106a 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -544,7
ort function only partially initialises
this structure, we end up with a lot of members which are left with
whatever data was in memory prior to sock_kmalloc().
Add zero-initialisation of this structure.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/ha
-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
crypto/ahash.c | 3 ++-
crypto/shash.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 8acb886032ae..9c1dc8d6106a 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -544,7
this to:
err = crypto_ahash_export(req, state);
which proceeds to write to 'state' as if it was a "struct md5_state",
"struct sha1_state" etc. Add the necessary initialisers for the
.statesize member.
Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com>
Signed-off
to use the expensive 64-bit by 64-bit modulus operation.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 88 +++
1 file changed, 21 insertions(+), 67 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c b/d
e, whereas we may be past the first fragment of data to be hashed.
Arrange for the operation code to avoid the initialisation of the state,
thereby preserving the imported state.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/marvell/hash.c | 15 +++
to switch a % const operation to do_div() in the common import
function to avoid provoking gcc to use the expensive 64-bit by 64-bit
modulus operation.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
Replacement to patch 5, going a little further, as requested by Boris.
d
entries to allocate, and then fill them in. This allows
us to keep relatively simple error cleanup paths.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 109 -
1 file changed, 74 insertions(+), 35 del
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index eccde7207f92..6a6d74f38300 100644
--- a/d
Mark the hardware descriptor as being cache line aligned; on DMA
incoherent architectures, the hardware descriptor should sit in a
separate cache line from the CPU accessed data to avoid polluting
the caches.
Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypt
-off-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/caamhash.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index 0a9665140d26..d48974d1897d 100644
--- a/drivers/crypt
-by: Russell King <rmk+ker...@arm.linux.org.uk>
---
drivers/crypto/caam/intern.h | 1 -
drivers/crypto/caam/jr.c | 25 +
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h
index e2bcacc1a921..5d4c05
1 - 100 of 199 matches
Mail list logo