From: Andrew Morton <akpm@linux-foundation.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org,
Jaswinder Singh Rajput <jaswinderlinux@gmail.com>,
dri-devel@lists.freedesktop.org, Dave Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: Record error batch buffers using iomem
Date: Tue, 11 May 2010 11:37:22 -0400 [thread overview]
Message-ID: <20100511113722.65ab2f4a.akpm@linux-foundation.org> (raw)
In-Reply-To: <1273602134-6359-1-git-send-email-chris@chris-wilson.co.uk>
On Tue, 11 May 2010 19:22:14 +0100 Chris Wilson <chris@chris-wilson.co.uk> wrote:
> + reloc_offset = src_priv->gtt_offset;
> for (page = 0; page < page_count; page++) {
> - void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> + void __iomem *s;
> + void *d;
> +
> + d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> if (d == NULL)
> goto unwind;
> - s = kmap_atomic(src_priv->pages[page], KM_USER0);
> - memcpy(d, s, PAGE_SIZE);
> - kunmap_atomic(s, KM_USER0);
> +
> + s = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
> + reloc_offset);
> + memcpy_fromio(d, s, PAGE_SIZE);
> + io_mapping_unmap_atomic(s);
As mentioned in the other email, this will still corrupt the KM_USER0
slot, and will generate a debug_kmap_atomic() warning.
next prev parent reply other threads:[~2010-05-11 18:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0100511104818.8382a7de.akpm@linux-foundation.org>
2010-05-11 18:22 ` [PATCH] drm/i915: Record error batch buffers using iomem Chris Wilson
2010-05-11 18:22 ` Chris Wilson
2010-05-11 15:37 ` Andrew Morton
2010-05-11 15:37 ` Andrew Morton [this message]
2010-05-11 18:49 ` Chris Wilson
2010-05-11 18:49 ` Chris Wilson
2010-05-11 19:22 ` Jaswinder Singh Rajput
2010-05-11 19:22 ` Jaswinder Singh Rajput
2010-05-11 19:38 ` Jaswinder Singh Rajput
2010-05-11 19:38 ` Jaswinder Singh Rajput
2010-05-11 19:53 ` Chris Wilson
2010-05-11 19:53 ` Chris Wilson
2010-05-11 20:05 ` Jaswinder Singh Rajput
2010-05-11 20:05 ` Jaswinder Singh Rajput
2010-05-11 21:45 ` Jaswinder Singh Rajput
2010-05-11 21:45 ` Jaswinder Singh Rajput
2010-05-12 13:15 ` Jaswinder Singh Rajput
2010-05-12 13:15 ` Jaswinder Singh Rajput
2010-05-12 13:50 ` Chris Wilson
2010-05-12 13:50 ` Chris Wilson
2010-05-12 14:31 ` Jaswinder Singh Rajput
2010-05-12 14:31 ` Jaswinder Singh Rajput
2010-05-13 21:01 ` Jaswinder Singh Rajput
2010-05-13 21:01 ` Jaswinder Singh Rajput
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=20100511113722.65ab2f4a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jaswinderlinux@gmail.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.