> +#if defined(cache_line_size)

Why the #if here?  Do we just need to include <linux/cache.h> explicitly
to make sure we get the define?

 > +    *((u8 *) mailbox->buf + INIT_HCA_CACHELINE_SZ_OFFSET) =
 > +            order_base_2(cache_line_size() / 16) << 5;

Trivial but I think it's safe to assume a cacheline is always a power of
2.  And I think it's clearer (and avoids generating a divide) to use
subtraction rather than division... so this could all become:

                (ilog2(cache_line_size()) - 4) << 5;

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to