* Andi Kleen <[email protected]> wrote:
> > a better solution would be to call __delay(1) after the first failed
> > attempt, that would make the delay at least 1 second long. It seems
> > __delay() is de-facto exported by every architecture, so we can rely on
> > it in the global spinlock code.
> >
> > So how about the patch below instead?
>
> Are you sure loops_per_jiffie is always in delay(1) units?
there are a few explicit calls to __delay() in drivers/*, so i'd assume
so. A grep also seems to suggest so:
./ppc/xmon/xmon.c:extern inline void __delay(unsigned int loops)
./x86_64/lib/delay.c:void __delay(unsigned long loops)
./sparc64/lib/delay.c:void __delay(unsigned long loops)
./sh64/lib/udelay.c:void __delay(int loops)
./m32r/lib/delay.c:void __delay(unsigned long loops)
./i386/lib/delay.c:void __delay(unsigned long loops)
./s390/lib/delay.c:void __delay(unsigned long loops)
./sh/lib/delay.c:void __delay(unsigned long loops)
./powerpc/kernel/time.c:void __delay(unsigned long loops)
but yes, this is a non-specified thing so far, so there could be
problems on some platforms. Worst-case we never time out - which could
be detected via the NMI watchdog or the soft-lockup watchdog - so it's
not like they would go unnoticed.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]