| Age | Commit message (Collapse) | Author |
|
generic_{ffs,fls,fls64,hweight{64,32,16,8}}() were moved into
include/asm-generic/bitops.h. So all architectures don't use them.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
fls() takes an integer, so roundup_pow_of_two() is busted for ulongs larger
than 2^32-1.
Fix this by implementing and using fls_long().
(Why does roundup_pow_of_two() return a long?)
(Why is roundup_pow_of_two() __attribute_const__ whereas long_log2() is
__attribute_pure__?)
(Why does long_log2() suck so much? Because we were missing fls_long()?)
Cc: Roland Dreier <rdreier@cisco.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: John Hawkes <hawkes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Noticed by Rune Torgersen.
Fix generic_fls64(). tcp_cubic is using fls64().
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Fields obtained through cpuid vector 0x1(ebx[16:23]) and
vector 0x4(eax[14:25], eax[26:31]) indicate the maximum values and might not
always be the same as what is available and what OS sees. So make sure
"siblings" and "cpu cores" values in /proc/cpuinfo reflect the values as seen
by OS instead of what cpuid instruction says. This will also fix the buggy BIOS
cases (for example where cpuid on a single core cpu says there are "2" siblings,
even when HT is disabled in the BIOS.
http://bugzilla.kernel.org/show_bug.cgi?id=4359)
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Minor type cleanup.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Add rol32 and ror32 bitops to bitops.h
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
The attached patch provides an out-of-line implementation of find_next_bit()
and rearranges linux/bitops.h to avoid a dependency loop between inline
functions in there and in asm/bitops.h trying to include one another.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
"sparse" warns about implicit type conversions that may cause
surprising results. Did you know that large decimal types have
different type conversions from large hexadecimals?
|
|
- shmem: remove unneeded test for null inode->i_sb (James Morris)
- kill unused var warning in traps.c (Geert Uytterhoeven)
- s/u64/__u64/ in bitops.h (needed for klibc)
- comment fix in gfp.h (Matthew Dobson <colpatch@us.ibm.com>)
- fix smbfs constant overflow warning (Flameeyes <daps_mls@libero.it>)
- yam.c irqreturn_t fix.
- Remove some unused variables from baycom_epp.c (Adrian Bunk)
- Remove 5-year-old unreferenced RCS string from xirc2ps_cs.c (Adrian Bunk)
|
|
From: Matthew Dobson <colpatch@us.ibm.com>
This patch implements a generic version of the nr_cpus_node(node) macro
implemented for ppc64 by the previous patch.
The generic version simply computes an hweight of the bitmask returned by
node_to_cpumask(node) topology macro.
This patch also adds a generic_hweight64() function and an hweight_long()
function which are used as helpers for the generic nr_cpus_node() macro.
This patch also adds a for_each_node_with_cpus() macro, which is used in
sched_best_cpu() in kernel/sched.c to fix the original problem of
scheduling processes on CPU-less nodes. This macro should also be used in
the future to avoid similar problems.
Test compiled and booted by Andrew Theurer (habanero@us.ibm.com) on both
x440 and ppc64.
|
|
depending on whether the constant is a hexadecimal one as
opposed to a decimal one?
Let's make it all explicit. There are probably more lurking
around, these were found during development of my C checker tool.
|
|
Here's suspend-to-{RAM,disk} combined patch for
2.5.17. Suspend-to-disk is pretty stable and was tested in
2.4-ac. Suspend-to-RAM is little more experimental, but works for me,
and is certainly better than disk-eating version currently in kernel.
Major parts are: process stopper, S3 specific code, S4 specific
code.
|
|
|