summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/efi.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-07-10 04:45:27 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:25 -0700
commit06c67befeeb16f2995c11b0e04a348103ddbfab1 (patch)
treeaad64fa9d2d03b1479885d1c703ccc5890b12afe /arch/ia64/kernel/efi.c
parent49c0dab7e6000888b616bedcbbc8cd4710331610 (diff)
downloadop-kernel-dev-06c67befeeb16f2995c11b0e04a348103ddbfab1.zip
op-kernel-dev-06c67befeeb16f2995c11b0e04a348103ddbfab1.tar.gz
[PATCH] make valid_mmap_phys_addr_range() take a pfn
Newer ARMs have a 40 bit physical address space, but mapping physical memory above 4G needs a special page table format which we (currently?) do not use for userspace mappings, so what happens instead is that mapping an address >= 4G will happily discard the upper bits and wrap. There is a valid_mmap_phys_addr_range() arch hook where we could check for >= 4G addresses and deny the mapping, but this hook takes an unsigned long address: static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size); And drivers/char/mem.c:mmap_mem() calls it like this: static int mmap_mem(struct file * file, struct vm_area_struct * vma) { size_t size = vma->vm_end - vma->vm_start; if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size)) So that's not much help either. This patch makes the hook take a pfn instead of a phys address. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ia64/kernel/efi.c')
-rw-r--r--arch/ia64/kernel/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index b13c055..e4bfa9d 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -759,7 +759,7 @@ valid_phys_addr_range (unsigned long phys_addr, unsigned long size)
}
int
-valid_mmap_phys_addr_range (unsigned long phys_addr, unsigned long size)
+valid_mmap_phys_addr_range (unsigned long pfn, unsigned long size)
{
/*
* MMIO regions are often missing from the EFI memory map.
OpenPOWER on IntegriCloud