mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Thomas Goirand <zigo@debian.org>,
	xen-devel@lists.xensource.com, Dave Jiang <dave.jiang@intel.com>,
	pkg-xen-devel@lists.alioth.debian.org,
	Maciej Sosnowski <maciej.sosnowski@intel.com>,
	linux-kernel@vger.kernel.org,
	Jonathan Nieder <jrnieder@gmail.com>,
	William Dauchy <wdauchy@gmail.com>,
	Konrad Rzeszutek Wilk <konrad@darnok.org>
Subject: Re: [Pkg-xen-devel] ioatdma: Boot process hangs then reboots when using Xen + Linux 3.2
Date: Tue, 06 Mar 2012 06:39:12 -0800	[thread overview]
Message-ID: <1331044752.22559.97.camel@cthulhu.hellion.org.uk> (raw)
In-Reply-To: <CABE8wwsPA2PUx45EbY3w3BAHaHbUMWo7+giK=uU8gx9mbBkRpQ@mail.gmail.com>

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


  reply	other threads:[~2012-03-06 14:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJ75kXZ-2vWZpG7Uz3firg6ew4y_DdorXotkAkUGSK0GWLMUQQ@mail.gmail.com>
     [not found] ` <20120127144737.GA27750@andromeda.dapyr.net>
     [not found]   ` <20120219223125.GA820@burratino>
     [not found]     ` <20120220181618.GD17566@burratino>
     [not found]       ` <4F4891B8.9050008@goirand.fr>
2012-03-02  5:57         ` Jonathan Nieder
     [not found]           ` <CABE8wwt8Lngy=-iL7QGCofy0nW5-q4VJDS_ovEr96fGdYm72ew@mail.gmail.com>
2012-03-02 16:21             ` [Pkg-xen-devel] " Bastian Blank
2012-03-02 16:44               ` Dan Williams
2012-03-02 17:57                 ` Bastian Blank
2012-03-02 19:31                   ` Dan Williams
2012-03-02 20:08                     ` Bastian Blank
2012-03-02 20:16                       ` Dan Williams
2012-03-02 20:56                         ` Bastian Blank
2012-03-02 21:17                           ` Dan Williams
2012-03-05 15:26                     ` Thomas Goirand
2012-03-05 15:38                       ` Dan Williams
2012-03-06  9:20                         ` Thomas Goirand
2012-03-06 10:33                           ` Bastian Blank
2012-03-06 14:14                           ` Dan Williams
2012-03-06 14:39                             ` Ian Campbell [this message]
2012-03-13 16:49                               ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-03-11 22:06                             ` Jonathan Nieder
2012-03-23 23:55                               ` Dan Williams
2012-03-24  1:29                                 ` William Dauchy
2012-03-24  2:25                                 ` William Dauchy
2012-03-24  3:34                                   ` Williams, Dan J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331044752.22559.97.camel@cthulhu.hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=jrnieder@gmail.com \
    --cc=konrad@darnok.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.sosnowski@intel.com \
    --cc=pkg-xen-devel@lists.alioth.debian.org \
    --cc=wdauchy@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=zigo@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome