[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <564F4861.5020002@ezchip.com>
Date: Fri, 20 Nov 2015 11:20:49 -0500
From: David Woods <dwoods@...hip.com>
To: yalin wang <yalin.wang2010@...il.com>
CC: <catalin.marinas@....com>, <will.deacon@....com>,
<steve.capper@...aro.org>, <jeremy.linton@....com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<cmetcalf@...hip.com>
Subject: Re: [PATCH v3] arm64: Add support for PTE contiguous bit.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists