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:	Thu, 29 Sep 2011 09:32:00 -0400
From:	Mark Salter <msalter@...hat.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH v3 19/24] C6X: headers

On Wed, 2011-09-28 at 16:07 +0200, Arnd Bergmann wrote:
> On Tuesday 27 September 2011, Mark Salter wrote:
> 
> > +
> > +static inline void __delay(unsigned long loops)
> > +{
> > +	uint32_t tmp;
> > +
> > +	/* 6 cycles per loop */
> > +	asm volatile ("        mv    .s1  %0,%1\n"
> > +		      "0: [%1] b     .s1  0b\n"
> > +		      "        add   .l1  -6,%0,%0\n"
> > +		      "        cmplt .l1  1,%0,%1\n"
> > +		      "        nop   3\n"
> > +		      : "+a"(loops), "=A"(tmp));
> > +}
> > +
> > +static inline void _c6x_tickdelay(unsigned int x)
> > +{
> > +	uint32_t cnt, endcnt;
> > +
> > +	asm volatile ("        mvc   .s2   TSCL,%0\n"
> > +		      "        add   .s2x  %0,%1,%2\n"
> > +		      " ||     mvk   .l2   1,B0\n"
> > +		      "0: [B0] b     .s2   0b\n"
> > +		      "        mvc   .s2   TSCL,%0\n"
> > +		      "        sub   .s2   %0,%2,%0\n"
> > +		      "        cmpgt .l2   0,%0,B0\n"
> > +		      "        nop   2\n"
> > +		      : "=b"(cnt), "+a"(x), "=b"(endcnt) : : "B0");
> > +}
> 
> Do you actually need to provide the __delay function here?
> I think it's really only used by the calibrate_delay() function
> that you don't need.
> 

It is still used in spinlock_debug.c and a few drivers.

--Mark


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