login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
14
Re: [PATCH] x86: simplify sync_test_bit()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jeremy Fitzhardinge
Subject:
Re: [PATCH] x86: simplify sync_test_bit()
Date: Friday, March 14, 2008 - 8:03 am
Jan Beulich wrote:
quoted text
> There really is no need for a redundant implementation here, just keep > the alternative name for allowing consumers to use consistent naming. > > Signed-off-by: Jan Beulich <jbeulich@novell.com> > > --- a/include/asm-x86/sync_bitops.h > +++ b/include/asm-x86/sync_bitops.h > @@ -130,26 +130,7 @@ static inline int sync_test_and_change_b > return oldbit; > } > > -static __always_inline int sync_constant_test_bit(int nr, const volatile unsigned long *addr) > -{ > - return ((1UL << (nr & 31)) & > - (((const volatile unsigned int *)addr)[nr >> 5])) != 0; > -} > - > -static inline int sync_var_test_bit(int nr, const volatile unsigned long * addr) > -{ > - int oldbit; > - > - __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0" > - :"=r" (oldbit) > - :"m" (ADDR),"Ir" (nr)); > - return oldbit; > -} > - > -#define sync_test_bit(nr,addr) \ > - (__builtin_constant_p(nr) ? \ > - sync_constant_test_bit((nr),(addr)) : \ > - sync_var_test_bit((nr),(addr))) > +#define sync_test_bit test_bit
Hm, #define sync_test_bit(nr, addr) test_bit(nr, addr) would be better, but seems reasonable to me. Or even an inline for consistency. J --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86: simplify sync_test_bit()
, Jan Beulich
, (Fri Mar 14, 12:56 am)
Re: [PATCH] x86: simplify sync_test_bit()
, Jeremy Fitzhardinge
, (Fri Mar 14, 8:03 am)
Re: [PATCH] x86: simplify sync_test_bit()
, Jan Beulich
, (Fri Mar 14, 8:20 am)
Re: [PATCH] x86: simplify sync_test_bit()
, Jeremy Fitzhardinge
, (Fri Mar 14, 8:43 am)
Re: [PATCH] x86: simplify sync_test_bit()
, Ingo Molnar
, (Fri Mar 21, 4:18 am)
Re: [PATCH] x86: simplify sync_test_bit()
, Jeremy Fitzhardinge
, (Sat Mar 22, 1:27 pm)
Re: [PATCH] x86: simplify sync_test_bit()
, Ingo Molnar
, (Wed Mar 26, 12:27 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Gautham R Shenoy
[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend
Jeffrey V. Merkey
Re: Versioning file system
James Bottomley
Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700
David Miller
Re: NO_HZ: timer interrupt stuck
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Miles Bader
Re: way to automatically add untracked files?
Harvey Harrison
Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem
Alex Riesen
Re: git exclude patterns for directory
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
netfilter: nf_conntrack_sip: add T.38 FAX support
Linux Kernel Mailing List
drivers/acpi: use kasprintf
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Damien Miller
Re: Patching a SSH 'Weakness'
frantisek holop
Re: mount ffs as msdos, system hangs
Colocation donated by:
Syndicate