Re: SDHCI long sleep with interrupts off

2015-12-18 Thread Russell King - ARM Linux
On Thu, Dec 17, 2015 at 04:09:03PM +0100, David Jander wrote: > > Dear Ulf, > > On Thu, 17 Dec 2015 15:54:54 +0100 > Ulf Hansson wrote: > > The code is in general fragile. We have have kind of reached the > > point, when I apply changes that fixes one issue it may cause another. > > Oh, that is

Re: SDHCI long sleep with interrupts off

2015-12-18 Thread Russell King - ARM Linux
On Thu, Dec 17, 2015 at 01:22:29PM +0100, David Jander wrote: > Ok, this sounds like a good way to go. Unfortunately it also sounds like a > major endeavor, for which good knowledge of the SDHCI standard is necessary. That's not entirely true. Anyone who is really good at programming can fix this

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread David Jander
Dear Ulf, On Thu, 17 Dec 2015 15:54:54 +0100 Ulf Hansson wrote: > [...] > > >> If/when you decide to fix this issue. Please keep in mind the following > >> things. > >> > >> - Try to convert the SDHCI into a pure library. No more quirks or > >> callbacks. > >> - I assume we can simplify lots o

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread Ulf Hansson
[...] >> If/when you decide to fix this issue. Please keep in mind the following >> things. >> >> - Try to convert the SDHCI into a pure library. No more quirks or callbacks. >> - I assume we can simplify lots of code if we convert SDHCI into using >> a threaded IRQ in favour of the tasklet. >> >>

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread David Jander
On Thu, 17 Dec 2015 12:39:20 +0100 Ulf Hansson wrote: > On 17 December 2015 at 12:27, Lucas Stach wrote: > > Am Donnerstag, den 17.12.2015, 12:20 +0100 schrieb David Jander: > >> Hi Lucas, > >> > >> Thanks for reacting. > >> > >> On Thu, 17 Dec 2015 12:03:10 +0100 > >> Lucas Stach wrote: > >> >

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread Ulf Hansson
On 17 December 2015 at 12:27, Lucas Stach wrote: > Am Donnerstag, den 17.12.2015, 12:20 +0100 schrieb David Jander: >> Hi Lucas, >> >> Thanks for reacting. >> >> On Thu, 17 Dec 2015 12:03:10 +0100 >> Lucas Stach wrote: >> >> > Am Donnerstag, den 17.12.2015, 11:28 +0100 schrieb David Jander: >> >

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread Lucas Stach
Am Donnerstag, den 17.12.2015, 12:20 +0100 schrieb David Jander: > Hi Lucas, > > Thanks for reacting. > > On Thu, 17 Dec 2015 12:03:10 +0100 > Lucas Stach wrote: > > > Am Donnerstag, den 17.12.2015, 11:28 +0100 schrieb David Jander: > > > Hi all, > > > > > > I was investigating the source of

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread David Jander
Hi Lucas, Thanks for reacting. On Thu, 17 Dec 2015 12:03:10 +0100 Lucas Stach wrote: > Am Donnerstag, den 17.12.2015, 11:28 +0100 schrieb David Jander: > > Hi all, > > > > I was investigating the source of abnormal irq-latency spikes on an i.MX6 > > (ARM) board, and discovered this: > > > >

Re: SDHCI long sleep with interrupts off

2015-12-17 Thread Lucas Stach
Am Donnerstag, den 17.12.2015, 11:28 +0100 schrieb David Jander: > Hi all, > > I was investigating the source of abnormal irq-latency spikes on an i.MX6 > (ARM) board, and discovered this: > > # tracer: preemptirqsoff > # > # preemptirqsoff latency trace v1.1.5 on 4.4.0-rc4+ > #

SDHCI long sleep with interrupts off

2015-12-17 Thread David Jander
Hi all, I was investigating the source of abnormal irq-latency spikes on an i.MX6 (ARM) board, and discovered this: # tracer: preemptirqsoff # # preemptirqsoff latency trace v1.1.5 on 4.4.0-rc4+ # # latency: 2068 us, #4/4, CPU