mbox series

[00/12] CAAM bugfixes, small improvements

Message ID 20190904023515.7107-1-andrew.smirnov@gmail.com (mailing list archive)
Headers show
Series CAAM bugfixes, small improvements | expand

Message

Andrey Smirnov Sept. 4, 2019, 2:35 a.m. UTC
Everyone:

This series bugfixes and small improvement I made while doing more
testing of CAAM code:

 - "crypto: caam - make sure clocks are enabled first"

   fixes a recent regression (and, conincidentally a leak cause by one
   of my i.MX8MQ patches)

 - "crypto: caam - use devres to unmap JR's registers"
   "crypto: caam - check irq_of_parse_and_map for errors"

   are small improvements

 - "crypto: caam - dispose of IRQ mapping only after IRQ is freed"

   fixes a bug introduced by my i.MX8MQ series

 - "crypto: caam - use devres to unmap memory"
   "crypto: caam - use devres to remove debugfs"
   "crypto: caam - use devres to de-initialize the RNG"
   "crypto: caam - use devres to de-initialize QI"
   "crypto: caam - user devres to populate platform devices"
   "crypto: caam - populate platform devices last"

   are devres conversions/small improvments

 - "crypto: caam - convert caamrng to platform device"
   "crypto: caam - change JR device ownership scheme"

   are more of an RFC than proper fixes. I don't have a very high
   confidence in those fixes, but I think they are a good conversation
   stater about the best approach to fix those issues

Thanks,
Andrey Smirnov

Andrey Smirnov (12):
  crypto: caam - make sure clocks are enabled first
  crypto: caam - use devres to unmap JR's registers
  crypto: caam - check irq_of_parse_and_map for errors
  crypto: caam - dispose of IRQ mapping only after IRQ is freed
  crypto: caam - use devres to unmap memory
  crypto: caam - use devres to remove debugfs
  crypto: caam - use devres to de-initialize the RNG
  crypto: caam - use devres to de-initialize QI
  crypto: caam - user devres to populate platform devices
  crypto: caam - populate platform devices last
  crypto: caam - convert caamrng to platform device
  crypto: caam - change JR device ownership scheme

 drivers/crypto/caam/caamrng.c | 102 +++++-------
 drivers/crypto/caam/ctrl.c    | 294 ++++++++++++++++++----------------
 drivers/crypto/caam/intern.h  |   4 -
 drivers/crypto/caam/jr.c      |  90 ++++++++---
 drivers/crypto/caam/qi.c      |   8 +-
 drivers/crypto/caam/qi.h      |   1 -
 6 files changed, 267 insertions(+), 232 deletions(-)

Comments

Herbert Xu Sept. 9, 2019, 7:53 a.m. UTC | #1
On Tue, Sep 03, 2019 at 07:35:03PM -0700, Andrey Smirnov wrote:
> Everyone:
> 
> This series bugfixes and small improvement I made while doing more
> testing of CAAM code:
> 
>  - "crypto: caam - make sure clocks are enabled first"
> 
>    fixes a recent regression (and, conincidentally a leak cause by one
>    of my i.MX8MQ patches)
> 
>  - "crypto: caam - use devres to unmap JR's registers"
>    "crypto: caam - check irq_of_parse_and_map for errors"
> 
>    are small improvements
> 
>  - "crypto: caam - dispose of IRQ mapping only after IRQ is freed"
> 
>    fixes a bug introduced by my i.MX8MQ series
> 
>  - "crypto: caam - use devres to unmap memory"
>    "crypto: caam - use devres to remove debugfs"
>    "crypto: caam - use devres to de-initialize the RNG"
>    "crypto: caam - use devres to de-initialize QI"
>    "crypto: caam - user devres to populate platform devices"
>    "crypto: caam - populate platform devices last"
> 
>    are devres conversions/small improvments
> 
>  - "crypto: caam - convert caamrng to platform device"
>    "crypto: caam - change JR device ownership scheme"
> 
>    are more of an RFC than proper fixes. I don't have a very high
>    confidence in those fixes, but I think they are a good conversation
>    stater about the best approach to fix those issues
> 
> Thanks,
> Andrey Smirnov
> 
> Andrey Smirnov (12):
>   crypto: caam - make sure clocks are enabled first
>   crypto: caam - use devres to unmap JR's registers
>   crypto: caam - check irq_of_parse_and_map for errors
>   crypto: caam - dispose of IRQ mapping only after IRQ is freed
>   crypto: caam - use devres to unmap memory
>   crypto: caam - use devres to remove debugfs
>   crypto: caam - use devres to de-initialize the RNG
>   crypto: caam - use devres to de-initialize QI
>   crypto: caam - user devres to populate platform devices
>   crypto: caam - populate platform devices last
>   crypto: caam - convert caamrng to platform device
>   crypto: caam - change JR device ownership scheme
> 
>  drivers/crypto/caam/caamrng.c | 102 +++++-------
>  drivers/crypto/caam/ctrl.c    | 294 ++++++++++++++++++----------------
>  drivers/crypto/caam/intern.h  |   4 -
>  drivers/crypto/caam/jr.c      |  90 ++++++++---
>  drivers/crypto/caam/qi.c      |   8 +-
>  drivers/crypto/caam/qi.h      |   1 -
>  6 files changed, 267 insertions(+), 232 deletions(-)

All applied.  Thanks.
Horia Geanta Sept. 9, 2019, 12:07 p.m. UTC | #2
On 9/9/2019 10:53 AM, Herbert Xu wrote:
> On Tue, Sep 03, 2019 at 07:35:03PM -0700, Andrey Smirnov wrote:
>> Everyone:
>>
>> This series bugfixes and small improvement I made while doing more
>> testing of CAAM code:
>>
>>  - "crypto: caam - make sure clocks are enabled first"
>>
>>    fixes a recent regression (and, conincidentally a leak cause by one
>>    of my i.MX8MQ patches)
>>
>>  - "crypto: caam - use devres to unmap JR's registers"
>>    "crypto: caam - check irq_of_parse_and_map for errors"
>>
>>    are small improvements
>>
>>  - "crypto: caam - dispose of IRQ mapping only after IRQ is freed"
>>
>>    fixes a bug introduced by my i.MX8MQ series
>>
>>  - "crypto: caam - use devres to unmap memory"
>>    "crypto: caam - use devres to remove debugfs"
>>    "crypto: caam - use devres to de-initialize the RNG"
>>    "crypto: caam - use devres to de-initialize QI"
>>    "crypto: caam - user devres to populate platform devices"
>>    "crypto: caam - populate platform devices last"
>>
>>    are devres conversions/small improvments
>>
>>  - "crypto: caam - convert caamrng to platform device"
>>    "crypto: caam - change JR device ownership scheme"
>>
>>    are more of an RFC than proper fixes. I don't have a very high
>>    confidence in those fixes, but I think they are a good conversation
>>    stater about the best approach to fix those issues
>>
>> Thanks,
>> Andrey Smirnov
>>
>> Andrey Smirnov (12):
>>   crypto: caam - make sure clocks are enabled first
>>   crypto: caam - use devres to unmap JR's registers
>>   crypto: caam - check irq_of_parse_and_map for errors
>>   crypto: caam - dispose of IRQ mapping only after IRQ is freed
>>   crypto: caam - use devres to unmap memory
>>   crypto: caam - use devres to remove debugfs
>>   crypto: caam - use devres to de-initialize the RNG
>>   crypto: caam - use devres to de-initialize QI
>>   crypto: caam - user devres to populate platform devices
>>   crypto: caam - populate platform devices last
>>   crypto: caam - convert caamrng to platform device
>>   crypto: caam - change JR device ownership scheme
>>
>>  drivers/crypto/caam/caamrng.c | 102 +++++-------
>>  drivers/crypto/caam/ctrl.c    | 294 ++++++++++++++++++----------------
>>  drivers/crypto/caam/intern.h  |   4 -
>>  drivers/crypto/caam/jr.c      |  90 ++++++++---
>>  drivers/crypto/caam/qi.c      |   8 +-
>>  drivers/crypto/caam/qi.h      |   1 -
>>  6 files changed, 267 insertions(+), 232 deletions(-)
> 
> All applied.  Thanks.
> 
Why all?
I've ack-ed only 1 and 4.

Besides this, patches 11 and/or 12 break the functionality,
i.e. driver gets stuck during crypto self-tests.

Horia
Herbert Xu Sept. 9, 2019, 12:52 p.m. UTC | #3
On Mon, Sep 09, 2019 at 12:07:17PM +0000, Horia Geanta wrote:
>
> Why all?
> I've ack-ed only 1 and 4.
> 
> Besides this, patches 11 and/or 12 break the functionality,
> i.e. driver gets stuck during crypto self-tests.

Should I back out 5-12 or everything but patch 1?

Patch 4 can't be applied without 2/3.

Cheers,
Horia Geanta Sept. 9, 2019, 1:26 p.m. UTC | #4
On 9/9/2019 3:52 PM, Herbert Xu wrote:
> On Mon, Sep 09, 2019 at 12:07:17PM +0000, Horia Geanta wrote:
>>
>> Why all?
>> I've ack-ed only 1 and 4.
>>
>> Besides this, patches 11 and/or 12 break the functionality,
>> i.e. driver gets stuck during crypto self-tests.
> 
> Should I back out 5-12 or everything but patch 1?
> 
> Patch 4 can't be applied without 2/3.
> 
Let's go with patches 1-4, and revert 5-12.

Thanks,
Horia
Herbert Xu Sept. 9, 2019, 1:52 p.m. UTC | #5
On Mon, Sep 09, 2019 at 01:26:31PM +0000, Horia Geanta wrote:
>
> Let's go with patches 1-4, and revert 5-12.

OK, done and pushed out.

Cheers,