All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clk: vt8500: Fix unbalanced spinlock in vt8500_dclk_set_rate()
Date: Sat, 18 May 2013 09:18:49 +1200	[thread overview]
Message-ID: <1368825532-30917-2-git-send-email-linux@prisktech.co.nz> (raw)
In-Reply-To: <1368825532-30917-1-git-send-email-linux@prisktech.co.nz>

With the addition of a DVO clock, a bug is now evident in the vt8500
clock code:
[    0.290000] WARNING: at init/main.c:698 do_one_initcall+0x158/0x18c()
[    0.300000] initcall wm8505fb_driver_init+0x0/0xc returned with disabled int

This is caused by an unbalanced spinlock in vt8500_dclk_set_rate().
Replace the second call to spin_lock_irqsave() with spin_unlock_irqrestore().

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 drivers/clk/clk-vt8500.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
index debf688..553ac35 100644
--- a/drivers/clk/clk-vt8500.c
+++ b/drivers/clk/clk-vt8500.c
@@ -183,7 +183,7 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
 	writel(divisor, cdev->div_reg);
 	vt8500_pmc_wait_busy();
 
-	spin_lock_irqsave(cdev->lock, flags);
+	spin_unlock_irqrestore(cdev->lock, flags);
 
 	return 0;
 }
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: Tony Prisk <linux@prisktech.co.nz>
To: Mike Turquette <mturquette@linaro.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	vt8500-wm8505-linux-kernel@googlegroups.com,
	Tony Prisk <linux@prisktech.co.nz>
Subject: [PATCH 1/4] clk: vt8500: Fix unbalanced spinlock in vt8500_dclk_set_rate()
Date: Sat, 18 May 2013 09:18:49 +1200	[thread overview]
Message-ID: <1368825532-30917-2-git-send-email-linux@prisktech.co.nz> (raw)
In-Reply-To: <1368825532-30917-1-git-send-email-linux@prisktech.co.nz>

With the addition of a DVO clock, a bug is now evident in the vt8500
clock code:
[    0.290000] WARNING: at init/main.c:698 do_one_initcall+0x158/0x18c()
[    0.300000] initcall wm8505fb_driver_init+0x0/0xc returned with disabled int

This is caused by an unbalanced spinlock in vt8500_dclk_set_rate().
Replace the second call to spin_lock_irqsave() with spin_unlock_irqrestore().

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 drivers/clk/clk-vt8500.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
index debf688..553ac35 100644
--- a/drivers/clk/clk-vt8500.c
+++ b/drivers/clk/clk-vt8500.c
@@ -183,7 +183,7 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
 	writel(divisor, cdev->div_reg);
 	vt8500_pmc_wait_busy();
 
-	spin_lock_irqsave(cdev->lock, flags);
+	spin_unlock_irqrestore(cdev->lock, flags);
 
 	return 0;
 }
-- 
1.7.9.5


  reply	other threads:[~2013-05-17 21:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 21:18 [PATCH 0/4] VT8500 clock for 3.10/3.11 Tony Prisk
2013-05-17 21:18 ` Tony Prisk
2013-05-17 21:18 ` Tony Prisk [this message]
2013-05-17 21:18   ` [PATCH 1/4] clk: vt8500: Fix unbalanced spinlock in vt8500_dclk_set_rate() Tony Prisk
2013-05-17 21:18 ` [PATCH 2/4] clk: vt8500: Add support for clocks on the WM8850 SoCs Tony Prisk
2013-05-17 21:18   ` Tony Prisk
2013-05-17 21:18 ` [PATCH 3/4] clk: vt8500: Remove unnecessary divisor adjustment in vtwm_dclk_set_rate() Tony Prisk
2013-05-17 21:18   ` Tony Prisk
2013-05-17 21:18 ` [PATCH 4/4] MAINTAINERS: vt8500: Add clk-vt8500.c to MAINTAINERS file Tony Prisk
2013-05-17 21:18   ` Tony Prisk
     [not found]   ` <CABjd4Yw2LbnaUbQFW_bd_6WRGTA34-Vp_tUC2b4Jczj-MM8x1w@mail.gmail.com>
2013-05-18  8:30     ` Tony Prisk
2013-05-18  8:30       ` Tony Prisk
2013-05-29 23:16       ` Mike Turquette
2013-05-29 23:16         ` Mike Turquette
2013-05-30  6:09         ` Tony Prisk
2013-05-30  6:09           ` Tony Prisk

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=1368825532-30917-2-git-send-email-linux@prisktech.co.nz \
    --to=linux@prisktech.co.nz \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.