Commit 6c0cc627 authored by Scott Wood's avatar Scott Wood

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: default avatarScott Wood <scottwood@freescale.com>
parent 86c3b16e
...@@ -560,7 +560,7 @@ subsys_initcall(add_system_ram_resources); ...@@ -560,7 +560,7 @@ subsys_initcall(add_system_ram_resources);
*/ */
int devmem_is_allowed(unsigned long pfn) int devmem_is_allowed(unsigned long pfn)
{ {
if (iomem_is_exclusive(pfn << PAGE_SHIFT)) if (iomem_is_exclusive(PFN_PHYS(pfn)))
return 0; return 0;
if (!page_is_ram(pfn)) if (!page_is_ram(pfn))
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment