Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp720082pxf; Thu, 1 Apr 2021 11:44:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwURndxxyodDuBUsmjr2uGvs0PtEE5OFJG7V6cjqGOAhDOJwCAsBn/agY2FB5MFO8bYJL/L X-Received: by 2002:a02:230d:: with SMTP id u13mr9339177jau.53.1617302662423; Thu, 01 Apr 2021 11:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617302662; cv=none; d=google.com; s=arc-20160816; b=tM/HLkrX6BESE4NiHmk4izVK+9VsiVVzNVDau8fpHTEPoveugvfe/eqRfJxSr3mYnz QykHqr8F2qotULWPaMvFc71zi4QD7GcKyEl9oQtGAum1SRFn7v3m1qvBAmzL8QK05H3d v1CUHSx0/T1Nm4j80rVw8YW7OJm9hN5tAgDS7oUD06aysLTBCicEigvMQ4K2qjZXbkZY SeBrsanu6G8jZT44W0cGQePUqdYnAOEBPiHq4hkXzWPJ5Dq/xtoYzj7UzgLoFjZe+8Nc CKrKLdaI32jt1J/z6h4iSHHR7OS7oosppPeE1ZO/a69lyXI1waMt7WOuq1RgMIjRpMLp voow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Ik8ApvR6G2z2lJ3/pwrQhp9f/USdV34xg8Nr/YMQZYc=; b=ua9XRrbClujVWGVVeR9hWb7iQahaRu+37j2WqhaeFFwudT6yshKSaVIydIOX49jHik 3+sJ9nQyd/EQaY2RVZXZZRBlxjH8zKjdqyowtXB+Cf8d6WaaNhiEOugKAJPRUkksRbeR +f2ZXsn5zO3+jZOH0NgJNIFepoJTAZ0+QIUdU3doDz0o748D7dmtRcsm9ZpH/1/k6fgB kWuHoRhNyoxl/k6uGsbPPElNcVKvIZWVBmUjllig9j+PJY9vId6L/yFJa1+3Ayt9NaNS yI6x4XPGZwNG6ARuH06EnvC3iwjGLbl/Fu1MyInM9O7AoTeGCdjfbDnDmUJ5iOOy2TfG K0cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si5161031iow.1.2021.04.01.11.44.05; Thu, 01 Apr 2021 11:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241188AbhDASmr (ORCPT + 99 others); Thu, 1 Apr 2021 14:42:47 -0400 Received: from foss.arm.com ([217.140.110.172]:46422 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238210AbhDASUH (ORCPT ); Thu, 1 Apr 2021 14:20:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E19FE15BE; Thu, 1 Apr 2021 07:40:43 -0700 (PDT) Received: from [10.163.68.23] (unknown [10.163.68.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 583703F719; Thu, 1 Apr 2021 07:40:42 -0700 (PDT) Subject: Re: [PATCH -next 3/3] mm/debug_vm_pgtable: Remove useless pfn_pmd() To: Shixin Liu , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210401022315.2911967-1-liushixin2@huawei.com> <20210401022315.2911967-3-liushixin2@huawei.com> From: Anshuman Khandual Message-ID: <0ef29a80-5873-ddf6-bfb0-7d1b5c17b8c0@arm.com> Date: Thu, 1 Apr 2021 20:11:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210401022315.2911967-3-liushixin2@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/1/21 7:53 AM, Shixin Liu wrote: > The call to pfn_pmd() here is redundant. > > Signed-off-by: Shixin Liu > --- > mm/debug_vm_pgtable.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index c379bbe42c2a..9f4c4a114229 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c > @@ -196,7 +196,6 @@ static void __init pmd_advanced_tests(struct mm_struct *mm, > > pgtable_trans_huge_deposit(mm, pmdp, pgtable); > > - pmd = pfn_pmd(pfn, prot); > set_pmd_at(mm, vaddr, pmdp, pmd); > pmdp_set_wrprotect(mm, vaddr, pmdp); > pmd = READ_ONCE(*pmdp); > Instead drop the first pfn_pmd(), as that pmd would not be required when THP is not enabled. Also, please fold this with the first patch.