From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A874DC48BF6 for ; Mon, 26 Feb 2024 10:50:12 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=Rd4/QsRv; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Tjy7R1yhPz3vdq for ; Mon, 26 Feb 2024 21:50:11 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=Rd4/QsRv; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Tjy6Y4Gjfz2xFq for ; Mon, 26 Feb 2024 21:49:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1708944565; bh=Cn2xDNXWkCC0F1GWz1ZczujdAI4K+h1xeT2o4u1IWRk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Rd4/QsRvWBtrdProZoplXO/fbUiLEUJKHTsbbyYxAegHsyDyVD7+xOv4qwSpsqTEb 1LeCy3bDWRmPoLx/BSPpeeLFYwxmPrxo2+tgzNffX6BqObbGWscmyG6hS5U/n9g+8c RRvUElATM4M5/UY+ue1FbbBWOLE+tsez1dHqcacQQPHgcdrHvw2TgJPBFfeSvUYBkl XWVh/JS8VtyI1h8Tx4Su9uCJ5gLXoiYgCDxNUzdXMWCFJE9oiIMMVJZEU3y71/tOzM atNcg08onRU/BEuP3mp3DUpFaODQ6jTacU6m4Ydwpn61Z019BmQUE7xUdyW5VNwubY Fgt/1Z+fOMbDg== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Tjy6Y2gCnz4wcQ; Mon, 26 Feb 2024 21:49:24 +1100 (AEDT) From: Michael Ellerman To: Kunwu Chan , npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com Subject: Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp In-Reply-To: <20240125092624.537564-1-chentao@kylinos.cn> References: <20240125092624.537564-1-chentao@kylinos.cn> Date: Mon, 26 Feb 2024 21:49:23 +1100 Message-ID: <87h6hva4b0.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Kunwu Chan Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Kunwu Chan 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