mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 20:59:10 +07:00
9833385131
Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
27 lines
750 B
C
27 lines
750 B
C
#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);
|
|
}
|