Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249AbZGAXs6 (ORCPT ); Wed, 1 Jul 2009 19:48:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752893AbZGAXsv (ORCPT ); Wed, 1 Jul 2009 19:48:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]:46233 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752701AbZGAXsu (ORCPT ); Wed, 1 Jul 2009 19:48:50 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20090701144913.GA28172@elte.hu> <20090701164700.29780.15103.stgit@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, mingo@elte.hu, akpm@linux-foundation.org, paulus@samba.org, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] FRV: Implement atomic64_t Date: Thu, 02 Jul 2009 00:48:38 +0100 Message-ID: <9268.1246492118@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 32 Linus Torvalds 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/