xref: /kernel/linux/linux-5.10/include/asm-generic/bitops/arch_hweight.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/include/asm-generic/bitops/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
38c2ecf20Sopenharmony_ci#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/types.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistatic inline unsigned int __arch_hweight32(unsigned int w)
88c2ecf20Sopenharmony_ci{
98c2ecf20Sopenharmony_ci	return __sw_hweight32(w);
108c2ecf20Sopenharmony_ci}
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cistatic inline unsigned int __arch_hweight16(unsigned int w)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	return __sw_hweight16(w);
158c2ecf20Sopenharmony_ci}
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_cistatic inline unsigned int __arch_hweight8(unsigned int w)
188c2ecf20Sopenharmony_ci{
198c2ecf20Sopenharmony_ci	return __sw_hweight8(w);
208c2ecf20Sopenharmony_ci}
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cistatic inline unsigned long __arch_hweight64(__u64 w)
238c2ecf20Sopenharmony_ci{
248c2ecf20Sopenharmony_ci	return __sw_hweight64(w);
258c2ecf20Sopenharmony_ci}
268c2ecf20Sopenharmony_ci#endif /* _ASM_GENERIC_BITOPS_HWEIGHT_H_ */
27

Indexes created Thu Nov 07 10:32:03 CST 2024