]>
Commit | Line | Data |
---|---|---|
39a3a1fe GKH |
1 | From a171bc51fa697021e1b2082d7e95c12a363bc0a9 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> | |
3 | Date: Mon, 3 Oct 2016 17:56:55 +0300 | |
4 | Subject: pinctrl: baytrail: Fix lockdep | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | From: Ville Syrjälä <ville.syrjala@linux.intel.com> | |
10 | ||
11 | commit a171bc51fa697021e1b2082d7e95c12a363bc0a9 upstream. | |
12 | ||
13 | Initialize the spinlock before using it. | |
14 | ||
15 | INFO: trying to register non-static key. | |
16 | the code is fine but needs lockdep annotation. | |
17 | turning off the locking correctness validator. | |
18 | CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.8.0-dwc-bisect #4 | |
19 | Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8_X64_R_2014_13_1_00 03/24/2014 | |
20 | 0000000000000000 ffff8800788ff770 ffffffff8133d597 0000000000000000 | |
21 | 0000000000000000 ffff8800788ff7e0 ffffffff810cfb9e 0000000000000002 | |
22 | ffff8800788ff7d0 ffffffff8205b600 0000000000000002 ffff8800788ff7f0 | |
23 | Call Trace: | |
24 | [<ffffffff8133d597>] dump_stack+0x67/0x90 | |
25 | [<ffffffff810cfb9e>] register_lock_class+0x52e/0x540 | |
26 | [<ffffffff810d2081>] __lock_acquire+0x81/0x16b0 | |
27 | [<ffffffff810cede1>] ? save_trace+0x41/0xd0 | |
28 | [<ffffffff810d33b2>] ? __lock_acquire+0x13b2/0x16b0 | |
29 | [<ffffffff810cf05a>] ? __lock_is_held+0x4a/0x70 | |
30 | [<ffffffff810d3b1a>] lock_acquire+0xba/0x220 | |
31 | [<ffffffff8136f1fe>] ? byt_gpio_get_direction+0x3e/0x80 | |
32 | [<ffffffff81631567>] _raw_spin_lock_irqsave+0x47/0x60 | |
33 | [<ffffffff8136f1fe>] ? byt_gpio_get_direction+0x3e/0x80 | |
34 | [<ffffffff8136f1fe>] byt_gpio_get_direction+0x3e/0x80 | |
35 | [<ffffffff813740a9>] gpiochip_add_data+0x319/0x7d0 | |
36 | [<ffffffff81631723>] ? _raw_spin_unlock_irqrestore+0x43/0x70 | |
37 | [<ffffffff8136fe3b>] byt_pinctrl_probe+0x2fb/0x620 | |
38 | [<ffffffff8142fb0c>] platform_drv_probe+0x3c/0xa0 | |
39 | ... | |
40 | ||
41 | Based on the diff it looks like the problem was introduced in | |
42 | commit 71e6ca61e826 ("pinctrl: baytrail: Register pin control handling") | |
43 | but I wasn't able to verify that empirically as the parent commit | |
44 | just oopsed when I tried to boot it. | |
45 | ||
46 | Cc: Cristina Ciocan <cristina.ciocan@intel.com> | |
47 | Fixes: 71e6ca61e826 ("pinctrl: baytrail: Register pin control handling") | |
48 | Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> | |
49 | Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> | |
50 | Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | |
51 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
52 | ||
53 | --- | |
54 | drivers/pinctrl/intel/pinctrl-baytrail.c | 3 ++- | |
55 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
56 | ||
57 | --- a/drivers/pinctrl/intel/pinctrl-baytrail.c | |
58 | +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c | |
59 | @@ -1808,6 +1808,8 @@ static int byt_pinctrl_probe(struct plat | |
60 | return PTR_ERR(vg->pctl_dev); | |
61 | } | |
62 | ||
63 | + raw_spin_lock_init(&vg->lock); | |
64 | + | |
65 | ret = byt_gpio_probe(vg); | |
66 | if (ret) { | |
67 | pinctrl_unregister(vg->pctl_dev); | |
68 | @@ -1815,7 +1817,6 @@ static int byt_pinctrl_probe(struct plat | |
69 | } | |
70 | ||
71 | platform_set_drvdata(pdev, vg); | |
72 | - raw_spin_lock_init(&vg->lock); | |
73 | pm_runtime_enable(&pdev->dev); | |
74 | ||
75 | return 0; |