From: "Hans J. Koch" <hjk@linutronix.de>
To: Greg KH <greg@kroah.com>
Cc: Hans J Koch <hjk@linutronix.de>,
linux-kernel@vger.kernel.org,
Juergen Beisert <juergen127@kreuzholzen.de>,
Jean-Samuel Chenard <jsamch@gmail.com>
Subject: [PATCH] Add pgprot_noncached() to UIO mmap code
Date: Fri, 14 Mar 2008 11:28:36 +0100 [thread overview]
Message-ID: <20080314112836.30f39afb@bluebox.local> (raw)
From: Jean-Samuel Chenard <jsamch@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Hans J Koch <hjk@linutronix.de>, linux-kernel@vger.kernel.org,
Juergen Beisert <juergen127@kreuzholzen.de>
Date: Fri, 14 Mar 2008 11:19:49 +0100
Subject: Add pgprot_noncached() to UIO mmap code
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>
---
drivers/uio/uio.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6.25-rc/drivers/uio/uio.c
===================================================================
--- linux-2.6.25-rc.orig/drivers/uio/uio.c 2008-03-14 11:00:59.000000000 +0100
+++ linux-2.6.25-rc/drivers/uio/uio.c 2008-03-14 11:03:13.000000000 +0100
@@ -470,6 +470,8 @@
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,
reply other threads:[~2008-03-14 10:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080314112836.30f39afb@bluebox.local \
--to=hjk@linutronix.de \
--cc=greg@kroah.com \
--cc=jsamch@gmail.com \
--cc=juergen127@kreuzholzen.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox