Devicetree
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Ben Whitten <ben.whitten@gmail.com>,
	devicetree <devicetree@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	"linux-lpwan@lists.infradead.org"
	<linux-lpwan@lists.infradead.org>,
	linux-kernel@vger.kernel.org, starnight@g.ncu.edu.tw,
	linux-clk <linux-clk@vger.kernel.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
Date: Mon, 31 Dec 2018 17:50:34 +0000	[thread overview]
Message-ID: <20181231175034.GI1846@sirena.org.uk> (raw)
In-Reply-To: <491d1a46-c112-1106-9f25-14149f0dcbd0@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

On Sun, Dec 30, 2018 at 11:55:46AM +0100, Andreas Färber wrote:
> + linux-spi, LAKML

> Given that observed symptoms were CPU stalls, workqueue hangs and RCU
> problems, requiring a power-cycle to recover, I wonder whether we are
> running into some atomic/locking issue with clk_enable()? Is it valid at
> all to use SPI/regmap for clk_enable()? If it is, is there a known issue
> specific to spi-sun6i (A64) in 4.20.0?
> I already tried setting .disable_locking = true in both regmap_configs.
> Any suggestions how to further debug?

You can't use SPI for clk_enable(), clk_enable() needs to be doable in
atomic context since we need to wait for the bus operations to complete
(you can start SPI transfers in atomic context but you still need to
wait for them to complete).  Any clocks that are only accessible via a
slow bus like I2C or SPI need to do the enable/disable in the
prepare/unprepare operations which aren't done in atomic context.

regmap can be used in atomic contexts, though you need to configure it
to use spinlocks instead of mutexes and ensure that no register cache
allocations happen during I/O (eg, by providing defaults for all
registers or by not using a cache).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2018-12-31 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1539361567-3602-1-git-send-email-ben.whitten@lairdtech.com>
     [not found] ` <1539361567-3602-6-git-send-email-ben.whitten@lairdtech.com>
2018-12-29 19:25   ` [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider Andreas Färber
2018-12-29 20:16     ` Andreas Färber
2018-12-30 10:55       ` Andreas Färber
2018-12-31 13:27         ` Andreas Färber
2018-12-31 17:50         ` Mark Brown [this message]
2018-12-31 22:56           ` Andreas Färber
2019-01-02  0:44             ` Andreas Färber
2019-01-03 12:37               ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181231175034.GI1846@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=afaerber@suse.de \
    --cc=ben.whitten@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-lpwan@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=starnight@g.ncu.edu.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox