lkml.org 
[lkml]   [2008]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: merge the simple bitops and move them to bitops.h

The CMOV define should probably be dependent on what CPU the kernel
is tuned for. It was originally written for when x86-64 was only
K8 which has fast CMOV, but e.g. on P4 CMOV is actually deprecated
over jumps.

> Both define fls64(), but i386 uses a generic one and x86_64 defines
> one all by itself. The generic one is currently not suitable for
> use by 64-bit archs... that can change.

It is very unlikely a generic one will ever be able to compete
with a single instruction.

> x86_64 defines ARCH_HAS_FAST_MULTIPLIER, i386 not. This affects a
> choice of generated code in the (generic) hweight function. It would
> be nice if that could move to some other file.

It depends on the CPU, but it can be probably safely set on pretty much
all modern x86 cores.

> x86_64 has a mysterious inline function set_bit_string, which is
> only used by pci-calgary_64.c and pci-gart_64.c. Not sure what to
> do with it.

It's generic and could really live in linux/bitops.h

-Andi



\
 
 \ /
  Last update: 2008-03-14 20:55    [W:0.585 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site