arm64: Direct access to Mckernel memory from Linux.

Change-Id: I1a096aa5232c56382ae19d8c4e4f41d4e3e9f660
This commit is contained in:
Shiratori, Takehiro
2019-02-26 17:17:46 +09:00
committed by Dominique Martinet
parent 20d5900c35
commit aa3c5e91db
9 changed files with 32 additions and 28 deletions

View File

@ -3334,10 +3334,10 @@ unsigned long virt_to_phys(void *v)
{
unsigned long va = (unsigned long)v;
if (MAP_KERNEL_START <= va) {
return va - MAP_KERNEL_START + arm64_kernel_phys_base;
if (va >= MAP_ST_START) {
return va - MAP_ST_START;
}
return va - MAP_ST_START;
return va - MAP_KERNEL_START + arm64_kernel_phys_base;
}
void *phys_to_virt(unsigned long p)