|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Buffers not reachable by PCI
On Thu, Dec 15, 2011 at 02:19:55AM +0000, Taylor, Neal E wrote:
> Missed this when I was composing the previous e-mail. Your answer is here.
> Thank you.
>
Can I put 'Tested-by: Neal ..' on this patch:
> >From 47409eecc08effe20fc4aa0da899dd6ac475cb0b Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Date: Wed, 14 Dec 2011 20:48:01 -0500
> Subject: [PATCH] xen/swiotlb: Use page alignment for early buffer allocation.
>
> This piggybacks on git commit e79f86b2ef9c0a8c47225217c1018b7d3d90101c
> "swiotlb: Use page alignment for early buffer allocation" which:
>
> "We could call free_bootmem_late() if swiotlb is not used, and
> it will shrink to page alignment.
>
> So alloc them with page alignment at first, to avoid lose two pages"
>
> Reported-by: "Kalev, Leonid" <Leonid.Kalev@xxxxxx>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
> drivers/xen/swiotlb-xen.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
> index 8e964b9..5c8e445 100644
> --- a/drivers/xen/swiotlb-xen.c
> +++ b/drivers/xen/swiotlb-xen.c
> @@ -166,7 +166,8 @@ retry:
> /*
> * Get IO TLB memory from any location.
> */
> - xen_io_tlb_start = alloc_bootmem(bytes);
> + xen_io_tlb_start = alloc_bootmem_pages(PAGE_ALIGN(bytes));
> +
> if (!xen_io_tlb_start) {
> m = "Cannot allocate Xen-SWIOTLB buffer!\n";
> goto error;
> @@ -179,7 +180,7 @@ retry:
> bytes,
> xen_io_tlb_nslabs);
> if (rc) {
> - free_bootmem(__pa(xen_io_tlb_start), bytes);
> + free_bootmem(__pa(xen_io_tlb_start), PAGE_ALIGN(bytes));
> m = "Failed to get contiguous memory for DMA from Xen!\n"\
> "You either: don't have the permissions, do not have"\
> " enough free memory under 4GB, or the hypervisor memory"\
> --
> 1.7.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |