diff options
author | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
commit | d4bbf7e7759afc172e2bfbc5c416324590049cdd (patch) | |
tree | 7eab5ee5481cd3dcf1162329fec827177640018a /arch/sparc/include/asm/bitops_64.h | |
parent | a150439c4a97db379f0ed6faa46fbbb6e7bf3cb2 (diff) | |
parent | 401d0069cb344f401bc9d264c31db55876ff78c0 (diff) |
Merge branch 'master' into x86/memblock
Conflicts & resolutions:
* arch/x86/xen/setup.c
dc91c728fd "xen: allow extra memory to be in multiple regions"
24aa07882b "memblock, x86: Replace memblock_x86_reserve/free..."
conflicted on xen_add_extra_mem() updates. The resolution is
trivial as the latter just want to replace
memblock_x86_reserve_range() with memblock_reserve().
* drivers/pci/intel-iommu.c
166e9278a3f "x86/ia64: intel-iommu: move to drivers/iommu/"
5dfe8660a3d "bootmem: Replace work_with_active_regions() with..."
conflicted as the former moved the file under drivers/iommu/.
Resolved by applying the chnages from the latter on the moved
file.
* mm/Kconfig
6661672053a "memblock: add NO_BOOTMEM config symbol"
c378ddd53f9 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"
conflicted trivially. Both added config options. Just
letting both add their own options resolves the conflict.
* mm/memblock.c
d1f0ece6cdc "mm/memblock.c: small function definition fixes"
ed7b56a799c "memblock: Remove memblock_memory_can_coalesce()"
confliected. The former updates function removed by the
latter. Resolution is trivial.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/sparc/include/asm/bitops_64.h')
-rw-r--r-- | arch/sparc/include/asm/bitops_64.h | 54 |
1 files changed, 9 insertions, 45 deletions
diff --git a/arch/sparc/include/asm/bitops_64.h b/arch/sparc/include/asm/bitops_64.h index 38e9aa1b2cea..29011cc0e4be 100644 --- a/arch/sparc/include/asm/bitops_64.h +++ b/arch/sparc/include/asm/bitops_64.h | |||
@@ -26,61 +26,28 @@ extern void change_bit(unsigned long nr, volatile unsigned long *addr); | |||
26 | #define smp_mb__before_clear_bit() barrier() | 26 | #define smp_mb__before_clear_bit() barrier() |
27 | #define smp_mb__after_clear_bit() barrier() | 27 | #define smp_mb__after_clear_bit() barrier() |
28 | 28 | ||
29 | #include <asm-generic/bitops/ffz.h> | ||
30 | #include <asm-generic/bitops/__ffs.h> | ||
31 | #include <asm-generic/bitops/fls.h> | 29 | #include <asm-generic/bitops/fls.h> |
32 | #include <asm-generic/bitops/__fls.h> | 30 | #include <asm-generic/bitops/__fls.h> |
33 | #include <asm-generic/bitops/fls64.h> | 31 | #include <asm-generic/bitops/fls64.h> |
34 | 32 | ||
35 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
36 | 34 | ||
35 | extern int ffs(int x); | ||
36 | extern unsigned long __ffs(unsigned long); | ||
37 | |||
38 | #include <asm-generic/bitops/ffz.h> | ||
37 | #include <asm-generic/bitops/sched.h> | 39 | #include <asm-generic/bitops/sched.h> |
38 | #include <asm-generic/bitops/ffs.h> | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * hweightN: returns the hamming weight (i.e. the number | 42 | * hweightN: returns the hamming weight (i.e. the number |
42 | * of bits set) of a N-bit word | 43 | * of bits set) of a N-bit word |
43 | */ | 44 | */ |
44 | 45 | ||
45 | #ifdef ULTRA_HAS_POPULATION_COUNT | 46 | extern unsigned long __arch_hweight64(__u64 w); |
46 | 47 | extern unsigned int __arch_hweight32(unsigned int w); | |
47 | static inline unsigned int __arch_hweight64(unsigned long w) | 48 | extern unsigned int __arch_hweight16(unsigned int w); |
48 | { | 49 | extern unsigned int __arch_hweight8(unsigned int w); |
49 | unsigned int res; | ||
50 | |||
51 | __asm__ ("popc %1,%0" : "=r" (res) : "r" (w)); | ||
52 | return res; | ||
53 | } | ||
54 | |||
55 | static inline unsigned int __arch_hweight32(unsigned int w) | ||
56 | { | ||
57 | unsigned int res; | ||
58 | |||
59 | __asm__ ("popc %1,%0" : "=r" (res) : "r" (w & 0xffffffff)); | ||
60 | return res; | ||
61 | } | ||
62 | 50 | ||
63 | static inline unsigned int __arch_hweight16(unsigned int w) | ||
64 | { | ||
65 | unsigned int res; | ||
66 | |||
67 | __asm__ ("popc %1,%0" : "=r" (res) : "r" (w & 0xffff)); | ||
68 | return res; | ||
69 | } | ||
70 | |||
71 | static inline unsigned int __arch_hweight8(unsigned int w) | ||
72 | { | ||
73 | unsigned int res; | ||
74 | |||
75 | __asm__ ("popc %1,%0" : "=r" (res) : "r" (w & 0xff)); | ||
76 | return res; | ||
77 | } | ||
78 | |||
79 | #else | ||
80 | |||
81 | #include <asm-generic/bitops/arch_hweight.h> | ||
82 | |||
83 | #endif | ||
84 | #include <asm-generic/bitops/const_hweight.h> | 51 | #include <asm-generic/bitops/const_hweight.h> |
85 | #include <asm-generic/bitops/lock.h> | 52 | #include <asm-generic/bitops/lock.h> |
86 | #endif /* __KERNEL__ */ | 53 | #endif /* __KERNEL__ */ |
@@ -91,10 +58,7 @@ static inline unsigned int __arch_hweight8(unsigned int w) | |||
91 | 58 | ||
92 | #include <asm-generic/bitops/le.h> | 59 | #include <asm-generic/bitops/le.h> |
93 | 60 | ||
94 | #define ext2_set_bit_atomic(lock,nr,addr) \ | 61 | #include <asm-generic/bitops/ext2-atomic-setbit.h> |
95 | test_and_set_bit((nr) ^ 0x38,(unsigned long *)(addr)) | ||
96 | #define ext2_clear_bit_atomic(lock,nr,addr) \ | ||
97 | test_and_clear_bit((nr) ^ 0x38,(unsigned long *)(addr)) | ||
98 | 62 | ||
99 | #endif /* __KERNEL__ */ | 63 | #endif /* __KERNEL__ */ |
100 | 64 | ||