Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 11:06:16PM -0600, Logan Gunthorpe wrote: > Or maybe I'll just send a patch for that > separately seeing it doesn't depend on anything and is pretty simple. I > can do that next week. Yes, please just send that patch linux-nvme, we should be able to get it into 4.12.

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
On 13/04/17 10:59 PM, Christoph Hellwig wrote: > On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: >> This is a straight forward conversion in two places. Should kmap fail, >> the code will return an INVALD_DATA error in the completion. > > It really should be using

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: > This is a straight forward conversion in two places. Should kmap fail, > the code will return an INVALD_DATA error in the completion. It really should be using nvmet_copy_from_sgl to make things safer, as we don't want to rely on

Re: [PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread PrasannaKumar Muralidharan
On 14 April 2017 at 09:28, Sean Wang wrote: > > Hi PrasannaKumar, > > Add my comments inline > >> >> Use readl_poll_timeout_atomic's return value or -EIO instead of >> !!ready. This will simplify mtk_rng_read. >> > > !!ready provided is in order to let

Re: [RFC PATCH v1 1/1] crypto: algif_compression - User-space interface for compression

2017-04-13 Thread PrasannaKumar Muralidharan
On 14 April 2017 at 00:04, Abed Kamaluddin wrote: > crypto: algif_compression - User-space interface for compression > > This patch adds af_alg plugin for compression algorithms of type scomp/acomp > registered to the kernel crypto layer. > > The user needs to set operation

Re: [PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread Sean Wang
Hi PrasannaKumar, Add my comments inline On Thu, 2017-04-13 at 14:09 +0530, PrasannaKumar Muralidharan wrote: > Hi Sean, > > Mostly looks good, have few minor comments. > > On 13 April 2017 at 12:35, wrote: > > +static bool mtk_rng_wait_ready(struct hwrng *rng, bool

Re: [PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread Sean Wang
Hi Corentin, I all agree and appreciate your careful reviewing. They will be added into the next one. Sean On Thu, 2017-04-13 at 13:06 +0200, Corentin Labbe wrote: > Hello > > I have some minor comment below: > > On Thu, Apr 13, 2017 at 03:05:08PM +0800, sean.w...@mediatek.com

Re: [PATCH 3/7] x86, LLVM: suppress clang warnings about unaligned accesses

2017-04-13 Thread H. Peter Anvin
On 04/13/17 16:14, Matthias Kaehlcke wrote: > El Mon, Apr 03, 2017 at 04:01:58PM -0700 Matthias Kaehlcke ha dit: > >> El Fri, Mar 17, 2017 at 04:50:19PM -0700 h...@zytor.com ha dit: >> >>> On March 16, 2017 5:15:16 PM PDT, Michael Davidson wrote: Suppress clang warnings

Re: [PATCH 3/7] x86, LLVM: suppress clang warnings about unaligned accesses

2017-04-13 Thread Matthias Kaehlcke
El Mon, Apr 03, 2017 at 04:01:58PM -0700 Matthias Kaehlcke ha dit: > El Fri, Mar 17, 2017 at 04:50:19PM -0700 h...@zytor.com ha dit: > > > On March 16, 2017 5:15:16 PM PDT, Michael Davidson wrote: > > >Suppress clang warnings about potential unaliged accesses > > >to members in

[PATCH 15/22] scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers

2017-04-13 Thread Logan Gunthorpe
These two drivers appear to duplicate the functionality of sg_copy_buffer. So we clean them up to use the common code. This helps us remove a couple of instances that would otherwise be slightly tricky sg_map usages. Signed-off-by: Logan Gunthorpe ---

[PATCH 06/22] crypto: hifn_795x: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Conversion of a couple kmap_atomic instances to the sg_map helper function. However, it looks like there was a bug in the original code: the source scatter lists offset (t->offset) was passed to ablkcipher_get which added it to the destination address. This doesn't make a lot of sense, but

[PATCH 07/22] crypto: shash, caam: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in two crypto drivers. Signed-off-by: Logan Gunthorpe --- crypto/shash.c| 9 ++--- drivers/crypto/caam/caamalg.c | 8 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH 10/22] staging: unisys: visorbus: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c

[PATCH 12/22] scsi: ipr, pmcraid, isci: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/ipr.c | 27 ++- drivers/scsi/isci/request.c | 42 +- drivers/scsi/pmcraid.c | 19

[PATCH 04/22] target: Make use of the new sg_map function at 16 call sites

2017-04-13 Thread Logan Gunthorpe
Fairly straightforward conversions in all spots. In a couple of cases any error gets propogated up should sg_map fail. In other cases a warning is issued if the kmap fails seeing there's no clear error path. This should not be an issue until someone tries to use unmappable memory in the sgl with

[PATCH 18/22] mmc: spi: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
We use the sg_map helper but it's slightly more complicated as we only check for the error when the mapping actually gets used. Such that if the mapping failed but wasn't needed then no error occurs. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/mmc_spi.c | 26

[PATCH 03/22] libiscsi: Make use of new the sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Convert the kmap and kmap_atomic uses to the sg_map function. We now store the flags for the kmap instead of a boolean to indicate atomicitiy. We also propogate a possible kmap error down and create a new ISCSI_TCP_INTERNAL_ERR error type for this. Signed-off-by: Logan Gunthorpe

[PATCH 22/22] memstick: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, but we have to WARN if unmappable memory finds its way into the sgl. Signed-off-by: Logan Gunthorpe --- drivers/memstick/host/jmb38x_ms.c | 23 ++- drivers/memstick/host/tifm_ms.c | 22 +- 2 files

[PATCH 16/22] xen-blkfront: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new helper, except due to the lack of error path, we have to warn if unmapable memory is ever present in the sgl. Signed-off-by: Logan Gunthorpe --- drivers/block/xen-blkfront.c | 33 +++-- 1 file changed, 27

[PATCH 19/22] mmc: tmio: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to sg_map helper. A couple paths will WARN if the memory does not end up being mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/tmio_mmc.h | 12 ++-- drivers/mmc/host/tmio_mmc_dma.c | 5 +

[PATCH 05/22] drm/i915: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a single straightforward conversion from kmap to sg_map. Signed-off-by: Logan Gunthorpe --- drivers/gpu/drm/i915/i915_gem.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c

[PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straight forward conversion in two places. Should kmap fail, the code will return an INVALD_DATA error in the completion. Signed-off-by: Logan Gunthorpe --- drivers/nvme/target/fabrics-cmd.c | 16 1 file changed, 12 insertions(+), 4 deletions(-)

[PATCH 00/22] Introduce common scatterlist map function

2017-04-13 Thread Logan Gunthorpe
Hi Everyone, As part of my effort to enable P2P DMA transactions with PCI cards, we've identified the need to be able to safely put IO memory into scatterlists (and eventually other spots). This probably involves a conversion from struct page to pfn_t but that migration is a ways off and those

[PATCH 11/22] RDS: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion except there's no error path, so we WARN if the sg_map fails. Signed-off-by: Logan Gunthorpe --- net/rds/ib_recv.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index

[PATCH 21/22] mmc: tifm_sd: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This conversion is a bit complicated. We modiy the read_fifo, write_fifo and copy_page functions to take a scatterlist instead of a page. Thus we can use sg_map instead of kmap_atomic. There's a bit of accounting that needed to be done for the offset for this to work. (Seeing sg_map takes care of

[PATCH 17/22] mmc: sdhci: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, except due to the lack of error path we have to WARN if the memory in the SGL is not mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdhci.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-)

[PATCH 20/22] mmc: sdricoh_cs: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdricoh_cs.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index

[PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in all four spots. Signed-off-by: Logan Gunthorpe --- drivers/md/dm-crypt.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/md/dm-crypt.c

[PATCH 13/22] scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/gdth.c| 9 +++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 +

[PATCH 14/22] scsi: arcmsr, ips, megaraid: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers Signed-off-by: Logan Gunthorpe --- drivers/scsi/arcmsr/arcmsr_hba.c | 16 drivers/scsi/ips.c | 8 drivers/scsi/megaraid.c | 9 +++-- 3 files changed, 23

[PATCH 08/22] crypto: chcr: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
The get_page in this area looks *highly* suspect due to there being no corresponding put_page. However, I've left that as is to avoid breaking things. I've also removed the KMAP_ATOMIC_ARGS check as it appears to be dead code that dates back to when it was first committed... Signed-off-by: Logan

[PATCH 01/22] scatterlist: Introduce sg_map helper functions

2017-04-13 Thread Logan Gunthorpe
This patch introduces functions which kmap the pages inside an sgl. Two variants are provided: one if an offset is required and one if the offset is zero. These functions replace a common pattern of kmap(sg_page(sg)) that is used in about 50 places within the kernel. The motivation for this work

[RFC PATCH v1 1/1] crypto: algif_compression - User-space interface for compression

2017-04-13 Thread Abed Kamaluddin
crypto: algif_compression - User-space interface for compression This patch adds af_alg plugin for compression algorithms of type scomp/acomp registered to the kernel crypto layer. The user needs to set operation (compression/decompression) as a control message to sendmsg, identical to selecting

[RFC PATCH v1 0/1] *** crypto: AF_ALG: add compression support ***

2017-04-13 Thread Abed Kamaluddin
Hi Herbert, This patch adds compression support to the AF_ALG interface exported by the kernel crypto API. By extending AF_ALG, all compression algorithms of types scomp and acomp, which the kernel crypto API allows access to, are now also accessible from userspace. The new compression

[PATCH v2] crypto: chcr - Fix error handling related to 'chcr_alloc_shash'

2017-04-13 Thread Christophe JAILLET
Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error pointer or NULL (in case of invalid parameter) Update it to always return an error pointer in case of error. It now returns ERR_PTR(-EINVAL) instead of NULL in case of invalid parameter. This simplifies error handling. Also

[PATCH V2 2/2] crypto: ccp - Disable interrupts early on unload

2017-04-13 Thread Gary R Hook
From: Gary R Hook Ensure that we disable interrupts first when shutting down the driver. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v5.c

[PATCH V2 1/2] crypto: ccp - Use only the relevant interrupt bits

2017-04-13 Thread Gary R Hook
Each CCP queue can product interrupts for 4 conditions: operation complete, queue empty, error, and queue stopped. This driver only works with completion and error events. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c |9 +

[PATCH V2 0/2] Interrupt management fixes

2017-04-13 Thread Gary R Hook
Correct the driver to attend to only relevant interrupt bits, and ensure that interrupts are managed properly at module unload. Changes from V1: - Changed the #define to "SUPPORTED_INTERRUPTS" --- Gary R Hook (2): crypto: ccp - Use only the relevant interrupt bits crypto: ccp -

Re: [PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Christophe JAILLET
Le 13/04/2017 à 18:13, Dan Carpenter a écrit : On Thu, Apr 13, 2017 at 08:37:50PM +0530, Harsh Jain wrote: On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET wrote: Le 13/04/2017 à 16:04, Dan Carpenter a écrit : On Thu, Apr 13, 2017 at 02:14:30PM +0200,

Re: [PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Dan Carpenter
On Thu, Apr 13, 2017 at 08:37:50PM +0530, Harsh Jain wrote: > On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET > wrote: > > Le 13/04/2017 à 16:04, Dan Carpenter a écrit : > >> > >> On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote: > >>> > >>> If

Re: [PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Harsh Jain
On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET wrote: > Le 13/04/2017 à 16:04, Dan Carpenter a écrit : >> >> On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote: >>> >>> If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an >>>

export pcie_flr and remove copies of it in drivers

2017-04-13 Thread Christoph Hellwig
Hi all, this exports the PCI layer pcie_flr helper, and removes various opencoded copies of it.

[PATCH 1/7] PCI: export pcie_flr

2017-04-13 Thread Christoph Hellwig
Currently we opencode the FLR sequence in lots of place, export a core helper instead. We split out the probing for FLR support as all the non-core callers already know their hardware. Signed-off-by: Christoph Hellwig --- drivers/pci/pci.c | 34 +-

[PATCH 7/7] liquidio: use pcie_flr instead of duplicating it

2017-04-13 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c index

[PATCH 2/7] PCI: call pcie_flr from reset_intel_82599_sfp_virtfn

2017-04-13 Thread Christoph Hellwig
The 82599 quirk contained an outdated copy of the FLR code. Signed-off-by: Christoph Hellwig --- drivers/pci/quirks.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 673683660b5c..b1775354cc69

[PATCH 5/7] IB/hfi1: use pcie_flr instead of duplicating it

2017-04-13 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/infiniband/hw/hfi1/chip.c | 4 ++-- drivers/infiniband/hw/hfi1/hfi.h | 1 - drivers/infiniband/hw/hfi1/pcie.c | 30 -- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git

[PATCH 4/7] ixgbe: use pcie_flr instead of duplicating it

2017-04-13 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index

[PATCH 3/7] PCI: call pcie_flr from reset_chelsio_generic_dev

2017-04-13 Thread Christoph Hellwig
Instead of copy & pasting and old version of the code. Signed-off-by: Christoph Hellwig --- drivers/pci/quirks.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index b1775354cc69..b54c0d986f2a 100644

[PATCH 6/7] crypto: qat: use pcie_flr instead of duplicating it

2017-04-13 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/crypto/qat/qat_common/adf_aer.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_aer.c b/drivers/crypto/qat/qat_common/adf_aer.c index 2839fccdd84b..d3e25c37dc33 100644

Re: [patch V2 13/13] crypto: n2 - Replace racy task affinity logic

2017-04-13 Thread David Miller
From: Thomas Gleixner Date: Thu, 13 Apr 2017 10:20:23 +0200 (CEST) > spu_queue_register() needs to invoke setup functions on a particular > CPU. This is achieved by temporarily setting the affinity of the > calling user space thread to the requested CPU and reset it to the

Re: [PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Christophe JAILLET
Le 13/04/2017 à 16:04, Dan Carpenter a écrit : On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote: If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an error pointer when we 'goto out'. So checking for NULL here is not enough because it is likely that

Re: [PATCH 1/2] crypto: chcr - Improve error checking

2017-04-13 Thread Dan Carpenter
On Thu, Apr 13, 2017 at 02:14:19PM +0200, Christophe JAILLET wrote: > 'chcr_alloc_shash()' can return NULL. Here it is not possible because this > code is reached only if 'get_alg_config()' a few lines above has succeeded. > So we are garanteed that the value of 'max_authsize' is a correct >

Re: [PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Dan Carpenter
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote: > If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an > error pointer when we 'goto out'. > So checking for NULL here is not enough because it is likely that > 'chcr_free_shash' will crash if we pass an error

Re: [PATCH] crypto: vmx: Remove dubiously licensed crypto code

2017-04-13 Thread Michal Suchánek
On Thu, 30 Mar 2017 13:30:17 -0300 Paulo Flabiano Smorigo wrote: > On 2017-03-29 20:08, Tyrel Datwyler wrote: > > On 03/29/2017 08:13 AM, Michal Suchánek wrote: > >> On Wed, 29 Mar 2017 16:51:35 +0200 > >> Greg Kroah-Hartman wrote: >

[PATCH 2/2] crypto: chcr - Fix error checking

2017-04-13 Thread Christophe JAILLET
If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an error pointer when we 'goto out'. So checking for NULL here is not enough because it is likely that 'chcr_free_shash' will crash if we pass an error pointer. Signed-off-by: Christophe JAILLET

[PATCH 0/2] Fix/improve some error handling related to 'chcr_alloc_shash'

2017-04-13 Thread Christophe JAILLET
This serie is divided into 2 patches. They are more or less related to the same issue, but the first patch is not a bug in itself, just a clean-up (IMHO). If I'm correct, the 2nd one, is a real (unlikely) issue. Christophe JAILLET (2): crypto: chcr - Improve error checking crypto: chcr - Fix

[PATCH 1/2] crypto: chcr - Improve error checking

2017-04-13 Thread Christophe JAILLET
'chcr_alloc_shash()' can return NULL. Here it is not possible because this code is reached only if 'get_alg_config()' a few lines above has succeeded. So we are garanteed that the value of 'max_authsize' is a correct parameter. Anyway, this is harmless to add a check for NULL. Signed-off-by:

Re: [PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread Corentin Labbe
Hello I have some minor comment below: On Thu, Apr 13, 2017 at 03:05:08PM +0800, sean.w...@mediatek.com wrote: > From: Sean Wang > > This patch adds support for hardware random generator on MT7623 SoC > and should also work on other similar Mediatek SoCs. Currently, >

[PATCH] padata: allow caller to control queue length

2017-04-13 Thread Jason A. Donenfeld
Allow users of padata to determine the queue length themselves, via this added helper function, so that we can later remove the hard-coded 1000- job limit. We thus add a helper function, and then move the limiting functionality to pcrypt-proper, since it was the only current consumer relying on

Re: [RFC PATCH v5] IV Generation algorithms for dm-crypt

2017-04-13 Thread Binoy Jayan
Hi Milan, On 10 April 2017 at 19:30, Milan Broz wrote: Thank you for the reply. > Well, it is good that there is no performance degradation but it > would be nice to have some user of it that proves it is really > working for your hw. I have been able to get access to a

Re: [PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread PrasannaKumar Muralidharan
Hi Sean, Mostly looks good, have few minor comments. On 13 April 2017 at 12:35, wrote: > +static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait) > +{ > + struct mtk_rng *priv = to_mtk_rng(rng); > + int ready; > + > + ready = readl(priv->base +

[patch V2 13/13] crypto: n2 - Replace racy task affinity logic

2017-04-13 Thread Thomas Gleixner
spu_queue_register() needs to invoke setup functions on a particular CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for

[PATCH 1/2] dt-bindings: hwrng: Add Mediatek hardware random generator bindings

2017-04-13 Thread sean.wang
From: Sean Wang Document the devicetree bindings for Mediatek random number generator which could be found on MT7623 SoC or other similar Mediatek SoCs. Signed-off-by: Sean Wang --- Documentation/devicetree/bindings/rng/mtk-rng.txt | 18

[PATCH 2/2] hwrng: mtk: Add driver for hardware random generator on MT7623 SoC

2017-04-13 Thread sean.wang
From: Sean Wang This patch adds support for hardware random generator on MT7623 SoC and should also work on other similar Mediatek SoCs. Currently, the driver is already tested successfully with rng-tools. Signed-off-by: Sean Wang ---

[PATCH 0/2] hwrng: mtk: add support for hardware random generator on MT7623 SoC

2017-04-13 Thread sean.wang
From: Sean Wang This patchset introduces support for Mediatek hardware random generator (RNG) Currently, the driver is already tested successfully with rng-tools on MT7623 SoC. And it should also be workable on other similar Mediatek SoCs. SoC that also works on other