diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-25 12:32:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-01 15:18:27 +0800 |
commit | c90791c7638d3c9a0de762d8b416d0e809b1dc31 (patch) | |
tree | 41fdeb152f42222e38aa1200658c4a91bed88161 /arch/tile/mm | |
parent | e5bdf9b518d0ff03455dce3da9bce8ad95c25e6d (diff) |
tile: fix bug where fls(0) was not returning 0
commit 9f1d62bed7f015d11b9164078b7fea433b474114 upstream.
This is because __builtin_clz(0) returns 64 for the "undefined" case
of 0, since the builtin just does a right-shift 32 and "clz" instruction.
So, use the alpha approach of casting to u32 and using __builtin_clzll().
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/tile/mm')
0 files changed, 0 insertions, 0 deletions