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]
Message-ID: <9268.1246492118@redhat.com>
Date:	Thu, 02 Jul 2009 00:48:38 +0100
From:	David Howells <dhowells@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	dhowells@...hat.com, mingo@...e.hu, akpm@...ux-foundation.org,
	paulus@...ba.org, arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] FRV: Implement atomic64_t

Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> > +#define atomic64_read(v)	((v)->counter)
> > +#define atomic64_set(v, i)	(((v)->counter) = (i))

This is now:

	static inline long long atomic64_read(atomic64_t *v)
	{
		long long counter;

		asm("ldd%I1 %M1,%0"
		    : "=e"(counter)
		    : "m"(v->counter));
		return counter;
	}

	static inline void atomic64_set(atomic64_t *v, long long i)
	{
		asm volatile("std%I0 %1,%M0"
			     : "=m"(v->counter)
			     : "e"(i));
	}

which causes the CPU to do 64-bit loads and stores to register pairs.

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