> +#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.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general