diff options
| author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2016-01-21 11:15:31 -0500 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-01-25 00:31:13 -0500 |
| commit | e256caa7d0515e301f8c8c6e7d1204a2b67b1381 (patch) | |
| tree | df649e11ac264790fb1cecaf96cb13d58fd22150 | |
| parent | 0e2bce7411542fa336ef49041471ea3e7dc911f8 (diff) | |
powerpc/mm: Allow user space to map rtas_rmo_buf
With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping
rtas_rmo_buf from user space is failing. Hence we are not able to make
RTAS syscall.
This patch calls page_is_rtas_user_buf before calling iomem_is_exclusive
in devmem_is_allowed(). This will allow user space to map rtas_rmo_buf
and we are able to make RTAS syscall.
Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
CC: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
| -rw-r--r-- | arch/powerpc/mm/mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 22d94c3e6fc4..d0f0a514b04e 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -560,12 +560,12 @@ subsys_initcall(add_system_ram_resources); | |||
| 560 | */ | 560 | */ |
| 561 | int devmem_is_allowed(unsigned long pfn) | 561 | int devmem_is_allowed(unsigned long pfn) |
| 562 | { | 562 | { |
| 563 | if (page_is_rtas_user_buf(pfn)) | ||
| 564 | return 1; | ||
| 563 | if (iomem_is_exclusive(PFN_PHYS(pfn))) | 565 | if (iomem_is_exclusive(PFN_PHYS(pfn))) |
| 564 | return 0; | 566 | return 0; |
| 565 | if (!page_is_ram(pfn)) | 567 | if (!page_is_ram(pfn)) |
| 566 | return 1; | 568 | return 1; |
| 567 | if (page_is_rtas_user_buf(pfn)) | ||
| 568 | return 1; | ||
| 569 | return 0; | 569 | return 0; |
| 570 | } | 570 | } |
| 571 | #endif /* CONFIG_STRICT_DEVMEM */ | 571 | #endif /* CONFIG_STRICT_DEVMEM */ |
