linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-08-19 11:54 radioconfusion at gmail.com
  2016-08-19 12:12 ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-08-19 11:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

> On Tue, 05 Jul 2016 11:46:30 +0300, radioconfusion at gmail.com wrote:

> My Armada 385 -device hangs when using marvell-cesa -driver.
> I'm using Linux 4.4.10 and armada-385-db-ap.dts.
> I have also tried with the driver version of Linux 4.7-rc3.
> 
> Please see https://bugzilla.kernel.org/show_bug.cgi?id=120111 for details.

I just tested the marvell-cesa with Linux 4.8-rc2 and Armada 385.
There is still the same hanging issue (originally described on
https://bugzilla.kernel.org/show_bug.cgi?id=120111).

Please let me ask which model of Armada board has been verified to work with the
marvell-cesa driver? I'm using a custom board based on 88F6820. Is this SoC
model fully supported by the driver? Do you know if there is some necessary
hardware initializations which must be done on u-boot? I'm using latest Marvell
patch set (2015_T1.0p16) on u-boot.

My test case have been:
# cryptsetup benchmark --cipher aes-cbc

and that always freezes the board.

Best Regards
Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-08-24 10:52 radioconfusion at gmail.com
  2016-08-24 12:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-08-24 10:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Wed, Aug 24, 2016 at 10:26:47PM +0100, Russell King - ARM Linux wrote:
> > The problem caused by my mistake, I was using the following kernel parameter:
> > mem=1048448k

> Try mem=1046M - reducing it by 2MB.  If that works, try mem=1047M
> instead.  Yes, that's more than you want to reserve, but please
> check how the system behaves with these.

I assume that you mean mem=1022M.

Quick testing results:
mem=256M works
mem=384M not
mem=524160k not (512M-128k)
mem=524228k works (512M-60k)
mem=512M works
mem=524348k not (512M+60k)
mem=524416k not (512M+128k)
mem=768M works
mem=896M not
mem=960M not
mem=1022M not
mem=1023M not
mem=1048000k not
mem=1048448k not (1024M-128k)
mem=1048514k not
mem=1048516k works (1024M-60k)
mem=1048518k works
mem=1048520k works
mem=1024M works

So I can reserve 0-60 kiB or 256 MiB but nothing between.
The device boots up with all listed values but cesa works with few
values only.

Best Regards
Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-08-24  9:15 radioconfusion at gmail.com
  2016-08-24  9:26 ` Russell King - ARM Linux
  0 siblings, 1 reply; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-08-24  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Fri, 19 Aug 2016 16:09, Roman Perier wrote:
> Could you test with uImage.armada-385-db-ap [1], that's a legacy Image.
> Also, I have uploaded a minimalistic rootfs [2], if you want.
>
> 1. http://www.free-electrons.com/~romain/pub/cesa/uImage.armada-385-db-ap
> 2. http://www.free-electrons.com/~romain/pub/cesa/rootfs.cpio.xz

Huge thanks to Roman, Thomas and Russell.
The cesa works on your image and rootfs. Now it works on my system too.

The problem caused by my mistake, I was using the following kernel parameter:
mem=1048448k
My device has 1 GiB of RAM and I tried to reserve 128 kiB of memory for ram
oops. I guess this parameter caused overlapping or inaccessible area with cesa's
addresses. Am I right?
I tried to add memmap=0x20000$0x3ffe0000 without success.

Is this normal behaviour?
If yes, what is the right way to reserve RAM without killing the cesa? Should I
reserve memory at physical start point?

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-07-14 12:29 radioconfusion at gmail.com
  0 siblings, 0 replies; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-07-14 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Thu, 7 Jul 2016 15:43:14 +0200, thomas.petazzoni at free-electrons.com wrote:

> > > > My Armada 385 -device hangs when using marvell-cesa -driver.
> > > > I'm using Linux 4.4.10 and armada-385-db-ap.dts.
> > > > I have also tried with the driver version of Linux 4.7-rc3.
> > > > 
> > > > Please see https://bugzilla.kernel.org/show_bug.cgi?id=120111 for details.  
> > 
> > > Can you try with
> > > http://git.infradead.org/linux-mvebu.git/commitdiff/c5379ba8fccd99d5f99632c789f0393d84a57805
> > > applied ?  
> > 
> > Thanks Thomas.
> > Your patch seems to fix a random hang during crypto operations.
>
> OK, great.
>

(Some lines snipped...)

> Could you test with the latest 4.7-rc kernel + the patch I provided?

Sorry about that silence. Finally I had some time for testing this.

I took Linux 4.7-rc7 (92d21ac74a9e3c09b0b01c764e530657e4c85c49) and just put "fix HW I/O coherency related deadlocks" to top of it.
Unfortunately, the result was exact same than 4.4.10.

First, without the driver:

# cryptsetup benchmark --cipher aes-cbc

# Tests are approximate using memory only (no storage IO).
#  Algorithm | Key |  Encryption |  Decryption
      aes-cbc   256b    21.9 MiB/s    23.6 MiB/s

Loading the driver:

# modprobe marvell_cesa
[  103.213901] marvell-cesa f1090000.crypto: CESA device successfully registered

And after that:
# cryptsetup benchmark --cipher aes-cbc

was never done.

Thanks,

Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-07-08  9:55 radioconfusion at gmail.com
  0 siblings, 0 replies; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-07-08  9:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Thu, 7 Jul 2016 15:43:14 +0200, thomas.petazzoni at free-electrons.com wrote:

> > > > My Armada 385 -device hangs when using marvell-cesa -driver.
> > > > I'm using Linux 4.4.10 and armada-385-db-ap.dts.
> > > > I have also tried with the driver version of Linux 4.7-rc3.
> > > > 
> > > > Please see https://bugzilla.kernel.org/show_bug.cgi?id=120111 for details.  
> > 
> > > Can you try with
> > > http://git.infradead.org/linux-mvebu.git/commitdiff/c5379ba8fccd99d5f99632c789f0393d84a57805
> > > applied ?  
> > 
> > Thanks Thomas.
> > Your patch seems to fix a random hang during crypto operations.
>
> OK, great.
>
> > Unfortunately it seems to hit the crypto performance too.
> > The command "cryptsetup benchmark --cipher aes-cbc"
> > gives me around 35 MiB/s instead of 50 MiB/s.
> > 
> > The patch did not fix the hanging which appears instantly after enabling tdma
> > in the driver and running some crypto operation.
>
> I don't understand. Above you're saying that it fixes the problem, and
> now you're saying that it doesn't.

I'm sorry that ambiguity.
As I wrote to bugzilla (link above), there might be two different problems.

1. Without patching (Linux 4.4.10 -version):
"Cryptsetup benchmark never completes and the device locks up."
This happens always and instantly.

I found a workaround for this first problem. If I disable tdma on driver,
I can run successfully some crypto tasks (with quite poor performance),
including cryptsetup benchmark. Then I found the second problem.

2. After disabling tdma (patch provided on bugzilla):
"The device still hangs after a couple of crypto tasks, e.g. when writing a few
hundred MiB of data to btrfs which is on top of luks."

Your c5379ba8 -commit fixed the second problem for me.
Still I have the first problem when tdma is enabled.

> Could you test with the latest 4.7-rc kernel + the patch I provided?

Yes, I will.

Thanks,

Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-07-07  9:20 radioconfusion at gmail.com
  2016-07-07 13:43 ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-07-07  9:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Wed, 6 Jul 2016 09:06:55 +0200, thomas.petazzoni at free-electronics.com wrote:

> Hello,

> On Tue, 05 Jul 2016 11:46:30 +0300, radioconfusion at gmail.com wrote:

> > My Armada 385 -device hangs when using marvell-cesa -driver.
> > I'm using Linux 4.4.10 and armada-385-db-ap.dts.
> > I have also tried with the driver version of Linux 4.7-rc3.
> > 
> > Please see https://bugzilla.kernel.org/show_bug.cgi?id=120111 for details.

> Can you try with
> http://git.infradead.org/linux-mvebu.git/commitdiff/c5379ba8fccd99d5f99632c789f0393d84a57805
> applied ?

Thanks Thomas.
Your patch seems to fix a random hang during crypto operations.

Unfortunately it seems to hit the crypto performance too.
The command "cryptsetup benchmark --cipher aes-cbc"
gives me around 35 MiB/s instead of 50 MiB/s.

The patch did not fix the hanging which appears instantly after enabling tdma
in the driver and running some crypto operation.

Thanks,

Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [crypto] [marvell-cesa] Driver hangs on Armada 385 device
@ 2016-07-05  8:46 radioconfusion at gmail.com
  2016-07-06  7:06 ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: radioconfusion at gmail.com @ 2016-07-05  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

My Armada 385 -device hangs when using marvell-cesa -driver.
I'm using Linux 4.4.10 and armada-385-db-ap.dts.
I have also tried with the driver version of Linux 4.7-rc3.

Please see https://bugzilla.kernel.org/show_bug.cgi?id=120111 for details.

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-08-24 12:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 11:54 [crypto] [marvell-cesa] Driver hangs on Armada 385 device radioconfusion at gmail.com
2016-08-19 12:12 ` Thomas Petazzoni
2016-08-19 13:07   ` Romain Perier
2016-08-19 13:08   ` Russell King - ARM Linux
2016-08-19 13:28     ` Russell King - ARM Linux
2016-08-19 14:09     ` Romain Perier
2016-08-19 14:19       ` Romain Perier
2016-08-19 14:21       ` Russell King - ARM Linux
2016-08-19 14:39         ` Romain Perier
  -- strict thread matches above, loose matches on Subject: below --
2016-08-24 10:52 radioconfusion at gmail.com
2016-08-24 12:38 ` Thomas Petazzoni
2016-08-24  9:15 radioconfusion at gmail.com
2016-08-24  9:26 ` Russell King - ARM Linux
2016-07-14 12:29 radioconfusion at gmail.com
2016-07-08  9:55 radioconfusion at gmail.com
2016-07-07  9:20 radioconfusion at gmail.com
2016-07-07 13:43 ` Thomas Petazzoni
2016-07-05  8:46 radioconfusion at gmail.com
2016-07-06  7:06 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).