All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Kunwu Chan <chentao@kylinos.cn>,
	npiggin@gmail.com, christophe.leroy@csgroup.eu,
	aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Kunwu Chan <chentao@kylinos.cn>
Subject: Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp
Date: Mon, 26 Feb 2024 21:49:23 +1100	[thread overview]
Message-ID: <87h6hva4b0.fsf@mail.lhotse> (raw)
In-Reply-To: <20240125092624.537564-1-chentao@kylinos.cn>

Kunwu Chan <chentao@kylinos.cn> writes:
> This part was commented from commit 6d492ecc6489
> ("powerpc/THP: Add code to handle HPTE faults for hugepages")
> in about 11 years before.
>
> If there are no plans to enable this part code in the future,
> we can remove this dead code.

I agree the code can go. But I'd like it to be replaced with a comment
explaining what the dead code was trying to say.

cheers

> diff --git a/arch/powerpc/mm/book3s64/hash_hugepage.c b/arch/powerpc/mm/book3s64/hash_hugepage.c
> index c0fabe6c5a12..127a3a2c174b 100644
> --- a/arch/powerpc/mm/book3s64/hash_hugepage.c
> +++ b/arch/powerpc/mm/book3s64/hash_hugepage.c
> @@ -59,16 +59,6 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,
>  
>  	rflags = htab_convert_pte_flags(new_pmd, flags);
>  
> -#if 0
> -	if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) {
> -
> -		/*
> -		 * No CPU has hugepages but lacks no execute, so we
> -		 * don't need to worry about that case
> -		 */
> -		rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);
> -	}
> -#endif
>  	/*
>  	 * Find the slot index details for this ea, using base page size.
>  	 */
> -- 
> 2.39.2

  reply	other threads:[~2024-02-26 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  9:26 [PATCH] powerpc/mm: Code cleanup for __hash_page_thp Kunwu Chan
2024-02-26 10:49 ` Michael Ellerman [this message]
2024-02-27  3:14   ` Kunwu Chan
2024-02-27  6:07     ` Michael Ellerman
2024-02-27  9:32       ` Kunwu Chan
2024-02-29  3:52       ` Aneesh Kumar K.V
2024-02-29  6:18         ` Michael Ellerman
2024-02-29  9:28           ` Kunwu Chan

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=87h6hva4b0.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@kernel.org \
    --cc=chentao@kylinos.cn \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=npiggin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.