>>> On 12.11.14 at 16:25, <[email protected]> wrote:
> +u64
> +xen_swiotlb_get_required_mask(struct device *dev)
> +{
> + u64 max_mfn;
> +
> + max_mfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
> +
> + return DMA_BIT_MASK(fls64(max_mfn << PAGE_SHIFT) + 1);
> +}
The value the hypercall returns is exclusive and an unsigned long.
Hence I'd suggest
u64
xen_swiotlb_get_required_mask(struct device *dev)
{
unsigned long max_mfn;
max_mfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
return DMA_BIT_MASK(__fls(max_mfn - 1) + 1 + PAGE_SHIFT);
}
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/