1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * (C) COPYRIGHT 2018 ARM Limited. All rights reserved. 4 * Author: James.Qian.Wang <james.qian.wang@arm.com> 5 * 6 */ 7 #ifndef _MALIDP_UTILS_ 8 #define _MALIDP_UTILS_ 9 10 #define has_bit(nr, mask) (BIT(nr) & (mask)) 11 #define has_bits(bits, mask) (((bits) & (mask)) == (bits)) 12 13 #define dp_for_each_set_bit(bit, mask) \ 14 for_each_set_bit((bit), ((unsigned long *)&(mask)), sizeof(mask) * 8) 15 16 #endif /* _MALIDP_UTILS_ */ 17