[patch 00/15] powerpc: raw_spinlock conversions

Thomas Gleixner tglx at linutronix.de
Fri Feb 19 02:31:48 EST 2010


On Thu, 18 Feb 2010, Geert Uytterhoeven wrote:

> On Thu, 18 Feb 2010, Thomas Gleixner wrote:
> > the following patch series is from preempt-rt. It converts the locks
> > which need to be real spinlocks in -rt to raw_spinlocks.
> 
> None of the patch descriptions mention why the locks need to be real
> spinlocks in -rt. So can you please elaborate?

Sorry, forgot that there are people who do not share that particular
flavour of crazy.

The locks are protecting low level hardware access (mostly interrupt
hardware, tlb control, et.c) and need to be taken in hard interrupt
context, exception handlers or irq disabled regions. Therefor they can
not be converted to "sleeping spinlocks" like we do for the the bulk
of the spinlocks in the kernel. We annotate those locks by converting
them to raw_spinlocks. In mainline there is no difference between
spinlock and raw_spinlock; spinlock is simply using the raw_spinlock
implementation. In RT we keep raw_spinlocks as real spinlocks and
convert spinlocks to the sleeping variant.

Hope that helps.

     tglx



More information about the Linuxppc-dev mailing list