[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1331044752.22559.97.camel@cthulhu.hellion.org.uk>
Date: Tue, 06 Mar 2012 06:39:12 -0800
From: Ian Campbell <ijc@...lion.org.uk>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Thomas Goirand <zigo@...ian.org>, xen-devel@...ts.xensource.com,
Dave Jiang <dave.jiang@...el.com>,
pkg-xen-devel@...ts.alioth.debian.org,
Maciej Sosnowski <maciej.sosnowski@...el.com>,
linux-kernel@...r.kernel.org, Jonathan Nieder <jrnieder@...il.com>,
William Dauchy <wdauchy@...il.com>,
Konrad Rzeszutek Wilk <konrad@...nok.org>
Subject: Re: [Pkg-xen-devel] ioatdma: Boot process hangs then reboots when
using Xen + Linux 3.2
On Tue, 2012-03-06 at 06:14 -0800, Dan Williams wrote:
> [ 9.276817] ioatdma 0000:00:16.4: desc[0]:
> (0x300cc7000->0x300cc7040) cookie: 0 flags: 0x2 ctl: 0x29 (op: 0
> int_en: 1 compl: 1)
> ...
> [ 9.276832] ioatdma 0000:00:16.4: ioat_get_current_completion:
> phys_complete: 0xcc7000
>
> Thanks, this clearly shows that our descriptors are above 4GB and that
> the driver truncates the completion word.
>
> Is this new behavior for xen?
Xen makes a distinction between physical addresses and DMA addresses and
the latter can potentially be anywhere in the machine's real address
space while the former is what GFP_KERNEL etc controls.
You are using pci_pool_alloc which is the correct API to use for these
things since it's purpose is to handle cases where PHYS != DMA addr by
exposing the DMA address to the caller. As part of that you should also
be using dma_addr_t for DMA addresses since that is the type which is
defined to handle the appropriate DMA address size on the platform.
I think this DMA!=PHYS can also be true of some non-x86 architectures
without Xen too but I guess ioat is quite x86 specific? In any case it
is wrong, or at least non-portable, to use unsigned long for these
addresses even though it happens on x86 that physaddr == dma addr
(usually).
Ian.
--
Ian Campbell
Start every day off with a smile and get it over with.
-- W. C. Fields
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists