Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274227

Re: [PATCH v3] arm64: Add support for PTE contiguous bit.

From David Woods <dwoods@ezchip.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] arm64: Add support for PTE contiguous bit.
Date 2015-11-20 17:30 +0100
Message-ID <qwWJs-1a6-29@gated-at.bofh.it> (permalink)
References <qwQNH-5O7-3@gated-at.bofh.it> <qwQNH-5O7-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3] arm64: Add support for PTE contiguous bit. yalin wang <yalin.wang2010@gmail.com> - 2015-11-20 11:10 +0100
  Re: [PATCH v3] arm64: Add support for PTE contiguous bit. David Woods <dwoods@ezchip.com> - 2015-11-20 17:30 +0100

csiph-web