summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorScott Wood2015-04-17 23:17:14 +0200
committerScott Wood2015-06-03 04:37:23 +0200
commit6c0cc62715bfd0b26f7d1a79e6e8143085950ca7 (patch)
treeff32cd626c2c2a198eae6f6336d4a63c800004c0 /arch/powerpc
parentpowerpc/8xx: mmu_virtual_psize incorrect for 16k pages (diff)
downloadkernel-qcow2-linux-6c0cc62715bfd0b26f7d1a79e6e8143085950ca7.tar.gz
kernel-qcow2-linux-6c0cc62715bfd0b26f7d1a79e6e8143085950ca7.tar.xz
kernel-qcow2-linux-6c0cc62715bfd0b26f7d1a79e6e8143085950ca7.zip
powerpc/mm: Use PFN_PHYS() in devmem_is_allowed()
This function can run on systems where physical addresses don't fit in unsigned long, so make sure to use the macro that contains the proper cast. Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 45fda71feb27..0f11819d8f1d 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -560,7 +560,7 @@ subsys_initcall(add_system_ram_resources);
*/
int devmem_is_allowed(unsigned long pfn)
{
- if (iomem_is_exclusive(pfn << PAGE_SHIFT))
+ if (iomem_is_exclusive(PFN_PHYS(pfn)))
return 0;
if (!page_is_ram(pfn))
return 1;