From: "Jan Beulich" Subject: [PATCH 1/7] x86 bitops adjustment Date: Wed, 23 Aug 2006 10:57:38 +0200 Message-ID: <44EC34A2.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part4A6FEF92.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__Part4A6FEF92.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline (partly in preparation for initial PAE-guest-on-64bit patches) For constant_test_bit(), since the bitfield is split into 'unsigned int'-s, also only used an unsigned literal one for shifting (should produce slightly smaller code on x86-64). For variable_test_bit(), the 'const' modifier was missing from the bitfield parameter - the 'variable' in the name is regarding the 'nr' parameter, not the bitfield. Signed-off-by: Jan Beulich --=__Part4A6FEF92.0__= Content-Type: text/plain; name="bitops.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bitops.patch" Index: 2006-08-16/xen/include/asm-x86/bitops.h =================================================================== --- 2006-08-16.orig/xen/include/asm-x86/bitops.h 2006-06-28 15:52:35.000000000 +0200 +++ 2006-08-16/xen/include/asm-x86/bitops.h 2006-08-22 09:19:25.000000000 +0200 @@ -224,10 +224,10 @@ static __inline__ int test_and_change_bi static __inline__ int constant_test_bit(int nr, const volatile void * addr) { - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; + return ((1U << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; } -static __inline__ int variable_test_bit(int nr, volatile void * addr) +static __inline__ int variable_test_bit(int nr, const volatile void * addr) { int oldbit; --=__Part4A6FEF92.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part4A6FEF92.0__=--