From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 8/9] drm/i915: [sparse] __iomem fixes for gem
Date: Mon, 16 Apr 2012 14:07:47 -0700 [thread overview]
Message-ID: <1334610468-9274-9-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1334610468-9274-1-git-send-email-ben@bwidawsk.net>
As with one of the earlier patches in the series, we're forced to cast
for copy_[to|from]_user. Again because of the nature of the GEN x86
exclusivity, this should be safe.
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9415c07..96527db 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -266,8 +266,8 @@ __copy_to_user_swizzled(char __user *cpu_vaddr,
}
static inline int
-__copy_from_user_swizzled(char __user *gpu_vaddr, int gpu_offset,
- const char *cpu_vaddr,
+__copy_from_user_swizzled(char *gpu_vaddr, int gpu_offset,
+ const char __user *cpu_vaddr,
int length)
{
int ret, cpu_offset = 0;
@@ -542,12 +542,13 @@ fast_user_write(struct io_mapping *mapping,
char __user *user_data,
int length)
{
- char *vaddr_atomic;
+ void __iomem *vaddr_atomic;
unsigned long unwritten;
vaddr_atomic = io_mapping_map_atomic_wc(mapping, page_base);
- unwritten = __copy_from_user_inatomic_nocache(vaddr_atomic + page_offset,
- user_data, length);
+ unwritten = __copy_from_user_inatomic_nocache(
+ (void __force*)vaddr_atomic + page_offset,
+ user_data, length);
io_mapping_unmap_atomic(vaddr_atomic);
return unwritten;
}
--
1.7.10
next prev parent reply other threads:[~2012-04-16 21:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 21:07 [PATCH 0/9] i915 fixes for sparse warnings Ben Widawsky
2012-04-16 21:07 ` [PATCH 1/9] drm/i915: [sparse] trivial sparse fixes Ben Widawsky
2012-04-16 21:13 ` Chris Wilson
2012-04-16 21:07 ` [PATCH 2/9] drm/i915: [sparse] don't use variable size arrays Ben Widawsky
2012-04-18 1:39 ` Paulo Zanoni
2012-04-18 2:20 ` Ben Widawsky
2012-04-18 9:05 ` Daniel Vetter
2012-04-16 21:07 ` [PATCH 3/9] drm/i915: [sparse] __iomem fixes for opregion Ben Widawsky
2012-04-16 21:07 ` [PATCH 4/9] drm/i915: [sparse] __iomem fixes for overlay Ben Widawsky
2012-04-16 21:07 ` [PATCH 5/9] drm/i915: [sparse] __iomem fixes for debugfs Ben Widawsky
2012-04-16 21:07 ` [PATCH 6/9] drm/i915: [sparse] __iomem fixes for ringbuffer Ben Widawsky
2012-04-16 21:28 ` Chris Wilson
2012-04-16 21:07 ` [PATCH 7/9] drm/i915: [sparse] forced __iomem ringbuffer fixes Ben Widawsky
2012-04-16 21:07 ` Ben Widawsky [this message]
2012-04-16 21:07 ` [PATCH 9/9] drm/i915: [sparse] __iomem fixes for intel_bios Ben Widawsky
2012-04-21 20:59 ` [PATCH 0/9] i915 fixes for sparse warnings Daniel Vetter
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=1334610468-9274-9-git-send-email-ben@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=benjamin.widawsky@intel.com \
--cc=intel-gfx@lists.freedesktop.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