lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 19 Jun 2011 21:43:08 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Jonas Bonn <jonas@...thpole.se>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/19] OpenRISC: Headers

On Sunday 19 June 2011 21:39:45 Arnd Bergmann wrote:
> > +
> > +extern inline void __delay(int loops)
> > +{
> > +     __asm__ __volatile__ (
> > +                           "l.srli %0,%0,1;"
> > +                           "1: l.sfeqi %0,0;"
> > +                           "l.bnf 1b;"
> > +                           "l.addi %0,%0,-1;"
> > +                           : "=r" (loops): "0" (loops));
> > +}
> > +
> 
> If you have an accurate high-resolution time source, better make this compare
> the current time in a loop than do a handcoded delay.

Hmm, I just saw that you actually have a better version of this, but
since this is marked "extern inline", code probably always gets this
version. Better never use extern inline, except when you have a good
reason and document it.

	Arnd
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ