[PATCH v3] arm64: Add support for PTE contiguous bit.
David Woods
dwoods at ezchip.com
Fri Nov 20 08:20:49 PST 2015
On 11/20/2015 05:07 AM, yalin wang wrote:
>> +
>> +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
More information about the linux-arm-kernel
mailing list