Skip to content
Commit cf78237d authored by Roland Dreier's avatar Roland Dreier
Browse files

mlx4_core: Reserve the correct number of MTT segments



Taking ilog2(dev->caps.reserved_mtts) to find out the order to pass to
the MTT buddy allocator will do the wrong thing if reserved_mtts is ever
not a power of 2.  Be safe and use fls(dev->caps.reserved_mtts - 1).

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5b0bf5e2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment