Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, bitops: Move fls64.h inside __KERNEL__

We would include <asm-generic/bitops/fls64.h> even without __KERNEL__,
but that doesn't make sense, as:

1. That file provides fls64(), but the corresponding function fls() is
not exported to user space.
2. The implementation of fls64.h uses kernel-only symbols.
3. fls64.h is not exported to user space.

This appears to have been a bug introduced in checkin:

d57594c203b1 bitops: use __fls for fls64 on 64-bit archs

Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Alexander van Heukelum <heukelum@mailshack.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/4EEA77E1.6050009@zytor.com

+2 -9
+2 -9
arch/x86/include/asm/bitops.h
··· 380 380 return word; 381 381 } 382 382 383 + #undef ADDR 384 + 383 385 #ifdef __KERNEL__ 384 386 /** 385 387 * ffs - find first set bit in word ··· 436 434 #endif 437 435 return r + 1; 438 436 } 439 - #endif /* __KERNEL__ */ 440 - 441 - #undef ADDR 442 - 443 - #ifdef __KERNEL__ 444 437 445 438 #include <asm-generic/bitops/find.h> 446 439 ··· 447 450 448 451 #include <asm-generic/bitops/const_hweight.h> 449 452 450 - #endif /* __KERNEL__ */ 451 - 452 453 #include <asm-generic/bitops/fls64.h> 453 - 454 - #ifdef __KERNEL__ 455 454 456 455 #include <asm-generic/bitops/le.h> 457 456