On Wed, Jul 21, 2021 at 06:47:01AM +0000, Sa, Nuno wrote: > > To: Tachici, Alexandru ; linux- > > kernel@vger.kernel.org; linux-spi@vger.kernel.org > > Cc: Mark Brown ; nsaenz@kernel.org; > > f.fainelli@gmail.com; rjui@broadcom.com; swarren@wwwdotorg.org; > > bcm-kernel-feedback-list@broadcom.com; bootc@bootc.net; Sa, > > Nuno > > Subject: Re: [PATCH 0/1] spi: spi-bcm2835: Fix deadlock Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material. > I'm really curious about this one and how should we proceed. Maybe this is not > new (just to me) and the way to go is just to "fix" the spi controller when we hit the > issue? I'm asking this because there's a more fundamental problem when this pieces > align together (CCF + SPI). What I mean is that this can potentially happen in every > system that happens to have a spi based clock provider and in which the spi controller > tries to access the CCF in the spi transfer function... Doing a quick and short look I can > already see that [1], [2], [3] and [4] could hit the same deadlock... The clock API just doesn't work very well for things on buses that might sleep, I2C is another example - it's a long standing general issue that needs to be addressed in the clock framework for example with finer grained locking but nobody has come up with anything yet.