From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Jean-Samuel Chenard <jsamch@gmail.com>,
Hans J Koch <hjk@linutronix.de>, stable <stable@kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 1/2] UIO: add pgprot_noncached() to UIO mmap code
Date: Mon, 24 Mar 2008 23:16:53 -0700 [thread overview]
Message-ID: <1206425814-20831-1-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20080325060503.GB20741@suse.de>
From: Jean-Samuel Chenard <jsamch@gmail.com>
Mapping of physical memory in UIO needs pgprot_noncached() to ensure
that IO memory is not cached. Without pgprot_noncached(), it (accidentally)
works on x86 and arm, but fails on PPC.
Signed-off-by: Jean-Samuel Chenard <jsamch@gmail.com>
Signed-off-by: Hans J Koch <hjk@linutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/uio/uio.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index e8a01f2..1175908 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -470,6 +470,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
vma->vm_flags |= VM_IO | VM_RESERVED;
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+
return remap_pfn_range(vma,
vma->vm_start,
idev->info->mem[mi].addr >> PAGE_SHIFT,
--
1.5.4.3
next prev parent reply other threads:[~2008-03-25 6:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 6:05 [GIT PATCH] driver core fixes against 2.6.25-rc6 git Greg KH
2008-03-25 6:16 ` Greg Kroah-Hartman [this message]
2008-03-25 6:16 ` [PATCH 2/2] driver core: debug for bad dev_attr_show() return value Greg Kroah-Hartman
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=1206425814-20831-1-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=hjk@linutronix.de \
--cc=jsamch@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox