commit | ac70b5aae6f514465bca744496ce7fb7859c6378 | [log] [tgz] |
---|---|---|
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | Mon Jun 18 19:42:05 2018 +0100 |
committer | Will Deacon <will.deacon@arm.com> | Tue Jun 19 12:26:40 2018 +0100 |
tree | 05f9f169f66074d8899356b556e2ea260b584f36 | |
parent | b70d1b9fc0a9ac6c47b0b9ef2fe80bf3542b0bb3 [diff] |
Add fls_long and roundup_pow_of_two helpers It's always nice to have a log2 handy, and the vfio-pci code will need to perform power of two allocation from an arbitrary size. Add fls_long and roundup_pow_of_two, based on the GCC builtin. Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>