stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <jhogan@kernel.org>
To: Huacai Chen <chenhc@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@cavium.com>,
	linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 3/8] MIPS: Ensure pmd_present() returns false after pmd_mknotpresent()
Date: Wed, 24 Jan 2018 21:47:43 +0000	[thread overview]
Message-ID: <20180124214742.GJ5446@saruman> (raw)
In-Reply-To: <1502330682-16812-2-git-send-email-chenhc@lemote.com>

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

On Thu, Aug 10, 2017 at 10:04:37AM +0800, Huacai Chen wrote:
> This patch is borrowed from ARM64 to ensure pmd_present() returns false

I presume you're referring to commit 5bb1cc0ff9a6 ("arm64: Ensure
pmd_present() returns false after pmd_mknotpresent()"). I think it would
be worth mentioning that specifically.

> after pmd_mknotpresent(). This is needed for THP.
> 
> Cc: stable@vger.kernel.org

Back to what version? 3.8 when THP was added?

Otherwise it looks reasonable:
Reviewed-by: James Hogan <jhogan@kernel.org>

Cheers
James

> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
>  arch/mips/include/asm/pgtable-64.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
> index 67fe6dc..a2252c2 100644
> --- a/arch/mips/include/asm/pgtable-64.h
> +++ b/arch/mips/include/asm/pgtable-64.h
> @@ -271,6 +271,11 @@ static inline int pmd_bad(pmd_t pmd)
>  
>  static inline int pmd_present(pmd_t pmd)
>  {
> +#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
> +	if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
> +		return pmd_val(pmd) & _PAGE_PRESENT;
> +#endif
> +
>  	return pmd_val(pmd) != (unsigned long) invalid_pte_table;
>  }
>  
> -- 
> 2.7.0
> 
> 
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-01-24 21:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1502330433-16670-1-git-send-email-chenhc@lemote.com>
2017-08-10  2:04 ` [PATCH 2/8] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 Huacai Chen
2017-08-10  2:04   ` [PATCH 3/8] MIPS: Ensure pmd_present() returns false after pmd_mknotpresent() Huacai Chen
2018-01-24 21:47     ` James Hogan [this message]
2018-01-24 21:22   ` [PATCH 2/8] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 James Hogan

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=20180124214742.GJ5446@saruman \
    --to=jhogan@kernel.org \
    --cc=Steven.Hill@cavium.com \
    --cc=chenhc@lemote.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.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;
as well as URLs for NNTP newsgroup(s).