-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
- Loading branch information
Paul Mundt
committed
Apr 20, 2009
1 parent
4c5107e
commit 9833385
Showing
3 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <linux/kernel.h> | ||
#include <linux/mm.h> | ||
#include <linux/init.h> | ||
#include <linux/types.h> | ||
#include <linux/pci.h> | ||
|
||
int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | ||
enum pci_mmap_state mmap_state, int write_combine) | ||
{ | ||
/* | ||
* I/O space can be accessed via normal processor loads and stores on | ||
* this platform but for now we elect not to do this and portable | ||
* drivers should not do this anyway. | ||
*/ | ||
if (mmap_state == pci_mmap_io) | ||
return -EINVAL; | ||
|
||
/* | ||
* Ignore write-combine; for now only return uncached mappings. | ||
*/ | ||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
|
||
return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | ||
vma->vm_end - vma->vm_start, | ||
vma->vm_page_prot); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters