Skip to content

Commit

Permalink
powerpc/mm: Use PFN_PHYS() in devmem_is_allowed()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Scott Wood committed Jun 3, 2015
1 parent 86c3b16 commit 6c0cc62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c0cc62

Please sign in to comment.