From patchwork Tue May 4 13:05:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 96761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o44D5HSR004302 for ; Tue, 4 May 2010 13:05:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932211Ab0EDNFH (ORCPT ); Tue, 4 May 2010 09:05:07 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:37847 "EHLO mail-pz0-f204.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932077Ab0EDNFE (ORCPT ); Tue, 4 May 2010 09:05:04 -0400 Received: by pzk42 with SMTP id 42so748188pzk.4 for ; Tue, 04 May 2010 06:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=3LOdMqqDzTzd2tK1ijyM2sEKjC6jxcDIpVCxOxSNvJI=; b=hOtrzgT6JJarQ9VYJMWcQu6WYklyh8hqriRHhREBhBwchRt8UpPRwM4Vg7txsh8kUZ 0/z1cN3cWGv5qj+FobVQOcZskH9+/++VSk8jqCgOnvvwJ/PjDSf+7IcfIlwFh0uVSwxv EaNfXMl0pm3sHPlTq3Op/1DkfBewoHrfcm3g8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=VDAZB+pq/g56uBvIgl5hJV8gn8getJnydBdWzWFJrKP8sD3mcJ8hKfobLOn/FLEcpI BrzlB61bE/LwPwaz3WaVEv2WrgStO+OCg/HEuk6AtwIcVyvsAReneL7GpLOyenJc4RQ5 uhZ/4mXCHV0QA1EJtU9w0AYj9DoIco6EdbNNY= Received: by 10.141.23.13 with SMTP id a13mr4456724rvj.92.1272978301976; Tue, 04 May 2010 06:05:01 -0700 (PDT) Received: from stein (v079161.dynamic.ppp.asahi-net.or.jp [124.155.79.161]) by mx.google.com with ESMTPS id q10sm1915618rvp.20.2010.05.04.06.04.58 (version=SSLv3 cipher=RC4-MD5); Tue, 04 May 2010 06:05:01 -0700 (PDT) Date: Tue, 4 May 2010 22:05:00 +0900 From: Takuya Yoshikawa To: Takuya Yoshikawa Cc: avi@redhat.com, mtosatti@redhat.com, agraf@suse.de, yoshikawa.takuya@oss.ntt.co.jp, fernando@oss.ntt.co.jp, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-ia64@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@ozlabs.org, arnd@arndb.de, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro Message-Id: <20100504220500.7695cd66.takuya.yoshikawa@gmail.com> In-Reply-To: <20100504215645.6448af8f.takuya.yoshikawa@gmail.com> References: <20100504215645.6448af8f.takuya.yoshikawa@gmail.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.0; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 13:05:17 +0000 (UTC) diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index 80e3bf1..ee445fb 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h @@ -9,6 +9,8 @@ #if defined(__LITTLE_ENDIAN) +#define generic_le_bit_offset(nr) (nr) + #define generic_test_le_bit(nr, addr) test_bit(nr, addr) #define generic___set_le_bit(nr, addr) __set_bit(nr, addr) #define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr) @@ -25,6 +27,8 @@ #elif defined(__BIG_ENDIAN) +#define generic_le_bit_offset(nr) ((nr) ^ BITOP_LE_SWIZZLE) + #define generic_test_le_bit(nr, addr) \ test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) #define generic___set_le_bit(nr, addr) \