Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-20 Thread Philip Rakity
I have no way to test this problem but I was thinking along the lines of --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1862,6 +1862,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 sdhci_runtime_pm_get(host); disable_irq(host->irq); + sdh

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-20 Thread Philip Rakity
Chris, The suggested fix can lock out interrupts for up to 150ms. There needs to be another way. So, I would strongly recommend we find another solution. Philip On Jan 17, 2014, at 7:57 PM, Andrew Bresticker wrote: > sdhci_execute_tuning() takes host->lock without disabling interrupts. > Us

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Chris Ball
Hi, On Sat, Jan 18 2014, Andrew Bresticker wrote: There's an existing patch for that... http://www.spinics.net/lists/arm-kernel/msg296596.html >>> >>> Ah, I see. Looks like it has yet to be picked up... >> >> The patches aren't quite identical -- Andrew's leaves the >> disable_irq() cal

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
On Fri, Jan 17, 2014 at 3:40 PM, Chris Ball wrote: > Hi, adding Aisheng, > > On Fri, Jan 17 2014, Andrew Bresticker wrote: >> On Fri, Jan 17, 2014 at 3:11 PM, John Tobias >> wrote: >>> There's an existing patch for that... >>> http://www.spinics.net/lists/arm-kernel/msg296596.html >> >> Ah, I se

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Chris Ball
Hi, adding Aisheng, On Fri, Jan 17 2014, Andrew Bresticker wrote: > On Fri, Jan 17, 2014 at 3:11 PM, John Tobias wrote: >> There's an existing patch for that... >> http://www.spinics.net/lists/arm-kernel/msg296596.html > > Ah, I see. Looks like it has yet to be picked up... The patches aren't q

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
On Fri, Jan 17, 2014 at 3:11 PM, John Tobias wrote: > There's an existing patch for that... > http://www.spinics.net/lists/arm-kernel/msg296596.html Ah, I see. Looks like it has yet to be picked up... > > On Fri, Jan 17, 2014 at 2:58 PM, Philip Rakity wrote: >> >> On Jan 17, 2014, at 7:57 PM,

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread John Tobias
There's an existing patch for that... http://www.spinics.net/lists/arm-kernel/msg296596.html On Fri, Jan 17, 2014 at 2:58 PM, Philip Rakity wrote: > > On Jan 17, 2014, at 7:57 PM, Andrew Bresticker wrote: > >> sdhci_execute_tuning() takes host->lock without disabling interrupts. >> Use spin_lock

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
On Fri, Jan 17, 2014 at 2:58 PM, Philip Rakity wrote: > > On Jan 17, 2014, at 7:57 PM, Andrew Bresticker wrote: > >> sdhci_execute_tuning() takes host->lock without disabling interrupts. >> Use spin_lock_irq{save,restore} instead so that we avoid taking an >> interrupt and scheduling while holdin

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Philip Rakity
On Jan 17, 2014, at 7:57 PM, Andrew Bresticker wrote: > sdhci_execute_tuning() takes host->lock without disabling interrupts. > Use spin_lock_irq{save,restore} instead so that we avoid taking an > interrupt and scheduling while holding host->lock. > > Signed-off-by: Andrew Bresticker > --- > d

[PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
sdhci_execute_tuning() takes host->lock without disabling interrupts. Use spin_lock_irq{save,restore} instead so that we avoid taking an interrupt and scheduling while holding host->lock. Signed-off-by: Andrew Bresticker --- drivers/mmc/host/sdhci.c | 13 +++-- 1 file changed, 7 insertio