linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Woods <dwoods@ezchip.com>
To: yalin wang <yalin.wang2010@gmail.com>
Cc: catalin.marinas@arm.com, will.deacon@arm.com,
	steve.capper@linaro.org, jeremy.linton@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	cmetcalf@ezchip.com
Subject: Re: [PATCH v3] arm64: Add support for PTE contiguous bit.
Date: Fri, 20 Nov 2015 11:20:49 -0500	[thread overview]
Message-ID: <564F4861.5020002@ezchip.com> (raw)
In-Reply-To: <5D0C7112-063F-4116-9585-ADF4ADF97AAE@gmail.com>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2015-11-20 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 16:57 David Woods
2015-11-20 10:07 ` yalin wang
2015-11-20 16:20   ` David Woods [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564F4861.5020002@ezchip.com \
    --to=dwoods@ezchip.com \
    --cc=catalin.marinas@arm.com \
    --cc=cmetcalf@ezchip.com \
    --cc=jeremy.linton@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=steve.capper@linaro.org \
    --cc=will.deacon@arm.com \
    --cc=yalin.wang2010@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox