[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1308768408.2268.2.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Wed, 22 Jun 2011 20:46:48 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH] Fix CPU spinlock lockups on secondary CPU bringup
Le mercredi 22 juin 2011 à 11:55 +0100, Russell King - ARM Linux a
écrit :
> From: Russell King <rmk+kernel@....linux.org.uk>
>
> Secondary CPU bringup typically calls calibrate_delay() during its
> initialization. However, calibrate_delay() modifies a global variable
> (loops_per_jiffy) used for udelay() and __delay().
>
> A side effect of 71c696b1 (calibrate: extract fall-back calculation
> into own helper) introduced in the 2.6.39 merge window means that we
> end up with a substantial period where loops_per_jiffy is zero. This
> causes the spinlock debugging code to malfunction:
...
>
> + loops_per_jiffy = lpj;
> printed = true;
> }
To be 100% safe, I would use
ACCESS_ONCE(loops_per_jiffy) = lpj;
But I assume no current gcc would be that stupid ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists