clear_range_l1, clear_range_middle: Fix handling contiguous PTE

Change-Id: I2609c94d7f9342fe25aa9a5cfc208375274d46fa
This commit is contained in:
Masamichi Takagi
2018-12-13 16:54:05 +09:00
committed by Dominique Martinet
parent c1270cdf6d
commit 641d9f1b39
5 changed files with 97 additions and 98 deletions

View File

@@ -785,6 +785,16 @@ static inline int page_is_contiguous_tail(pte_t *ptep, size_t pgsize)
return (ptr == ptep);
}
/* Return true if PTE doesn't belong to a contiguous PTE group or PTE
* is the head of a contiguous PTE group
*/
static inline int pte_is_head(pte_t *ptep, pte_t *old, size_t cont_size)
{
if (!pte_is_contiguous(old))
return 1;
return page_is_contiguous_head(ptep, cont_size);
}
struct page_table;
void arch_adjust_allocate_page_size(struct page_table *pt,
uintptr_t fault_addr,