Revert "shmobj: Support large page"

This reverts commit 9a60997ea0.

Change-Id: Id60959b4e03451987239faa0bbc2e780b72fafaa
This commit is contained in:
Masamichi Takagi
2020-07-18 17:48:26 +09:00
committed by Masamichi Takagi
parent 40f8091fab
commit d7cf39883f
32 changed files with 75 additions and 2212 deletions

View File

@ -778,8 +778,32 @@ static inline pte_t *get_contiguous_tail(pte_t *__ptep, size_t __pgsize)
return (pte_t *)__page_align_up(__ptep + 1, align) - 1;
}
int split_contiguous_pages(pte_t *ptep, size_t pgsize,
uint32_t memobj_flags);
static inline int split_contiguous_pages(pte_t *ptep, size_t pgsize)
{
int ret;
pte_t *head = get_contiguous_head(ptep, pgsize);
pte_t *tail = get_contiguous_tail(ptep, pgsize);
pte_t *ptr;
uintptr_t phys;
struct page *page;
phys = pte_get_phys(head);
page = phys_to_page(phys);
if (page && (page_is_in_memobj(page)
|| page_is_multi_mapped(page))) {
ret = -EINVAL;
goto out;
}
for (ptr = head; ptr <= tail; ptr++) {
*ptr &= ~PTE_CONT;
}
ret = 0;
out:
return ret;
}
static inline int page_is_contiguous_head(pte_t *ptep, size_t pgsize)
{