Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1234810rbb; Mon, 26 Feb 2024 03:12:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBDKvJKAzWTXJdYRMSBLKpoUkqg3Kq3v8TeqDgC7knLlvlseIErWf24JKaxqK8BICkgWEi8GxnU2AM2ylkWa5xwm8zC2OCXmf0wBvJcw== X-Google-Smtp-Source: AGHT+IGrW8EuGMG+3qj11BJilf6t6cWmcBu8YvpnuU5TRhe3Uy8Bvdp+AJaVG8P+rKpEmq/dqqDM X-Received: by 2002:a17:906:408f:b0:a3f:d927:4c0d with SMTP id u15-20020a170906408f00b00a3fd9274c0dmr4148644ejj.26.1708945962165; Mon, 26 Feb 2024 03:12:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708945962; cv=pass; d=google.com; s=arc-20160816; b=jjv1udPfExyYkezljd5klG5/bSv26vpvPG5VKYbxbKa6xAp3a8t5BZkADLFd+P5scc 4fY8yUnAqc2O3MwseC1MhH1zWJ83/9F/uAcuhS1C1KdoiEM8z7kRg8LLq4o6pv476VrB VYzk3cNdmyo/G4LrwGAjXe/fRwtg9BQBNPEtliebG/+Ok039ABkODzPTHCUmCm5vn99A bnq4dC7aoIQqVugpZaZThqAB9EfyKkyI8YM0v0Gn/pv+BjCMcJiskzi8YJfD+Jo9ZHTt +Pin3av6afNfRV64ScfsI+uY+YGk8uinIs77848J2fEmHMbYtrECVARchfj+z5TMUGsC xA2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=Cn2xDNXWkCC0F1GWz1ZczujdAI4K+h1xeT2o4u1IWRk=; fh=0w9k8EoyeE0+6ezz7IgN6WhnIgQp9by65YO2PJ6tHbE=; b=ab7+iF7YXK5OmvHM5FM+hwmM4xGQydYrSQZ3Oewcm2zeOanOcpz1M2TSpESoutU35w FCSJ38NyjoX43Kfl0EbnWD4FD+LS4M3FckLJp9EXPf0R23qeRwW1qG+9oSJR7Afln3Ay EwpOys2UGrFUtcY7/ut036dSZm2UF01ytSN5P+zevxLtvKiFAgkvliSz9bUBQSB3Oxt1 nMsk5vM+1TDxZm9DsAwXtEcRHw2dkx6pAjGfH3XmcO/PXUCmyXgqOqP34/RAwFzEs4VF enV0YUKu4zx2RXKmsoHhnW1H67c8XwOI9NiR4DsfpbOeBgzR7VkMga8eAktJeG4KBh0Y q1HA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Rd4/QsRv"; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-81214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81214-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gw26-20020a170906f15a00b00a435aadf1fcsi641515ejb.50.2024.02.26.03.12.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 03:12:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Rd4/QsRv"; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-81214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81214-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4D9CE1F2B7AF for ; Mon, 26 Feb 2024 10:53:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 245204DA1D; Mon, 26 Feb 2024 10:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="Rd4/QsRv" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 762A01CA8A for ; Mon, 26 Feb 2024 10:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708944572; cv=none; b=fs0g1zQ0WabbJUXn4mz99IAN/CCXdyyH0UJFpNTKkDPAzBq8Rb+D8lGnt8X8h+iVRMLQxyt6r+TUv/EY8bz3nhEJI0Sh2M8RB2tXYh4fUZdp1XDAMcoavVxHBJTZanwVE/hIf1h0XxgwvrGREjbgWZswx9mCsVKm9fXyBDKjHDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708944572; c=relaxed/simple; bh=/oqHh0HNdPVucXXMMwm3P4MsoTj6ZRb447x7UxS2+L4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=u9ZHPevrCfAccqBjLeAlrPzXqR6QmXHCGGJo7l1cT3BObywGTjmwLcn65J/MKP44Y+lS9ZXTTPK3JRHr86+sQZ07ErpsRU+XMnpgsaRiWVcQFLgEs01g91mqYSGTVaRBLUCoYXhCG1f5u03vGZVkk758T/+Ixjm2CDE8lWx1rAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=Rd4/QsRv; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au 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 Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Kunwu Chan 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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