[metal] Clean up code for getting pointer to struct mman (#828)

Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
tkchia 2023-06-12 01:32:39 +08:00 committed by GitHub
parent 5a6a4819d4
commit e47c0cc929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View file

@ -46,7 +46,7 @@ noasan struct DirectMap sys_mmap_metal(void *vaddr, size_t size, int prot,
struct mman *mm;
struct DirectMap res;
uint64_t addr, faddr = 0, page, e, *pte, *fdpte, *pml4t;
mm = (struct mman *)(BANE + 0x0500);
mm = __get_mm();
pml4t = __get_pml4t();
size = ROUNDUP(size, 4096);
addr = (uint64_t)vaddr;