From: Ladislav Michl Date: Mon, 3 Oct 2005 08:08:36 +0000 (+0300) Subject: [PATCH] ARM: OMAP: Re: Hang while entering userspace X-Git-Tag: v2.6.15-omap2~187^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=254da35d64ececa2e1592ed0a9c540f9103f3961;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: Re: Hang while entering userspace Below is patch fixing soft lockup in clocks. clockfw_lock is already held in clk_set_rate when calling omap1_clk_set_rate, no need to lock it again. --- diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 1482c00965a..f1c9c2a56b4 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -552,25 +552,21 @@ static int omap1_clk_set_rate(struct clk *clk, unsigned long rate) __u16 regval; unsigned long flags; - if(clk->set_rate != 0) { - spin_lock_irqsave(&clockfw_lock, flags); + if (clk->set_rate) ret = clk->set_rate(clk, rate); - spin_unlock_irqrestore(&clockfw_lock, flags); - } else if (clk->flags & RATE_CKCTL) { + else if (clk->flags & RATE_CKCTL) { dsor_exp = calc_dsor_exp(clk, rate); if (dsor_exp > 3) dsor_exp = -EINVAL; if (dsor_exp < 0) return dsor_exp; - spin_lock_irqsave(&clockfw_lock, flags); regval = omap_readw(ARM_CKCTL); regval &= ~(3 << clk->rate_offset); regval |= dsor_exp << clk->rate_offset; regval = verify_ckctl_value(regval); omap_writew(regval, ARM_CKCTL); clk->rate = clk->parent->rate / (1 << dsor_exp); - spin_unlock_irqrestore(&clockfw_lock, flags); ret = 0; }