[PATCH v3] arm64: Add support for PTE contiguous bit.
From: David Woods <hidden>
Date: 2015-11-20 16:21:09
Also in:
linux-mm, lkml
From: David Woods <hidden>
Date: 2015-11-20 16:21:09
Also in:
linux-mm, lkml
On 11/20/2015 05:07 AM, yalin wang wrote:
quoted
+ +void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) +{ + size_t pgsize; + int i; + int ncontig = find_num_contig(mm, addr, ptep, pte, &pgsize); + unsigned long pfn; + pgprot_t hugeprot; + + if (ncontig == 1) { + set_pte_at(mm, addr, ptep, pte); + return; + } + + pfn = pte_pfn(pte); + hugeprot = __pgprot(pte_val(pfn_pte(pfn, 0) ^ pte_val(pte)));is this should be pte_val(pfn_pte(pfn, 0)) ^ pte_val(pte) ?
The code generated is identical either way, but I agree your way looks better. -Dave