diff options
Diffstat (limited to 'arch/ppc64/kernel/pci.c')
-rw-r--r-- | arch/ppc64/kernel/pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index b2fb6746f00b..3d2106b022a1 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -726,16 +726,17 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, | |||
726 | * above routine | 726 | * above routine |
727 | */ | 727 | */ |
728 | pgprot_t pci_phys_mem_access_prot(struct file *file, | 728 | pgprot_t pci_phys_mem_access_prot(struct file *file, |
729 | unsigned long offset, | 729 | unsigned long pfn, |
730 | unsigned long size, | 730 | unsigned long size, |
731 | pgprot_t protection) | 731 | pgprot_t protection) |
732 | { | 732 | { |
733 | struct pci_dev *pdev = NULL; | 733 | struct pci_dev *pdev = NULL; |
734 | struct resource *found = NULL; | 734 | struct resource *found = NULL; |
735 | unsigned long prot = pgprot_val(protection); | 735 | unsigned long prot = pgprot_val(protection); |
736 | unsigned long offset = pfn << PAGE_SHIFT; | ||
736 | int i; | 737 | int i; |
737 | 738 | ||
738 | if (page_is_ram(offset >> PAGE_SHIFT)) | 739 | if (page_is_ram(pfn)) |
739 | return __pgprot(prot); | 740 | return __pgprot(prot); |
740 | 741 | ||
741 | prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; | 742 | prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; |