Skip to contentSkip to conversation

reset: sunxi: fix spinlock initialization

PATCH RESEND Superseded Tyler Baker 5 participants 6 messages Jan 12, 2015 – Jan 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

---
 drivers/reset/reset-sunxi.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/reset/reset-sunxi.c +4 -0
index eebc52c..3d95c87 100644
@@ -102,6 +102,8 @@ static int sunxi_reset_init(struct device_node *np)
 		goto err_alloc;
 	}
 
+	spin_lock_init(&data->lock);
+
 	data->rcdev.owner = THIS_MODULE;
 	data->rcdev.nr_resets = size * 32;
 	data->rcdev.ops = &sunxi_reset_ops;
@@ -157,6 +159,8 @@ static int sunxi_reset_probe(struct platform_device *pdev)
 	if (IS_ERR(data->membase))
 		return PTR_ERR(data->membase);
 
+	spin_lock_init(&data->lock);
+
 	data->rcdev.owner = THIS_MODULE;
 	data->rcdev.nr_resets = resource_size(res) * 32;
 	data->rcdev.ops = &sunxi_reset_ops;
Signature · 1 line
2.1.3
#1 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

Quoted 7 lines · Tyler Baker

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

Quoted 5 lines

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150112/47c3ad47/attachment.sig>
#2 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

Quoted 8 lines · Maxime Ripard
Quoted 7 lines · Tyler Baker

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

Quoted 7 lines
Quoted 5 lines

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Not entirely sure what to do with this one. You sent it to:arm at kernel.org, but it should probably have gone to Philipp?

We can pick it up with an ack from him though, no problem.

-Olof

#3 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

Quoted 12 lines · Olof Johansson
Quoted 11 lines · Maxime Ripard
Quoted 10 lines · Tyler Baker

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Not entirely sure what to do with this one. You sent it to:arm at kernel.org, but it should probably have gone to Philipp?

Apologies, that was my copy and paste error.

Quoted 2 lines

We can pick it up with an ack from him though, no problem.

Philipp is on CC so I'll let him decide, otherwise I can resend if needed.

Quoted 3 lines

-Olof

Sorry for any confusion.

Signature · 5 lines
Tyler Baker
Tech Lead, LAVA
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
maintainer
#4 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

In reply to Olof Johansson

Hi,

Am Montag, den 12.01.2015, 14:13 -0800 schrieb Olof Johansson:

Quoted 15 lines · Maxime Ripard
Quoted 14 lines · Tyler Baker
Quoted 12 lines

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

[1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Quoted 6 lines
Quoted 1 line

Not entirely sure what to do with this one. You sent it to:arm at kernel.org, but it should probably have gone to Philipp?

We can pick it up with an ack from him though, no problem.

I have applied the patch here:

    git://git.pengutronix.de/git/pza/linux reset/for_v3.19

I was going to send a pull request tonight, but since I don't have any other pending fixes besides this, and you already offered to pick it up,

regards
Philipp

Applied
#5 lore raw

PATCH RESEND 1/1 reset: sunxi: fix spinlock initialization

Quoted 26 lines · Philipp Zabel

Hi,

Am Montag, den 12.01.2015, 14:13 -0800 schrieb Olof Johansson:

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Tyler Baker
Quoted 13 lines

Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat.

I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue.

[1]
http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
[2] http://kernelci.org/boot/?a80-optimus

Quoted 6 lines
Quoted 1 line

Not entirely sure what to do with this one. You sent it to:arm at kernel.org, but it should probably have gone to Philipp?

We can pick it up with an ack from him though, no problem.

Quoted 8 lines

I have applied the patch here:

    git://git.pengutronix.de/git/pza/linux reset/for_v3.19

I was going to send a pull request tonight, but since I don't have any other pending fixes besides this, and you already offered to pick it up,

Applied to arm-soc/fixes with ack from Philipp.

Thanks,

Kevin