aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/pci-common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 52ccfed416ad..8c0270929cc0 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -419,7 +419,7 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
419 struct pci_dev *pdev = NULL; 419 struct pci_dev *pdev = NULL;
420 struct resource *found = NULL; 420 struct resource *found = NULL;
421 unsigned long prot = pgprot_val(protection); 421 unsigned long prot = pgprot_val(protection);
422 unsigned long offset = pfn << PAGE_SHIFT; 422 resource_size_t offset = ((resource_size_t)pfn) << PAGE_SHIFT;
423 int i; 423 int i;
424 424
425 if (page_is_ram(pfn)) 425 if (page_is_ram(pfn))
@@ -470,7 +470,8 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
470int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 470int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
471 enum pci_mmap_state mmap_state, int write_combine) 471 enum pci_mmap_state mmap_state, int write_combine)
472{ 472{
473 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT; 473 resource_size_t offset =
474 ((resource_size_t)vma->vm_pgoff) << PAGE_SHIFT;
474 struct resource *rp; 475 struct resource *rp;
475 int ret; 476 int ret;
476 477