You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
David Howells
f0d1b0b30d
[PATCH] LOG2: Implement a general integer log2 facility in the kernel
...
This facility provides three entry points:
ilog2() Log base 2 of unsigned long
ilog2_u32() Log base 2 of u32
ilog2_u64() Log base 2 of u64
These facilities can either be used inside functions on dynamic data:
int do_something(long q)
{
...;
y = ilog2(x)
...;
}
Or can be used to statically initialise global variables with constant values:
unsigned n = ilog2(27);
When performing static initialisation, the compiler will report "error:
initializer element is not constant" if asked to take a log of zero or of
something not reducible to a constant. They treat negative numbers as
unsigned.
When not dealing with a constant, they fall back to using fls() which permits
them to use arch-specific log calculation instructions - such as BSR on
x86/x86_64 or SCAN on FRV - if available.
[akpm@osdl.org: MMC fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Howells <dhowells@redhat.com>
Cc: Wojtek Kaniewski <wojtekka@toxygen.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago
..
Kconfig
Fix "can not" in Documentation and Kconfig
19 years ago
Makefile
[PATCH] separate bdi congestion functions from queue congestion functions
19 years ago
allocpercpu.c
[PATCH] Allow NULL pointers in percpu_free
18 years ago
backing-dev.c
[PATCH] separate bdi congestion functions from queue congestion functions
19 years ago
bootmem.c
[PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols
18 years ago
bounce.c
[PATCH] BLOCK: Separate the bounce buffering code from the highmem code [try #6 ]
19 years ago
fadvise.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
filemap.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
filemap.h
Remove all inclusions of <linux/config.h>
19 years ago
filemap_xip.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
fremap.c
[PATCH] kill install_file_pte's pte_val
18 years ago
highmem.c
[PATCH] BLOCK: Separate the bounce buffering code from the highmem code [try #6 ]
19 years ago
hugetlb.c
[PATCH] mm: make compound page destructor handling explicit
18 years ago
internal.h
[PATCH] mm: VM_BUG_ON
19 years ago
madvise.c
[PATCH] Fix MADV_REMOVE protection checking
19 years ago
memory.c
[PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols
18 years ago
memory_hotplug.c
[PATCH] Get rid of zone_table[]
18 years ago
mempolicy.c
[PATCH] struct path: convert mm
18 years ago
mempool.c
[PATCH] dm: work around mempool_alloc, bio_alloc_bioset deadlocks
19 years ago
migrate.c
[PATCH] radix-tree: RCU lockless readside
18 years ago
mincore.c
…
mlock.c
[PATCH] mlock cleanup
18 years ago
mmap.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
mmzone.c
[PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols
18 years ago
mprotect.c
[PATCH] paravirt: lazy mmu mode hooks.patch
19 years ago
mremap.c
[PATCH] paravirt: lazy mmu mode hooks.patch
19 years ago
msync.c
[PATCH] mm: msync() cleanup
19 years ago
nommu.c
[PATCH] struct path: convert mm
18 years ago
oom_kill.c
[PATCH] oom: less memdie
18 years ago
page-writeback.c
[PATCH] separate bdi congestion functions from queue congestion functions
19 years ago
page_alloc.c
[PATCH] LOG2: Implement a general integer log2 facility in the kernel
18 years ago
page_io.c
[PATCH] swsusp: use block device offsets to identify swap locations
18 years ago
pdflush.c
[PATCH] Add include/linux/freezer.h and move definitions from sched.h
18 years ago
prio_tree.c
…
readahead.c
[PATCH] struct path: convert mm
18 years ago
rmap.c
[PATCH] mm: more commenting on lock ordering
19 years ago
shmem.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
shmem_acl.c
[PATCH] Fix typos in mm/shmem_acl.c
19 years ago
slab.c
[PATCH] mm: fallback_alloc cpuset_zone_allowed irq fix
18 years ago
slob.c
[PATCH] Make kmem_cache_destroy() return void
19 years ago
sparse.c
[PATCH] numa node ids are int, page_to_nid and zone_to_nid should return int
18 years ago
swap.c
[PATCH] hotplug CPU: clean up hotcpu_notifier() use
18 years ago
swap_state.c
[PATCH] lockdep: locking init debugging improvement
19 years ago
swapfile.c
[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
18 years ago
thrash.c
[PATCH] make mm/thrash.c:global_faults static
18 years ago
tiny-shmem.c
[PATCH] struct path: convert mm
18 years ago
truncate.c
[PATCH] invalidate: remove_mapping() fix
19 years ago
util.c
[PATCH] slab: clean up leak tracking ifdefs a little bit
19 years ago
vmalloc.c
[PATCH] Fix strange size check in __get_vm_area_node()
18 years ago
vmscan.c
[PATCH] hotplug CPU: clean up hotcpu_notifier() use
18 years ago
vmstat.c
[PATCH] struct seq_operations and struct file_operations constification
18 years ago