linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3 lora-next 1/5] regmap: Add regmap_noinc_write API
       [not found] ` <1539361567-3602-2-git-send-email-ben.whitten@lairdtech.com>
@ 2018-10-18 16:59   ` Andreas Färber
  2018-10-18 17:18     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2018-10-18 16:59 UTC (permalink / raw)
  To: Ben Whitten, Mark Brown
  Cc: starnight, hasnain.virk, netdev, liuxuenetmail, shess,
	Ben Whitten, Greg Kroah-Hartman, Rafael J. Wysocki, linux-kernel,
	Stefan Rehm, linux-spi

Am 12.10.18 um 18:26 schrieb Ben Whitten:
> The regmap API had a noinc_read function added for instances where devices
> supported returning data from an internal FIFO in a single read.
> 
> This commit adds the noinc_write variant to allow writing to a non
> incrementing register, this is used in devices such as the sx1301 for
> loading firmware.
> 
> Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Mark, please take this one through your tree - I'll rebase the LoRa
parts on linux-next then.

Thanks,
Andreas

> ---
>  drivers/base/regmap/internal.h |  3 ++
>  drivers/base/regmap/regmap.c   | 77 ++++++++++++++++++++++++++++++++++++++++++
>  include/linux/regmap.h         | 19 +++++++++++
>  3 files changed, 99 insertions(+)
> 
> diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
> index a6bf34d63..404f123 100644
> --- a/drivers/base/regmap/internal.h
> +++ b/drivers/base/regmap/internal.h
> @@ -94,11 +94,13 @@ struct regmap {
>  	bool (*readable_reg)(struct device *dev, unsigned int reg);
>  	bool (*volatile_reg)(struct device *dev, unsigned int reg);
>  	bool (*precious_reg)(struct device *dev, unsigned int reg);
> +	bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
>  	bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
>  	const struct regmap_access_table *wr_table;
>  	const struct regmap_access_table *rd_table;
>  	const struct regmap_access_table *volatile_table;
>  	const struct regmap_access_table *precious_table;
> +	const struct regmap_access_table *wr_noinc_table;
>  	const struct regmap_access_table *rd_noinc_table;
>  
>  	int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
> @@ -183,6 +185,7 @@ bool regmap_writeable(struct regmap *map, unsigned int reg);
>  bool regmap_readable(struct regmap *map, unsigned int reg);
>  bool regmap_volatile(struct regmap *map, unsigned int reg);
>  bool regmap_precious(struct regmap *map, unsigned int reg);
> +bool regmap_writeable_noinc(struct regmap *map, unsigned int reg);
>  bool regmap_readable_noinc(struct regmap *map, unsigned int reg);
>  
>  int _regmap_write(struct regmap *map, unsigned int reg,
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 0360a90..d4f1fc6 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -168,6 +168,17 @@ bool regmap_precious(struct regmap *map, unsigned int reg)
>  	return false;
>  }
>  
> +bool regmap_writeable_noinc(struct regmap *map, unsigned int reg)
> +{
> +	if (map->writeable_noinc_reg)
> +		return map->writeable_noinc_reg(map->dev, reg);
> +
> +	if (map->wr_noinc_table)
> +		return regmap_check_range_table(map, reg, map->wr_noinc_table);
> +
> +	return true;
> +}
> +
>  bool regmap_readable_noinc(struct regmap *map, unsigned int reg)
>  {
>  	if (map->readable_noinc_reg)
> @@ -777,11 +788,13 @@ struct regmap *__regmap_init(struct device *dev,
>  	map->rd_table = config->rd_table;
>  	map->volatile_table = config->volatile_table;
>  	map->precious_table = config->precious_table;
> +	map->wr_noinc_table = config->wr_noinc_table;
>  	map->rd_noinc_table = config->rd_noinc_table;
>  	map->writeable_reg = config->writeable_reg;
>  	map->readable_reg = config->readable_reg;
>  	map->volatile_reg = config->volatile_reg;
>  	map->precious_reg = config->precious_reg;
> +	map->writeable_noinc_reg = config->writeable_noinc_reg;
>  	map->readable_noinc_reg = config->readable_noinc_reg;
>  	map->cache_type = config->cache_type;
>  
> @@ -1298,6 +1311,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
>  	map->readable_reg = config->readable_reg;
>  	map->volatile_reg = config->volatile_reg;
>  	map->precious_reg = config->precious_reg;
> +	map->writeable_noinc_reg = config->writeable_noinc_reg;
>  	map->readable_noinc_reg = config->readable_noinc_reg;
>  	map->cache_type = config->cache_type;
>  
> @@ -1898,6 +1912,69 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
>  EXPORT_SYMBOL_GPL(regmap_raw_write);
>  
>  /**
> + * regmap_noinc_write(): Write data from a register without incrementing the
> + *			register number
> + *
> + * @map: Register map to write to
> + * @reg: Register to write to
> + * @val: Pointer to data buffer
> + * @val_len: Length of output buffer in bytes.
> + *
> + * The regmap API usually assumes that bulk bus write operations will write a
> + * range of registers. Some devices have certain registers for which a write
> + * operation can write to an internal FIFO.
> + *
> + * The target register must be volatile but registers after it can be
> + * completely unrelated cacheable registers.
> + *
> + * This will attempt multiple writes as required to write val_len bytes.
> + *
> + * A value of zero will be returned on success, a negative errno will be
> + * returned in error cases.
> + */
> +int regmap_noinc_write(struct regmap *map, unsigned int reg,
> +		      const void *val, size_t val_len)
> +{
> +	size_t write_len;
> +	int ret;
> +
> +	if (!map->bus)
> +		return -EINVAL;
> +	if (!map->bus->write)
> +		return -ENOTSUPP;
> +	if (val_len % map->format.val_bytes)
> +		return -EINVAL;
> +	if (!IS_ALIGNED(reg, map->reg_stride))
> +		return -EINVAL;
> +	if (val_len == 0)
> +		return -EINVAL;
> +
> +	map->lock(map->lock_arg);
> +
> +	if (!regmap_volatile(map, reg) || !regmap_writeable_noinc(map, reg)) {
> +		ret = -EINVAL;
> +		goto out_unlock;
> +	}
> +
> +	while (val_len) {
> +		if (map->max_raw_write && map->max_raw_write < val_len)
> +			write_len = map->max_raw_write;
> +		else
> +			write_len = val_len;
> +		ret = _regmap_raw_write(map, reg, val, write_len);
> +		if (ret)
> +			goto out_unlock;
> +		val = ((u8 *)val) + write_len;
> +		val_len -= write_len;
> +	}
> +
> +out_unlock:
> +	map->unlock(map->lock_arg);
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(regmap_noinc_write);
> +
> +/**
>   * regmap_field_update_bits_base() - Perform a read/modify/write cycle a
>   *                                   register field.
>   *
> diff --git a/include/linux/regmap.h b/include/linux/regmap.h
> index 379505a..de04dc4 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -268,6 +268,13 @@ typedef void (*regmap_unlock)(void *);
>   *                field is NULL but precious_table (see below) is not, the
>   *                check is performed on such table (a register is precious if
>   *                it belongs to one of the ranges specified by precious_table).
> + * @writeable_noinc_reg: Optional callback returning true if the register
> + *			supports multiple write operations without incrementing
> + *			the register number. If this field is NULL but
> + *			wr_noinc_table (see below) is not, the check is
> + *			performed on such table (a register is no increment
> + *			writeable if it belongs to one of the ranges specified
> + *			by wr_noinc_table).
>   * @readable_noinc_reg: Optional callback returning true if the register
>   *			supports multiple read operations without incrementing
>   *			the register number. If this field is NULL but
> @@ -302,6 +309,7 @@ typedef void (*regmap_unlock)(void *);
>   * @rd_table:     As above, for read access.
>   * @volatile_table: As above, for volatile registers.
>   * @precious_table: As above, for precious registers.
> + * @wr_noinc_table: As above, for no increment writeable registers.
>   * @rd_noinc_table: As above, for no increment readable registers.
>   * @reg_defaults: Power on reset values for registers (for use with
>   *                register cache support).
> @@ -352,6 +360,7 @@ struct regmap_config {
>  	bool (*readable_reg)(struct device *dev, unsigned int reg);
>  	bool (*volatile_reg)(struct device *dev, unsigned int reg);
>  	bool (*precious_reg)(struct device *dev, unsigned int reg);
> +	bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
>  	bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
>  
>  	bool disable_locking;
> @@ -369,6 +378,7 @@ struct regmap_config {
>  	const struct regmap_access_table *rd_table;
>  	const struct regmap_access_table *volatile_table;
>  	const struct regmap_access_table *precious_table;
> +	const struct regmap_access_table *wr_noinc_table;
>  	const struct regmap_access_table *rd_noinc_table;
>  	const struct reg_default *reg_defaults;
>  	unsigned int num_reg_defaults;
> @@ -979,6 +989,8 @@ int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
>  int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
>  int regmap_raw_write(struct regmap *map, unsigned int reg,
>  		     const void *val, size_t val_len);
> +int regmap_noinc_write(struct regmap *map, unsigned int reg,
> +		     const void *val, size_t val_len);
>  int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
>  			size_t val_count);
>  int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
> @@ -1222,6 +1234,13 @@ static inline int regmap_raw_write_async(struct regmap *map, unsigned int reg,
>  	return -EINVAL;
>  }
>  
> +static inline int regmap_noinc_write(struct regmap *map, unsigned int reg,
> +				    const void *val, size_t val_len)
> +{
> +	WARN_ONCE(1, "regmap API is disabled");
> +	return -EINVAL;
> +}
> +
>  static inline int regmap_bulk_write(struct regmap *map, unsigned int reg,
>  				    const void *val, size_t val_count)
>  {
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH v3 lora-next 1/5] regmap: Add regmap_noinc_write API
  2018-10-18 16:59   ` [PATCH v3 lora-next 1/5] regmap: Add regmap_noinc_write API Andreas Färber
@ 2018-10-18 17:18     ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2018-10-18 17:18 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Ben Whitten, starnight, hasnain.virk, netdev, liuxuenetmail,
	shess, Ben Whitten, Greg Kroah-Hartman, Rafael J. Wysocki,
	linux-kernel, Stefan Rehm, linux-spi

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

On Thu, Oct 18, 2018 at 06:59:52PM +0200, Andreas Färber wrote:

> Mark, please take this one through your tree - I'll rebase the LoRa
> parts on linux-next then.

I don't have a copy of it, if I didn't apply it already and send a pull
request I probably got confused and thought I'd done that already, sorry
- can someone resend please?

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

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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
       [not found]     ` <d22f1f18-0c93-a537-a439-07363174a03b@suse.de>
@ 2018-12-30 10:55       ` Andreas Färber
  2018-12-31 13:27         ` Andreas Färber
  2018-12-31 17:50         ` Mark Brown
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Färber @ 2018-12-30 10:55 UTC (permalink / raw)
  To: Ben Whitten
  Cc: devicetree, David S. Miller, netdev, Michael Turquette,
	Stephen Boyd, linux-lpwan, linux-kernel, starnight, linux-clk,
	Mark Brown, linux-spi, Maxime Ripard, linux-arm-kernel

+ linux-spi, LAKML

Am 29.12.18 um 21:16 schrieb Andreas Färber:
> Am 29.12.18 um 20:25 schrieb Andreas Färber:
>> Am 12.10.18 um 18:26 schrieb Ben Whitten:
>>> +static int sx125x_register_clock_provider(struct sx125x_priv *priv)
>>> +{
>>> +	struct device *dev = priv->dev;
>>> +	struct clk_init_data init;
>>> +	const char *parent;
>>> +	int ret;
>>> +
>>> +	/* Disable CLKOUT */
>>> +	ret = sx125x_field_write(priv, F_CLK_OUT, 0);
>>> +	if (ret) {
>>> +		dev_err(dev, "unable to disable clkout\n");
>>> +		return ret;
>>> +	}
>>> +
>>> +	/* Register clock provider if expected in DTB */
>>> +	if (!of_find_property(dev->of_node, "#clock-cells", NULL))
>>> +		return 0;
>>> +
>>> +	dev_info(dev, "registering clkout\n");
>>> +
>>> +	parent = of_clk_get_parent_name(dev->of_node, 0);
>>> +	if (!parent) {
>>> +		dev_err(dev, "Unable to find parent clk\n");
>>> +		return -ENODEV;
[snip]
> `sudo ip link set lora2 up` froze my system, with both
> lora1 and lora2 being sx1301. [...]
> 
> Investigating...

I've bisected and confirmed that it was indeed this patch that regresses
for one of my SX1301 concentrators.

I noticed that this patch changed the behavior from writing the enable
bit only on one radio to also writing zero to the other. Default value
for the bit was enabled, so a functional change in theory. I therefore
tried enabling radio A clock output on the hanging one. However ...

I've posted a fix for our regmap_bus that lead to the sx125x writes not
taking effect. I.e., no clk_out was ever disabled. Otherwise only the
XOSC register writes were reordered compared to clock output enable, so
I spot no change to SX125x or SX130x registers that could cause this.

I've amended error handling and debug output (cf. below) and verified:

We never return from the sx125x_clkout_enable() performing the
regmap_field_write() on our regmap_bus, which in turn uses a SPI regmap
in sx1301_regmap_bus_read().

A notable difference between my two concentrators is that the working
one is using spi-gpio driver, the regressing one spi-sun6i.

Two things stood out in spi-sun6i: It uses a completion (I do not run
into its timeout warning!), and it uses clk_{get,set}_rate().

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?

Thanks,
Andreas

> [  473.605058] sx1301 spi0.0: SX1301 module probed
> [  474.394760] sx1301 spi1.0: SX1301 module probed
> [  485.637333] sx125x_con spi0.0-b: SX125x version: 21
> [  485.645801] sx125x_con spi0.0-b: registering clkout
> [  485.656684] sx125x_con spi0.0-b: SX125x module probed
> [  485.663789] sx125x_con spi0.0-a: SX125x version: 21
> [  485.677570] sx125x_con spi0.0-a: SX125x module probed
> [  485.685713] sx125x_con spi1.0-b: SX125x version: 21
> [  485.692210] sx125x_con spi1.0-b: registering clkout
> [  485.701712] sx125x_con spi1.0-b: SX125x module probed
> [  485.708067] sx125x_con spi1.0-a: SX125x version: 21
> [  485.718707] sx125x_con spi1.0-a: SX125x module probed
> [...]
> [ 4603.171814] sx125x_con spi0.0-b: enabling clkout
> [ 4603.697489] sx1301 spi0.0: AGC calibration firmware version 2
> [ 4603.703782] sx1301 spi0.0: starting calibration...
> [ 4606.030617] sx1301 spi0.0: AGC status: 87
> [ 4607.034555] sx1301 spi0.0: AGC firmware version 4
> [ 4607.039666] sx1301 spi0.0: ARB firmware version 1
> [...]
> [ 4628.196884] sx125x_con spi1.0-b: enabling clkout

[ 4096.183451] sx1301 spi1.0: sx1301_regmap_bus_read: radio B addr 0x10

There it does not return from its first SPI-backed regmap_write().

> [ 4968.763990] systemd[1]: systemd-udevd.service: State 'stop-sigterm'
> timed out. Killing.
> [ 4968.772167] systemd[1]: systemd-udevd.service: Killing process 455
> (systemd-udevd) with signal SIGKILL.
> [ 4968.782479] systemd[1]: systemd-logind.service: State 'stop-sigterm'
> timed out. Killing.
> [ 4968.790732] systemd[1]: systemd-logind.service: Killing process 642
> (systemd-logind) with signal SIGKILL.
> [ 5058.761523] systemd[1]: systemd-journald.service: State
> 'stop-sigabrt' timed out. Terminating.
> [ 5059.011507] systemd[1]: systemd-udevd.service: Processes still around
> after SIGKILL. Ignoring.
> [ 5059.021610] systemd[1]: systemd-logind.service: Processes still
> around after SIGKILL. Ignoring.
> [ 5149.009055] systemd[1]: systemd-journald.service: State
> 'stop-sigterm' timed out. Killing.
> [ 5149.017475] systemd[1]: systemd-journald.service: Killing process 440
> (systemd-journal) with signal SIGKILL.
> [ 5149.259029] systemd[1]: systemd-udevd.service: State
> 'stop-final-sigterm' timed out. Killing.
> [ 5259.871913] watchdog: BUG: soft lockup - CPU#3 stuck for 22s!
> [(md-udevd):4380]
> [ 5259.871918] watchdog: BUG: soft lockup - CPU#1 stuck for 22s!
> [(d-logind):4379]
> [ 5259.871926] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5259.879226] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5259.886531] CPU: 1 PID: 4379 Comm: (d-logind) Tainted: G           O
>      4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5259.967929] CPU: 3 PID: 4380 Comm: (md-udevd) Tainted: G           O
>      4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5260.049319] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5260.061466] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5260.073615] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5260.080389] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5260.087174] pc : smp_call_function_many+0x31c/0x370
> [ 5260.091944] pc : smp_call_function_many+0x31c/0x370
> [ 5260.096722] lr : smp_call_function_many+0x2d8/0x370
> [ 5260.101589] lr : smp_call_function_many+0x2d8/0x370
> [ 5260.106453] sp : ffff00000f11bc10
> [ 5260.111320] sp : ffff00000f123c10
> [ 5260.116187] x29: ffff00000f11bc10 x28: 0000000000000180
> [ 5260.119494] x29: ffff00000f123c10 x28: 0000000000000180
> [ 5260.122801] x27: ffff0000092cb380 x26: ffff80007ff8f3f8
> [ 5260.128101] x27: ffff0000092cb380 x26: ffff80007ffc13f8
> [ 5260.133400] x25: 0000000000000000 x24: ffff000008188608
> [ 5260.138701] x25: 0000000000000000 x24: ffff000008188608
> [ 5260.144001] x23: 0000000000000001 x22: ffff00000967a614
> [ 5260.149301] x23: 0000000000000001 x22: ffff00000967a614
> [ 5260.154601] x21: ffff000009679738 x20: ffff80007ff8f3c8
> [ 5260.159901] x21: ffff000009679738 x20: ffff80007ffc13c8
> [ 5260.165201] x19: ffff80007ff8f3c0 x18: 0000000000000000
> [ 5260.170501] x19: ffff80007ffc13c0 x18: ffff80007ffbdb80
> [ 5260.175800] x17: 0000000000000000 x16: 0000000000000000
> [ 5260.181100] x17: 0000000000000000 x16: ffff80007ffb1fe0
> [ 5260.186400] x15: 0000000000000000 x14: 0005006100000006
> [ 5260.191700] x15: 000000008287d0ce x14: 0000000026c4ee0b
> [ 5260.197000] x13: 0000000100010035 x12: 0140000000000000
> [ 5260.202299] x13: 000000003dddfe6f x12: 0000000021da966e
> [ 5260.207600] x11: 0040000000000001 x10: ffff0000017d2000
> [ 5260.212899] x11: 00000000c5ebf508 x10: 000000009b8ba2f7
> [ 5260.218199] x9 : 0000000000000000 x8 : 0000000000000006
> [ 5260.223499] x9 : 00000000644f2575 x8 : 0000000000000006
> [ 5260.228798] x7 : 0000000000000000 x6 : ffff80007ffcafe0
> [ 5260.234098] x7 : 0000000000000000 x6 : ffff7dffbffbfc40
> [ 5260.239399] x5 : ffff80007ffcafe0 x4 : 000000000000000d
> [ 5260.244698] x5 : ffff7dffbffbfc40 x4 : 0000000000000007
> [ 5260.249998] x3 : 0000000000000000 x2 : ffff80007ff7fff8
> [ 5260.255298] x3 : 0000000000000000 x2 : ffff7dffbff8dc58
> [ 5260.260598] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5260.265897] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5260.271197] Call trace:
> [ 5260.276496] Call trace:
> [ 5260.281799]  smp_call_function_many+0x31c/0x370
> [ 5260.284239]  smp_call_function_many+0x31c/0x370
> [ 5260.286680]  kick_all_cpus_sync+0x30/0x38
> [ 5260.291199]  kick_all_cpus_sync+0x30/0x38
> [ 5260.295722]  bpf_int_jit_compile+0x14c/0x420
> [ 5260.299720]  bpf_int_jit_compile+0x14c/0x420
> [ 5260.303721]  bpf_prog_select_runtime+0xec/0x138
> [ 5260.307979]  bpf_prog_select_runtime+0xec/0x138
> [ 5260.312243]  bpf_prepare_filter+0x468/0x520
> [ 5260.316760]  bpf_prepare_filter+0x468/0x520
> [ 5260.321280]  bpf_prog_create_from_user+0xe0/0x188
> [ 5260.325453]  bpf_prog_create_from_user+0xe0/0x188
> [ 5260.329628]  do_seccomp+0x2a0/0x6a0
> [ 5260.334319]  do_seccomp+0x2a0/0x6a0
> [ 5260.339012]  __arm64_sys_seccomp+0x28/0x38
> [ 5260.342492]  __arm64_sys_seccomp+0x28/0x38
> [ 5260.345974]  el0_svc_common+0x98/0x100
> [ 5260.350060]  el0_svc_common+0x98/0x100
> [ 5260.354145]  el0_svc_handler+0x38/0x78
> [ 5260.357885]  el0_svc_handler+0x38/0x78
> [ 5260.361625]  el0_svc+0x8/0xc
> [ 5260.365364]  el0_svc+0x8/0xc
> [ 5287.871131] watchdog: BUG: soft lockup - CPU#3 stuck for 22s!
> [(md-udevd):4380]
> [ 5287.871135] watchdog: BUG: soft lockup - CPU#1 stuck for 22s!
> [(d-logind):4379]
> [ 5287.871139] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5287.878433] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5287.885735] CPU: 1 PID: 4379 Comm: (d-logind) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5287.967133] CPU: 3 PID: 4380 Comm: (md-udevd) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5288.048523] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5288.060670] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5288.072819] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5288.079592] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5288.086367] pc : smp_call_function_many+0x31c/0x370
> [ 5288.091147] pc : smp_call_function_many+0x31c/0x370
> [ 5288.095925] lr : smp_call_function_many+0x2d8/0x370
> [ 5288.100791] lr : smp_call_function_many+0x2d8/0x370
> [ 5288.105656] sp : ffff00000f11bc10
> [ 5288.110522] sp : ffff00000f123c10
> [ 5288.115389] x29: ffff00000f11bc10 x28: 0000000000000180
> [ 5288.118696] x29: ffff00000f123c10 x28: 0000000000000180
> [ 5288.122003] x27: ffff0000092cb380 x26: ffff80007ff8f3f8
> [ 5288.127303] x27: ffff0000092cb380 x26: ffff80007ffc13f8
> [ 5288.132602] x25: 0000000000000000 x24: ffff000008188608
> [ 5288.137902] x25: 0000000000000000 x24: ffff000008188608
> [ 5288.143202] x23: 0000000000000001 x22: ffff00000967a614
> [ 5288.148501] x23: 0000000000000001 x22: ffff00000967a614
> [ 5288.153802] x21: ffff000009679738 x20: ffff80007ff8f3c8
> [ 5288.159101] x21: ffff000009679738 x20: ffff80007ffc13c8
> [ 5288.164401] x19: ffff80007ff8f3c0 x18: 0000000000000000
> [ 5288.169701] x19: ffff80007ffc13c0 x18: ffff80007ffbdb80
> [ 5288.175000] x17: 0000000000000000 x16: 0000000000000000
> [ 5288.180300] x17: 0000000000000000 x16: ffff80007ffb1fe0
> [ 5288.185600] x15: 0000000000000000 x14: 0005006100000006
> [ 5288.190899] x15: 000000008287d0ce x14: 0000000026c4ee0b
> [ 5288.196200] x13: 0000000100010035 x12: 0140000000000000
> [ 5288.201500] x13: 000000003dddfe6f x12: 0000000021da966e
> [ 5288.206801] x11: 0040000000000001 x10: ffff0000017d2000
> [ 5288.212100] x11: 00000000c5ebf508 x10: 000000009b8ba2f7
> [ 5288.217400] x9 : 0000000000000000 x8 : 0000000000000006
> [ 5288.222700] x9 : 00000000644f2575 x8 : 0000000000000006
> [ 5288.228001] x7 : 0000000000000000 x6 : ffff80007ffcafe0
> [ 5288.233301] x7 : 0000000000000000 x6 : ffff7dffbffbfc40
> [ 5288.238601] x5 : ffff80007ffcafe0 x4 : 000000000000000d
> [ 5288.243901] x5 : ffff7dffbffbfc40 x4 : 0000000000000007
> [ 5288.249200] x3 : 0000000000000000 x2 : ffff80007ff7fff8
> [ 5288.254501] x3 : 0000000000000000 x2 : ffff7dffbff8dc58
> [ 5288.259800] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5288.265100] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5288.270399] Call trace:
> [ 5288.275699] Call trace:
> [ 5288.281002]  smp_call_function_many+0x31c/0x370
> [ 5288.283442]  smp_call_function_many+0x31c/0x370
> [ 5288.285881]  kick_all_cpus_sync+0x30/0x38
> [ 5288.290401]  kick_all_cpus_sync+0x30/0x38
> [ 5288.294921]  bpf_int_jit_compile+0x14c/0x420
> [ 5288.298921]  bpf_int_jit_compile+0x14c/0x420
> [ 5288.302920]  bpf_prog_select_runtime+0xec/0x138
> [ 5288.307180]  bpf_prog_select_runtime+0xec/0x138
> [ 5288.311441]  bpf_prepare_filter+0x468/0x520
> [ 5288.315961]  bpf_prepare_filter+0x468/0x520
> [ 5288.320481]  bpf_prog_create_from_user+0xe0/0x188
> [ 5288.324654]  bpf_prog_create_from_user+0xe0/0x188
> [ 5288.328827]  do_seccomp+0x2a0/0x6a0
> [ 5288.333520]  do_seccomp+0x2a0/0x6a0
> [ 5288.338213]  __arm64_sys_seccomp+0x28/0x38
> [ 5288.341694]  __arm64_sys_seccomp+0x28/0x38
> [ 5288.345175]  el0_svc_common+0x98/0x100
> [ 5288.349262]  el0_svc_common+0x98/0x100
> [ 5288.353349]  el0_svc_handler+0x38/0x78
> [ 5288.357089]  el0_svc_handler+0x38/0x78
> [ 5288.360827]  el0_svc+0x8/0xc
> [ 5288.364567]  el0_svc+0x8/0xc
> [ 5315.870363] watchdog: BUG: soft lockup - CPU#3 stuck for 22s!
> [(md-udevd):4380]
> [ 5315.870367] watchdog: BUG: soft lockup - CPU#1 stuck for 22s!
> [(d-logind):4379]
> [ 5315.870371] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5315.877665] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5315.884967] CPU: 1 PID: 4379 Comm: (d-logind) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5315.966366] CPU: 3 PID: 4380 Comm: (md-udevd) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5316.047756] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5316.059904] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5316.072052] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5316.078826] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5316.085600] pc : smp_call_function_many+0x31c/0x370
> [ 5316.090379] pc : smp_call_function_many+0x31c/0x370
> [ 5316.095158] lr : smp_call_function_many+0x2d8/0x370
> [ 5316.100025] lr : smp_call_function_many+0x2d8/0x370
> [ 5316.104889] sp : ffff00000f11bc10
> [ 5316.109756] sp : ffff00000f123c10
> [ 5316.114623] x29: ffff00000f11bc10 x28: 0000000000000180
> [ 5316.117929] x29: ffff00000f123c10 x28: 0000000000000180
> [ 5316.121236] x27: ffff0000092cb380 x26: ffff80007ff8f3f8
> [ 5316.126536] x27: ffff0000092cb380 x26: ffff80007ffc13f8
> [ 5316.131835] x25: 0000000000000000 x24: ffff000008188608
> [ 5316.137135] x25: 0000000000000000 x24: ffff000008188608
> [ 5316.142435] x23: 0000000000000001 x22: ffff00000967a614
> [ 5316.147735] x23: 0000000000000001 x22: ffff00000967a614
> [ 5316.153035] x21: ffff000009679738 x20: ffff80007ff8f3c8
> [ 5316.158334] x21: ffff000009679738 x20: ffff80007ffc13c8
> [ 5316.163634] x19: ffff80007ff8f3c0 x18: 0000000000000000
> [ 5316.168934] x19: ffff80007ffc13c0 x18: ffff80007ffbdb80
> [ 5316.174234] x17: 0000000000000000 x16: 0000000000000000
> [ 5316.179533] x17: 0000000000000000 x16: ffff80007ffb1fe0
> [ 5316.184833] x15: 0000000000000000 x14: 0005006100000006
> [ 5316.190132] x15: 000000008287d0ce x14: 0000000026c4ee0b
> [ 5316.195432] x13: 0000000100010035 x12: 0140000000000000
> [ 5316.200732] x13: 000000003dddfe6f x12: 0000000021da966e
> [ 5316.206031] x11: 0040000000000001 x10: ffff0000017d2000
> [ 5316.211331] x11: 00000000c5ebf508 x10: 000000009b8ba2f7
> [ 5316.216630] x9 : 0000000000000000 x8 : 0000000000000006
> [ 5316.221930] x9 : 00000000644f2575 x8 : 0000000000000006
> [ 5316.227229] x7 : 0000000000000000 x6 : ffff80007ffcafe0
> [ 5316.232529] x7 : 0000000000000000 x6 : ffff7dffbffbfc40
> [ 5316.237829] x5 : ffff80007ffcafe0 x4 : 000000000000000d
> [ 5316.243128] x5 : ffff7dffbffbfc40 x4 : 0000000000000007
> [ 5316.248428] x3 : 0000000000000000 x2 : ffff80007ff7fff8
> [ 5316.253727] x3 : 0000000000000000 x2 : ffff7dffbff8dc58
> [ 5316.259027] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5316.264327] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5316.269626] Call trace:
> [ 5316.274926] Call trace:
> [ 5316.280228]  smp_call_function_many+0x31c/0x370
> [ 5316.282668]  smp_call_function_many+0x31c/0x370
> [ 5316.285107]  kick_all_cpus_sync+0x30/0x38
> [ 5316.289626]  kick_all_cpus_sync+0x30/0x38
> [ 5316.294146]  bpf_int_jit_compile+0x14c/0x420
> [ 5316.298145]  bpf_int_jit_compile+0x14c/0x420
> [ 5316.302144]  bpf_prog_select_runtime+0xec/0x138
> [ 5316.306405]  bpf_prog_select_runtime+0xec/0x138
> [ 5316.310665]  bpf_prepare_filter+0x468/0x520
> [ 5316.315185]  bpf_prepare_filter+0x468/0x520
> [ 5316.319705]  bpf_prog_create_from_user+0xe0/0x188
> [ 5316.323879]  bpf_prog_create_from_user+0xe0/0x188
> [ 5316.328051]  do_seccomp+0x2a0/0x6a0
> [ 5316.332744]  do_seccomp+0x2a0/0x6a0
> [ 5316.337438]  __arm64_sys_seccomp+0x28/0x38
> [ 5316.340918]  __arm64_sys_seccomp+0x28/0x38
> [ 5316.344400]  el0_svc_common+0x98/0x100
> [ 5316.348487]  el0_svc_common+0x98/0x100
> [ 5316.352573]  el0_svc_handler+0x38/0x78
> [ 5316.356313]  el0_svc_handler+0x38/0x78
> [ 5316.360051]  el0_svc+0x8/0xc
> [ 5316.363791]  el0_svc+0x8/0xc
> [ 5343.869595] watchdog: BUG: soft lockup - CPU#3 stuck for 22s!
> [(md-udevd):4380]
> [ 5343.869599] watchdog: BUG: soft lockup - CPU#1 stuck for 22s!
> [(d-logind):4379]
> [ 5343.869603] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5343.876897] Modules linked in: lora_sx125x(O) lora_sx1301(O)
> lora_sx128x(O) lora_sx1276(O) lora_rf1276ts(O) lora_mm002(O)
> lora_ting01m(O) lora_rak811(O) lora_usi(O) lora_wimod(O) lora_rn2483(O)
> lora_dev(O) nllora(O) lora(O) af_packet nls_iso8859_1 nls_cp437 vfat fat
> realtek aes_ce_blk crypto_simd cryptd dwmac_sun8i stmmac_platform
> snd_soc_simple_card snd_soc_spdif_tx snd_soc_simple_card_utils stmmac
> aes_ce_cipher snd_soc_core spi_sun6i mdio_mux ac97_bus snd_pcm_dmaengine
> snd_pcm sunxi_wdt snd_timer crct10dif_ce snd ghash_ce aes_arm64
> soundcore spi_gpio spi_bitbang uio_pdrv_genirq sha2_ce uio sha256_arm64
> sha1_ce btrfs libcrc32c xor zlib_deflate raid6_pq mmc_block
> ohci_platform ehci_platform ohci_hcd sunxi phy_generic ehci_hcd
> musb_hdrc i2c_mv64xxx udc_core usbcore phy_sun4i_usb sunxi_mmc mmc_core
> sun6i_dma axp20x_regulator axp20x_pek axp20x_rsb sunxi_rsb axp20x sg
> dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua
> [ 5343.884200] CPU: 1 PID: 4379 Comm: (d-logind) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5343.965599] CPU: 3 PID: 4380 Comm: (md-udevd) Tainted: G           O
> L    4.20.0-1.gba5c149-default #1 openSUSE Tumbleweed (unreleased)
> [ 5344.046990] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5344.059138] Hardware name: sunxi sunxi/sunxi, BIOS 2019.01-rc1 12/11/2018
> [ 5344.071286] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5344.078059] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [ 5344.084834] pc : smp_call_function_many+0x31c/0x370
> [ 5344.089614] pc : smp_call_function_many+0x31c/0x370
> [ 5344.094393] lr : smp_call_function_many+0x2d8/0x370
> [ 5344.099260] lr : smp_call_function_many+0x2d8/0x370
> [ 5344.104124] sp : ffff00000f11bc10
> [ 5344.108990] sp : ffff00000f123c10
> [ 5344.113858] x29: ffff00000f11bc10 x28: 0000000000000180
> [ 5344.117164] x29: ffff00000f123c10 x28: 0000000000000180
> [ 5344.120471] x27: ffff0000092cb380 x26: ffff80007ff8f3f8
> [ 5344.125771] x27: ffff0000092cb380 x26: ffff80007ffc13f8
> [ 5344.131071] x25: 0000000000000000 x24: ffff000008188608
> [ 5344.136371] x25: 0000000000000000 x24: ffff000008188608
> [ 5344.141670] x23: 0000000000000001 x22: ffff00000967a614
> [ 5344.146970] x23: 0000000000000001 x22: ffff00000967a614
> [ 5344.152270] x21: ffff000009679738 x20: ffff80007ff8f3c8
> [ 5344.157569] x21: ffff000009679738 x20: ffff80007ffc13c8
> [ 5344.162869] x19: ffff80007ff8f3c0 x18: 0000000000000000
> [ 5344.168169] x19: ffff80007ffc13c0 x18: ffff80007ffbdb80
> [ 5344.173469] x17: 0000000000000000 x16: 0000000000000000
> [ 5344.178768] x17: 0000000000000000 x16: ffff80007ffb1fe0
> [ 5344.184068] x15: 0000000000000000 x14: 0005006100000006
> [ 5344.189368] x15: 000000008287d0ce x14: 0000000026c4ee0b
> [ 5344.194668] x13: 0000000100010035 x12: 0140000000000000
> [ 5344.199967] x13: 000000003dddfe6f x12: 0000000021da966e
> [ 5344.205267] x11: 0040000000000001 x10: ffff0000017d2000
> [ 5344.210566] x11: 00000000c5ebf508 x10: 000000009b8ba2f7
> [ 5344.215866] x9 : 0000000000000000 x8 : 0000000000000006
> [ 5344.221165] x9 : 00000000644f2575 x8 : 0000000000000006
> [ 5344.226466] x7 : 0000000000000000 x6 : ffff80007ffcafe0
> [ 5344.231765] x7 : 0000000000000000 x6 : ffff7dffbffbfc40
> [ 5344.237065] x5 : ffff80007ffcafe0 x4 : 000000000000000d
> [ 5344.242365] x5 : ffff7dffbffbfc40 x4 : 0000000000000007
> [ 5344.247664] x3 : 0000000000000000 x2 : ffff80007ff7fff8
> [ 5344.252964] x3 : 0000000000000000 x2 : ffff7dffbff8dc58
> [ 5344.258265] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5344.263564] x1 : 0000000000000003 x0 : 0000000000000000
> [ 5344.268863] Call trace:
> [ 5344.274164] Call trace:
> [ 5344.279467]  smp_call_function_many+0x31c/0x370
> [ 5344.281907]  smp_call_function_many+0x31c/0x370
> [ 5344.284346]  kick_all_cpus_sync+0x30/0x38
> [ 5344.288865]  kick_all_cpus_sync+0x30/0x38
> [ 5344.293386]  bpf_int_jit_compile+0x14c/0x420
> [ 5344.297385]  bpf_int_jit_compile+0x14c/0x420
> [ 5344.301384]  bpf_prog_select_runtime+0xec/0x138
> [ 5344.305644]  bpf_prog_select_runtime+0xec/0x138
> [ 5344.309905]  bpf_prepare_filter+0x468/0x520
> [ 5344.314426]  bpf_prepare_filter+0x468/0x520
> [ 5344.318946]  bpf_prog_create_from_user+0xe0/0x188
> [ 5344.323118]  bpf_prog_create_from_user+0xe0/0x188
> [ 5344.327291]  do_seccomp+0x2a0/0x6a0
> [ 5344.331985]  do_seccomp+0x2a0/0x6a0
> [ 5344.336678]  __arm64_sys_seccomp+0x28/0x38
> [ 5344.340158]  __arm64_sys_seccomp+0x28/0x38
> [ 5344.343638]  el0_svc_common+0x98/0x100
> [ 5344.347725]  el0_svc_common+0x98/0x100
> [ 5344.351812]  el0_svc_handler+0x38/0x78
> [ 5344.355551]  el0_svc_handler+0x38/0x78
> [ 5344.359290]  el0_svc+0x8/0xc
> [ 5344.363030]  el0_svc+0x8/0xc
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
  2018-12-30 10:55       ` [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider Andreas Färber
@ 2018-12-31 13:27         ` Andreas Färber
  2018-12-31 17:50         ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2018-12-31 13:27 UTC (permalink / raw)
  To: Ben Whitten, linux-clk
  Cc: devicetree, Maxime Ripard, netdev, Michael Turquette,
	Stephen Boyd, linux-lpwan, linux-kernel, Mark Brown,
	Russell King, linux-spi, David S. Miller, linux-arm-kernel

Am 30.12.18 um 11:55 schrieb Andreas Färber:
> Am 29.12.18 um 21:16 schrieb Andreas Färber:
>> `sudo ip link set lora2 up` froze my system, with both
>> lora1 and lora2 being sx1301. [...]
>>
>> Investigating...
> 
> I've bisected and confirmed that it was indeed this patch that regresses
> for one of my SX1301 concentrators.
[...]
> We never return from the sx125x_clkout_enable() performing the
> regmap_field_write() on our regmap_bus, which in turn uses a SPI regmap
> in sx1301_regmap_bus_read().
> 
> A notable difference between my two concentrators is that the working
> one is using spi-gpio driver, the regressing one spi-sun6i.
> 
> Two things stood out in spi-sun6i: It uses a completion (I do not run
> into its timeout warning!), and it uses clk_{get,set}_rate().
> 
> Given that observed symptoms were CPU stalls, workqueue [freezes] 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've now hacked together a test case: delaying the regmap operation to a
work queue (violating the .enable contract of a stable clk on return!)
and having our caller poll afterwards for the operation to finish. Guess
what, below gross hack makes it work again on both cards... :/

Is this hinting at an issue with spi-sun6i clk_get_rate()'s prepare_lock
vs. our clk_enable()'s enable_lock? I grep'ed around and spi-sun6i is
not the only SPI driver using clk_get_rate() in transfer_one...

Thanks for any hints,

Andreas


diff --git a/drivers/net/lora/sx125x.c b/drivers/net/lora/sx125x.c
index 597b882379ac..095ca40e5de7 100644
--- a/drivers/net/lora/sx125x.c
+++ b/drivers/net/lora/sx125x.c
@@ -11,6 +11,7 @@

 #include <linux/clk.h>
 #include <linux/clk-provider.h>
+#include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -49,6 +50,9 @@ struct sx125x_priv {
        struct device           *dev;
        struct regmap           *regmap;
        struct regmap_field
*regmap_fields[ARRAY_SIZE(sx125x_regmap_fields)];
+
+       struct workqueue_struct *clk_wq;
+       struct work_struct      clk_out_enable_work;
 };

 #define to_clkout(_hw) container_of(_hw, struct sx125x_priv, clkout_hw)
@@ -81,8 +85,17 @@ static int sx125x_clkout_enable(struct clk_hw *hw)
 {
        struct sx125x_priv *priv = to_clkout(hw);

+       dev_info(priv->dev, "enabling clkout...\n");
+       queue_work(priv->clk_wq, &priv->clk_out_enable_work);
+       return 0;
+}
+
+static void sx125x_clk_out_enable_work_handler(struct work_struct *ws)
+{
+       struct sx125x_priv *priv = container_of(ws, struct sx125x_priv,
clk_out_enable_work);
+
        dev_info(priv->dev, "enabling clkout\n");
-       return sx125x_field_write(priv, F_CLK_OUT, 1);
+       sx125x_field_write(priv, F_CLK_OUT, 1);
 }

 static void sx125x_clkout_disable(struct clk_hw *hw)
@@ -230,6 +243,9 @@ static int __maybe_unused sx125x_regmap_probe(struct
device *dev, struct regmap
                }
        }

+       priv->clk_wq = alloc_workqueue("sx127x_wq", WQ_FREEZABLE |
WQ_MEM_RECLAIM, 0);
+       INIT_WORK(&priv->clk_out_enable_work,
sx125x_clk_out_enable_work_handler);
+
        dev_info(dev, "SX125x module probed\n");

        return 0;
@@ -237,6 +253,10 @@ static int __maybe_unused
sx125x_regmap_probe(struct device *dev, struct regmap

 static int __maybe_unused sx125x_regmap_remove(struct device *dev)
 {
+       struct sx125x_priv *priv = dev_get_drvdata(dev);
+
+       destroy_workqueue(priv->clk_wq);
+
        dev_info(dev, "SX125x module removed\n");

        return 0;
diff --git a/drivers/net/lora/sx130x.c b/drivers/net/lora/sx130x.c
index 7ac7de9eda46..4ae6699d38ad 100644
--- a/drivers/net/lora/sx130x.c
+++ b/drivers/net/lora/sx130x.c
@@ -11,6 +11,7 @@

 #include <linux/bitops.h>
 #include <linux/clk.h>
+#include <linux/clk-provider.h>
 #include <linux/delay.h>
 #include <linux/firmware.h>
 #include <linux/lora.h>
@@ -391,6 +392,10 @@ static int sx130x_loradev_open(struct net_device
*netdev)
                goto err_clk_enable;
        }

+       do {
+               usleep_range(100, 1000);
+       } while (!__clk_is_enabled(priv->clk32m));
+
        ret = sx130x_field_write(priv, F_GLOBAL_EN, 1);
        if (ret) {
                dev_err(priv->dev, "enable global clocks failed (%d)\n",
ret);


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
  2018-12-30 10:55       ` [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider Andreas Färber
  2018-12-31 13:27         ` Andreas Färber
@ 2018-12-31 17:50         ` Mark Brown
  2018-12-31 22:56           ` Andreas Färber
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2018-12-31 17:50 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Ben Whitten, devicetree, David S. Miller, netdev,
	Michael Turquette, Stephen Boyd, linux-lpwan, linux-kernel,
	starnight, linux-clk, linux-spi, Maxime Ripard, linux-arm-kernel

[-- 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 --]

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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
  2018-12-31 17:50         ` Mark Brown
@ 2018-12-31 22:56           ` Andreas Färber
  2019-01-02  0:44             ` Andreas Färber
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2018-12-31 22:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: Ben Whitten, devicetree, David S. Miller, netdev,
	Michael Turquette, Stephen Boyd, linux-lpwan, linux-kernel,
	starnight, linux-clk, linux-spi, Maxime Ripard, linux-arm-kernel,
	Russell King

Am 31.12.18 um 18:50 schrieb Mark Brown:
> On Sun, Dec 30, 2018 at 11:55:46AM +0100, Andreas Färber wrote:
>> 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).

We have .cache_type = REGCACHE_NONE on both bus and spi regmap_configs.

I moved the regmap_field_write() from .enable to .prepare and set
.fast_io = true on both regmap_configs to force using spinlocks, but
same hang as in .enable before...

And same if I set .disable_locking = true on both.

Given that it works with one SPI driver and not with the other,
independent of the locking options applied, I assume my symptoms are not
a regmap-layer issue.

Is it allowed during a .prepare operation to call the mentioned
clk_get_rate(), which ends up calling clk_prepare_lock()?

According to my debug output in spi-sun6i.c our hanging
regmap_field_write() ends up calling sun6i_transfer_one() three times,
the first two look okay, but the third one doesn't make it past the
clk_get_rate() or following if block. [But for now some fireworks...]

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
  2018-12-31 22:56           ` Andreas Färber
@ 2019-01-02  0:44             ` Andreas Färber
  2019-01-03 12:37               ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2019-01-02  0:44 UTC (permalink / raw)
  To: Mark Brown, linux-spi
  Cc: Ben Whitten, devicetree, linux-clk, Maxime Ripard, netdev,
	Michael Turquette, Stephen Boyd, linux-lpwan, linux-kernel,
	Russell King, starnight, David S. Miller, linux-arm-kernel

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

Am 31.12.18 um 23:56 schrieb Andreas Färber:
> Am 31.12.18 um 18:50 schrieb Mark Brown:
>> On Sun, Dec 30, 2018 at 11:55:46AM +0100, Andreas Färber wrote:
>>> 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).
> 
> We have .cache_type = REGCACHE_NONE on both bus and spi regmap_configs.
> 
> I moved the regmap_field_write() from .enable to .prepare and set
> .fast_io = true on both regmap_configs to force using spinlocks, but
> same hang as in .enable before...
> 
> And same if I set .disable_locking = true on both.
> 
> Given that it works with one SPI driver and not with the other,
> independent of the locking options applied, I assume my symptoms are not
> a regmap-layer issue.
> 
> Is it allowed during a .prepare operation to call the mentioned
> clk_get_rate(), which ends up calling clk_prepare_lock()?
> 
> According to my debug output in spi-sun6i.c our hanging
> regmap_field_write() ends up calling sun6i_transfer_one() three times,
> the first two look okay, but the third one doesn't make it past the
> clk_get_rate() [...].

SysRq still works in that state! Attached is SysRq-w output.
(still with .disable_locking = true in both regmap_configs)

In the very bottom you see the "ip" task, at wait_for_completion() from
__spi_sync().
I trigger this issue with `ip link set lora2 up`, so that looks okay.

Then there's a "spi1" task at clk_prepare_lock()' mutex_lock() coming
from spi_pump_messages().
The reason for that will be that clk_prepare_lock()'s mutex_trylock()
failed (because we're holding the prepare_lock from clk_prepare_enable()
in the "ip" task) and that the prepare_owner == current check fails for
this separate task_struct, too.

So, the third invocation of sun6i_transfer_one() calling clk_get_rate()
hangs at the prepare_lock instead of reference-counting, because it runs
from a separate kthread, unlike the two previous calls?

Besides, there's also an mmc_rescan workqueue task at clk_prepare_lock()
coming from sunxi_mmc_enable() due to pm_generic_runtime_resume().
My rootfs is on microSD card.

I did not find any *regmap_init_spi() based example in drivers/clk/, and
all other "spi" mentions in drivers/clk/ appeared to be clock names.
The closest was devm_regmap_init_i2c() based clk-cdce706.c, which uses
the prepare/unprepare ops, as suggested by Mark, and does
regmap_update_bits() from there.

A quick grep in drivers/i2c/ does not find any mention of "kthread", so
probably that's the breaking difference?

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

[-- Attachment #2: pinie-sysrq-w.txt --]
[-- Type: text/plain, Size: 12645 bytes --]

[39292.911444] sysrq: SysRq : Show Blocked State
[39292.915819]   task                        PC stack   pid father
[39292.921784] kworker/0:2     D    0   170      2 0x00000028
[39292.927282] Workqueue: ipv6_addrconf addrconf_verify_work
[39292.932676] Call trace:
[39292.935127]  __switch_to+0x9c/0xd8
[39292.938530]  __schedule+0x2a0/0x888
[39292.942016]  schedule+0x30/0x88
[39292.945157]  schedule_preempt_disabled+0x14/0x20
[39292.949770]  __mutex_lock.isra.1+0x2c0/0x4b8
[39292.954036]  __mutex_lock_slowpath+0x24/0x30
[39292.958302]  mutex_lock+0x48/0x50
[39292.961615]  rtnl_lock+0x1c/0x28
[39292.964841]  addrconf_verify_work+0x14/0x28
[39292.969022]  process_one_work+0x1f4/0x428
[39292.973028]  worker_thread+0x44/0x4a8
[39292.976686]  kthread+0x130/0x138
[39292.979912]  ret_from_fork+0x10/0x18
[39292.983518] btrfs-transacti D    0   383      2 0x00000028
[39292.988998] Call trace:
[39292.991444]  __switch_to+0x9c/0xd8
[39292.994845]  __schedule+0x2a0/0x888
[39292.998330]  schedule+0x30/0x88
[39293.001472]  io_schedule+0x20/0x40
[39293.004874]  wbt_wait+0x1bc/0x2f8
[39293.008188]  rq_qos_throttle+0x4c/0x68
[39293.011936]  blk_mq_make_request+0xc4/0x4f0
[39293.016118]  generic_make_request+0xf4/0x308
[39293.020384]  submit_bio+0x40/0x198
[39293.023977]  btrfs_map_bio+0x370/0x3f8 [btrfs]
[39293.028550]  btrfs_submit_bio_hook+0xa4/0x1c0 [btrfs]
[39293.033727]  submit_one_bio+0x78/0xb8 [btrfs]
[39293.038211]  flush_write_bio.isra.12+0x2c/0x48 [btrfs]
[39293.043477]  extent_writepages+0x60/0x70 [btrfs]
[39293.048217]  btrfs_writepages+0x28/0x38 [btrfs]
[39293.052747]  do_writepages+0x3c/0xe0
[39293.056323]  __filemap_fdatawrite_range+0xc0/0x118
[39293.061109]  filemap_fdatawrite_range+0x38/0x48
[39293.065764]  btrfs_fdatawrite_range+0x34/0x78 [btrfs]
[39293.070942]  __btrfs_write_out_cache+0x400/0x450 [btrfs]
[39293.076382]  btrfs_write_out_cache+0xc0/0x160 [btrfs]
[39293.081551]  btrfs_start_dirty_block_groups+0x2dc/0x4d0 [btrfs]
[39293.087591]  btrfs_commit_transaction+0x554/0x940 [btrfs]
[39293.093111]  transaction_kthread+0x18c/0x1a8 [btrfs]
[39293.098072]  kthread+0x130/0x138
[39293.101298]  ret_from_fork+0x10/0x18
[39293.104877] systemd-journal D    0   448      1 0x00000801
[39293.110358] Call trace:
[39293.112803]  __switch_to+0x9c/0xd8
[39293.116204]  __schedule+0x2a0/0x888
[39293.119690]  schedule+0x30/0x88
[39293.122830]  io_schedule+0x20/0x40
[39293.126230]  wait_on_page_bit+0x134/0x240
[39293.130366]  btrfs_page_mkwrite+0x1e0/0x450 [btrfs]
[39293.135240]  do_page_mkwrite+0x40/0xb0
[39293.138985]  do_wp_page+0x3d0/0x578
[39293.142471]  __handle_mm_fault+0x484/0x528
[39293.146563]  handle_mm_fault+0x10c/0x1e8
[39293.150484]  do_page_fault+0x174/0x480
[39293.154229]  do_mem_abort+0x50/0xa8
[39293.157713]  el0_da+0x20/0x24
[39293.160676] journal-offline D    0 23928      1 0x00000801
[39293.166156] Call trace:
[39293.168601]  __switch_to+0x9c/0xd8
[39293.172002]  __schedule+0x2a0/0x888
[39293.175487]  schedule+0x30/0x88
[39293.178626]  io_schedule+0x20/0x40
[39293.182025]  wbt_wait+0x1bc/0x2f8
[39293.185338]  rq_qos_throttle+0x4c/0x68
[39293.189085]  blk_mq_make_request+0xc4/0x4f0
[39293.193266]  generic_make_request+0xf4/0x308
[39293.197533]  submit_bio+0x40/0x198
[39293.201064]  btrfs_map_bio+0x370/0x3f8 [btrfs]
[39293.205632]  btrfs_submit_bio_hook+0xa4/0x1c0 [btrfs]
[39293.210808]  submit_one_bio+0x78/0xb8 [btrfs]
[39293.215292]  submit_extent_page+0xcc/0x218 [btrfs]
[39293.220209]  __extent_writepage_io+0x230/0x3e8 [btrfs]
[39293.225472]  __extent_writepage+0x114/0x2e0 [btrfs]
[39293.230476]  extent_write_cache_pages+0xec/0x328 [btrfs]
[39293.235912]  extent_writepages+0x54/0x70 [btrfs]
[39293.240651]  btrfs_writepages+0x28/0x38 [btrfs]
[39293.245179]  do_writepages+0x3c/0xe0
[39293.248751]  __filemap_fdatawrite_range+0xc0/0x118
[39293.253538]  filemap_fdatawrite_range+0x38/0x48
[39293.258194]  btrfs_fdatawrite_range+0x34/0x78 [btrfs]
[39293.263368]  start_ordered_ops+0x4c/0x80 [btrfs]
[39293.268110]  btrfs_sync_file+0x88/0x3e0 [btrfs]
[39293.272640]  vfs_fsync_range+0x4c/0x88
[39293.276385]  do_fsync+0x48/0x88
[39293.279525]  __arm64_sys_fsync+0x24/0x38
[39293.283446]  el0_svc_common+0x98/0x100
[39293.287192]  el0_svc_handler+0x38/0x78
[39293.290936]  el0_svc+0x8/0xc
[39293.293829] wickedd         D    0   713      1 0x00000000
[39293.299309] Call trace:
[39293.301755]  __switch_to+0x9c/0xd8
[39293.305155]  __schedule+0x2a0/0x888
[39293.308641]  schedule+0x30/0x88
[39293.311781]  schedule_preempt_disabled+0x14/0x20
[39293.316394]  __mutex_lock.isra.1+0x2c0/0x4b8
[39293.320661]  __mutex_lock_slowpath+0x24/0x30
[39293.324927]  mutex_lock+0x48/0x50
[39293.328243]  __netlink_dump_start+0x7c/0x1d8
[39293.332511]  rtnetlink_rcv_msg+0x280/0x2c0
[39293.336604]  netlink_rcv_skb+0x60/0x120
[39293.340437]  rtnetlink_rcv+0x28/0x38
[39293.344010]  netlink_unicast+0x1a8/0x280
[39293.347928]  netlink_sendmsg+0x188/0x338
[39293.351848]  sock_sendmsg+0x4c/0x68
[39293.355333]  ___sys_sendmsg+0x26c/0x2a0
[39293.359165]  __sys_sendmsg+0x64/0xa0
[39293.362736]  __arm64_sys_sendmsg+0x2c/0x38
[39293.366829]  el0_svc_common+0x98/0x100
[39293.370575]  el0_svc_handler+0x38/0x78
[39293.374320]  el0_svc+0x8/0xc
[39293.377201] ntpd            D    0  1354      1 0x00000001
[39293.382681] Call trace:
[39293.385126]  __switch_to+0x9c/0xd8
[39293.388526]  __schedule+0x2a0/0x888
[39293.392012]  schedule+0x30/0x88
[39293.395151]  schedule_preempt_disabled+0x14/0x20
[39293.399764]  __mutex_lock.isra.1+0x2c0/0x4b8
[39293.404029]  __mutex_lock_slowpath+0x24/0x30
[39293.408296]  mutex_lock+0x48/0x50
[39293.411610]  __netlink_dump_start+0x7c/0x1d8
[39293.415876]  rtnetlink_rcv_msg+0x280/0x2c0
[39293.419969]  netlink_rcv_skb+0x60/0x120
[39293.423801]  rtnetlink_rcv+0x28/0x38
[39293.427374]  netlink_unicast+0x1a8/0x280
[39293.431294]  netlink_sendmsg+0x188/0x338
[39293.435211]  sock_sendmsg+0x4c/0x68
[39293.438694]  __sys_sendto+0xe8/0x150
[39293.442266]  __arm64_sys_sendto+0x30/0x40
[39293.446272]  el0_svc_common+0x98/0x100
[39293.450018]  el0_svc_handler+0x38/0x78
[39293.453762]  el0_svc+0x8/0xc
[39293.456670] kworker/2:1     D    0 23762      2 0x00000028
[39293.462197] Workqueue: events_freezable mmc_rescan [mmc_core]
[39293.467936] Call trace:
[39293.470381]  __switch_to+0x9c/0xd8
[39293.473781]  __schedule+0x2a0/0x888
[39293.477267]  schedule+0x30/0x88
[39293.480406]  schedule_preempt_disabled+0x14/0x20
[39293.485019]  __mutex_lock.isra.1+0x2c0/0x4b8
[39293.489285]  __mutex_lock_slowpath+0x24/0x30
[39293.493551]  mutex_lock+0x48/0x50
[39293.496865]  clk_prepare_lock+0x48/0xa0
[39293.500699]  clk_prepare+0x24/0x58
[39293.504105]  sunxi_mmc_enable+0x40/0x220 [sunxi_mmc]
[39293.509067]  sunxi_mmc_runtime_resume+0x2c/0x70 [sunxi_mmc]
[39293.514637]  pm_generic_runtime_resume+0x3c/0x58
[39293.519251]  __rpm_callback+0x118/0x208
[39293.523082]  rpm_callback+0x70/0x98
[39293.526567]  rpm_resume+0x65c/0x840
[39293.530052]  __pm_runtime_resume+0x68/0xc8
[39293.534182]  __mmc_claim_host+0x200/0x260 [mmc_core]
[39293.539178]  mmc_get_card+0x38/0x48 [mmc_core]
[39293.543656]  mmc_sd_detect+0x24/0x90 [mmc_core]
[39293.548219]  mmc_rescan+0x3d0/0x540 [mmc_core]
[39293.552659]  process_one_work+0x1f4/0x428
[39293.556665]  worker_thread+0x44/0x4a8
[39293.560323]  kthread+0x130/0x138
[39293.563549]  ret_from_fork+0x10/0x18
[39293.567122] kworker/u8:5    D    0 23778      2 0x00000028
[39293.572608] Workqueue: writeback wb_workfn (flush-btrfs-1)
[39293.578087] Call trace:
[39293.580533]  __switch_to+0x9c/0xd8
[39293.583933]  __schedule+0x2a0/0x888
[39293.587419]  schedule+0x30/0x88
[39293.590557]  io_schedule+0x20/0x40
[39293.593956]  wbt_wait+0x1bc/0x2f8
[39293.597269]  rq_qos_throttle+0x4c/0x68
[39293.601016]  blk_mq_make_request+0xc4/0x4f0
[39293.605196]  generic_make_request+0xf4/0x308
[39293.609461]  submit_bio+0x40/0x198
[39293.612995]  btrfs_map_bio+0x370/0x3f8 [btrfs]
[39293.617563]  btrfs_submit_bio_hook+0xa4/0x1c0 [btrfs]
[39293.622743]  submit_one_bio+0x78/0xb8 [btrfs]
[39293.627227]  submit_extent_page+0xcc/0x218 [btrfs]
[39293.632142]  __extent_writepage_io+0x230/0x3e8 [btrfs]
[39293.637405]  __extent_writepage+0x114/0x2e0 [btrfs]
[39293.642411]  extent_write_cache_pages+0xec/0x328 [btrfs]
[39293.647849]  extent_writepages+0x54/0x70 [btrfs]
[39293.652590]  btrfs_writepages+0x28/0x38 [btrfs]
[39293.657118]  do_writepages+0x3c/0xe0
[39293.660691]  __writeback_single_inode+0x48/0x438
[39293.665304]  writeback_sb_inodes+0x1c8/0x478
[39293.669570]  __writeback_inodes_wb+0x78/0xc8
[39293.673835]  wb_writeback+0x264/0x388
[39293.677494]  wb_workfn+0x304/0x4a8
[39293.680893]  process_one_work+0x1f4/0x428
[39293.684898]  worker_thread+0x44/0x4a8
[39293.688555]  kthread+0x130/0x138
[39293.691781]  ret_from_fork+0x10/0x18
[39293.695354] spi1            D    0 23857      2 0x00000028
[39293.700834] Call trace:
[39293.703280]  __switch_to+0x9c/0xd8
[39293.706680]  __schedule+0x2a0/0x888
[39293.710165]  schedule+0x30/0x88
[39293.713305]  schedule_preempt_disabled+0x14/0x20
[39293.717918]  __mutex_lock.isra.1+0x2c0/0x4b8
[39293.722183]  __mutex_lock_slowpath+0x24/0x30
[39293.726450]  mutex_lock+0x48/0x50
[39293.729763]  clk_prepare_lock+0x48/0xa0
[39293.733597]  clk_core_get_rate+0x1c/0x78
[39293.737515]  clk_get_rate+0x28/0x38
[39293.741006]  sun6i_spi_transfer_one+0x150/0x4a0 [spi_sun6i]
[39293.746575]  spi_transfer_one_message+0x150/0x648
[39293.751274]  __spi_pump_messages+0x424/0x6f0
[39293.755541]  spi_pump_messages+0x24/0x30
[39293.759460]  kthread_worker_fn+0xf0/0x1f8
[39293.763465]  kthread+0x130/0x138
[39293.766691]  ret_from_fork+0x10/0x18
[39293.770266] kworker/u8:8    D    0 23923      2 0x00000028
[39293.775882] Workqueue: btrfs-submit btrfs_submit_helper [btrfs]
[39293.781793] Call trace:
[39293.784240]  __switch_to+0x9c/0xd8
[39293.787640]  __schedule+0x2a0/0x888
[39293.791126]  schedule+0x30/0x88
[39293.794301]  __mmc_claim_host+0xa8/0x260 [mmc_core]
[39293.799210]  mmc_get_card+0x38/0x48 [mmc_core]
[39293.803658]  mmc_mq_queue_rq+0x220/0x308 [mmc_block]
[39293.808619]  __blk_mq_try_issue_directly+0x120/0x190
[39293.813580]  blk_mq_request_issue_directly+0x94/0xc0
[39293.818539]  blk_mq_try_issue_list_directly+0x40/0x98
[39293.823585]  blk_mq_sched_insert_requests+0x98/0xc0
[39293.828458]  blk_mq_flush_plug_list+0x184/0x298
[39293.832984]  blk_flush_plug_list+0xd8/0x250
[39293.837164]  blk_finish_plug+0x3c/0x4c
[39293.841042]  run_scheduled_bios+0x2e4/0x408 [btrfs]
[39293.846045]  pending_bios_fn+0x20/0x30 [btrfs]
[39293.850615]  normal_work_helper+0x200/0x470 [btrfs]
[39293.855619]  btrfs_submit_helper+0x20/0x30 [btrfs]
[39293.860406]  process_one_work+0x1f4/0x428
[39293.864411]  worker_thread+0x44/0x4a8
[39293.868068]  kthread+0x130/0x138
[39293.871294]  ret_from_fork+0x10/0x18
[39293.874866] ip              D    0 23925  23924 0x00000000
[39293.880346] Call trace:
[39293.882792]  __switch_to+0x9c/0xd8
[39293.886193]  __schedule+0x2a0/0x888
[39293.889679]  schedule+0x30/0x88
[39293.892817]  schedule_timeout+0x2c4/0x408
[39293.896823]  wait_for_common+0xdc/0x1a8
[39293.900656]  wait_for_completion+0x28/0x38
[39293.904750]  __spi_sync+0x148/0x388
[39293.908235]  spi_sync+0x34/0x58
[39293.911375]  regmap_spi_write+0x84/0x98
[39293.915210]  _regmap_raw_write_impl+0x794/0x8d8
[39293.919737]  _regmap_bus_raw_write+0x70/0x90
[39293.924003]  _regmap_write+0x70/0x128
[39293.927662]  regmap_write+0x50/0x78
[39293.931155]  sx130x_radio_read+0x94/0x270 [lora_sx130x]
[39293.936375]  _regmap_raw_read+0xd0/0x248
[39293.940295]  _regmap_bus_read+0x50/0x88
[39293.944127]  _regmap_read+0x6c/0x170
[39293.947700]  _regmap_update_bits+0xa4/0xf0
[39293.951793]  regmap_update_bits_base+0x68/0x98
[39293.956233]  regmap_field_update_bits_base+0x5c/0x70
[39293.961195]  sx125x_clkout_prepare+0x44/0x50 [lora_sx125x]
[39293.966674]  clk_core_prepare+0x64/0x1d8
[39293.970593]  clk_prepare+0x2c/0x58
[39293.973995]  sx130x_loradev_open+0x58/0x738 [lora_sx130x]
[39293.979388]  __dev_open+0xd8/0x178
[39293.982788]  __dev_change_flags+0x134/0x198
[39293.986968]  dev_change_flags+0x34/0x70
[39293.990800]  do_setlink+0x2a8/0xbb8
[39293.994287]  rtnl_newlink+0x408/0x768
[39293.997945]  rtnetlink_rcv_msg+0x20c/0x2c0
[39294.002038]  netlink_rcv_skb+0x60/0x120
[39294.005870]  rtnetlink_rcv+0x28/0x38
[39294.009443]  netlink_unicast+0x1a8/0x280
[39294.013363]  netlink_sendmsg+0x188/0x338
[39294.017281]  sock_sendmsg+0x4c/0x68
[39294.020766]  ___sys_sendmsg+0x26c/0x2a0
[39294.024598]  __sys_sendmsg+0x64/0xa0
[39294.028170]  __arm64_sys_sendmsg+0x2c/0x38
[39294.032263]  el0_svc_common+0x98/0x100
[39294.036009]  el0_svc_handler+0x38/0x78
[39294.039753]  el0_svc+0x8/0xc


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

* Re: [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider
  2019-01-02  0:44             ` Andreas Färber
@ 2019-01-03 12:37               ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2019-01-03 12:37 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Ben Whitten, devicetree, David S. Miller, Maxime Ripard, netdev,
	Michael Turquette, Stephen Boyd, linux-lpwan, linux-spi,
	linux-arm-kernel, Russell King, starnight, linux-clk,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]

On Wed, Jan 02, 2019 at 01:44:40AM +0100, Andreas Färber wrote:

> So, the third invocation of sun6i_transfer_one() calling clk_get_rate()
> hangs at the prepare_lock instead of reference-counting, because it runs
> from a separate kthread, unlike the two previous calls?

If there's any contestation for the bus we push all the I/O through a
separate thread to maintain ordering and improve performance.

> I did not find any *regmap_init_spi() based example in drivers/clk/, and
> all other "spi" mentions in drivers/clk/ appeared to be clock names.
> The closest was devm_regmap_init_i2c() based clk-cdce706.c, which uses
> the prepare/unprepare ops, as suggested by Mark, and does
> regmap_update_bits() from there.

You'll find a bunch of the MFDs have SPI options as well.

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-01-03 12:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1539361567-3602-1-git-send-email-ben.whitten@lairdtech.com>
     [not found] ` <1539361567-3602-2-git-send-email-ben.whitten@lairdtech.com>
2018-10-18 16:59   ` [PATCH v3 lora-next 1/5] regmap: Add regmap_noinc_write API Andreas Färber
2018-10-18 17:18     ` Mark Brown
     [not found] ` <1539361567-3602-6-git-send-email-ben.whitten@lairdtech.com>
     [not found]   ` <a89c7974-672f-e5d0-8022-d2c2f9ffeac0@suse.de>
     [not found]     ` <d22f1f18-0c93-a537-a439-07363174a03b@suse.de>
2018-12-30 10:55       ` [PATCH v3 lora-next 5/5] net: lora: sx125x sx1301: allow radio to register as a clk provider Andreas Färber
2018-12-31 13:27         ` Andreas Färber
2018-12-31 17:50         ` Mark Brown
2018-12-31 22:56           ` Andreas Färber
2019-01-02  0:44             ` Andreas Färber
2019-01-03 12:37               ` Mark Brown

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).