Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp64668rdb; Mon, 22 Jan 2024 12:03:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFtVhoaNbV/UleANONYsI+OFP6xi9j8NjlegdkXyYdDM+XnSa8jdo7w3z6BestQ8DVKi4H X-Received: by 2002:aa7:c910:0:b0:559:b848:c9f3 with SMTP id b16-20020aa7c910000000b00559b848c9f3mr440361edt.22.1705953828343; Mon, 22 Jan 2024 12:03:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705953828; cv=pass; d=google.com; s=arc-20160816; b=GieuMSa7cPOaR1NYpWnHcEdbmANadfmW/UrIuD/E6/1wFIT5l2fcNXoQlps0L1YQT1 DqP4O6qKf3bGmdvx/QTh25xQq3IDanyenfM2Jp9VY2+eV4VgVABFLATPt+3yHSxgkTbe ssVibWJo4826hwJHcul2BDqDnu1CSP2wuLVG6MX199QZYt37ils2cHOw26K8IFxtMPKe DAiW3APhqjmJ6F9BkT+lAQQGsuQOuwldNb8pG3UuPAc58VvtPN2q34rWkos/45qWMsex 3awKiMu7apkX06uslOw1HKOwkUs8NtM7ghsTRYNH87JeNoay+ZdKbx5P/s2ZNuuhTxuv 6EmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=UY+/M458NshjFahjq+G46cZtUvxPAnqJfcOX5t02M5I=; fh=s2TqTpfbq7az/5Mjz8c4Jof522TGw2e6Pn1AK34aElE=; b=PM+CevMeb3WAQw1KYsB1DwmGoyTMBIcGP+XDS7C0xC7z0Ce5Kqf+WCvs2uU4OWFx0f 3tyy2G445zNKm4VoOT0+ul+dEno+wDrY7JRQpay6HJRZAuC6gXK/NEBBN9FjJvgS0J03 BEmi4c09grsxzoZDiCoRKVqhiYPIQtezS0Jx0W1rIhU4C7lTxeK+p3hLwaazbNy5bizI FrR+0t5btagdqY9/dznhZyvquve02mDBc3jr7uuy2BDGuAL0qnuSCNpj28USUaqvdyL/ EvcXDgLtDtq60rRpX1imOlmaA36jOB6IOhmIs4c2mDuVpVhnO+AYC9WI3MjEyGgEAsHm NWxw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-34099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34099-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x8-20020a50d608000000b0055c2d5b3918si1560265edi.479.2024.01.22.12.03.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 12:03:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-34099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34099-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 15F0C1F2B888 for ; Mon, 22 Jan 2024 20:03:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 632D2405EC; Mon, 22 Jan 2024 20:03:39 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 889703FB33; Mon, 22 Jan 2024 20:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953818; cv=none; b=WpCrPyv6JbjPGtfP5Xjlp8VJbupvEdxjmeTWTtWEfD4j3EXTUhnbGELplJbHPeZQcB4jow2wz3jvLnFGwFM/nGHQX21rUyCp83PyY3frf5AwhSOaOIjOp3Ja/TsIdg0pkwOUywLBSbZj01uof9KHdpjX1dMeNaq/9IjWRd4UPFE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953818; c=relaxed/simple; bh=tVs1j77YTIiaiG5jR+0xbgPqAQDW0HseVbVJz1KcJic=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iwnF9YMrbLIIYrDMTOXGTGUfXrYvPyYd0WoxAKN03rTPNZDcX9D3qvQ0qwBS9MhvAOyVW+NwJ0d5BcxOtsWtqeqB9Xucwl9YoIdqvsnG5ATEEgjeKQXtCrfOBCWwX4a8qfvSceFQuOaVddA2NAzWUtagRUMwWXU2Hi39Nqf2rMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 42A22FF802; Mon, 22 Jan 2024 20:03:26 +0000 (UTC) Message-ID: <5601b896-f67c-432d-a169-0f08928123fc@ghiti.fr> Date: Mon, 22 Jan 2024 21:03:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 04/11] risc: pgtable: define PFN_PTE_SHIFT Content-Language: en-US To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , Matthew Wilcox , Ryan Roberts , Russell King , Catalin Marinas , Will Deacon , Dinh Nguyen , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , "David S. Miller" , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org References: <20240122194200.381241-1-david@redhat.com> <20240122194200.381241-5-david@redhat.com> From: Alexandre Ghiti In-Reply-To: <20240122194200.381241-5-david@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi David, On 22/01/2024 20:41, David Hildenbrand wrote: > We want to make use of pte_next_pfn() outside of set_ptes(). Let's > simpliy define PFN_PTE_SHIFT, required by pte_next_pfn(). > > Signed-off-by: David Hildenbrand > --- > arch/riscv/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > index 0c94260b5d0c1..add5cd30ab34d 100644 > --- a/arch/riscv/include/asm/pgtable.h > +++ b/arch/riscv/include/asm/pgtable.h > @@ -523,6 +523,8 @@ static inline void __set_pte_at(pte_t *ptep, pte_t pteval) > set_pte(ptep, pteval); > } > > +#define PFN_PTE_SHIFT _PAGE_PFN_SHIFT > + > static inline void set_ptes(struct mm_struct *mm, unsigned long addr, > pte_t *ptep, pte_t pteval, unsigned int nr) > { There is a typo in the commit title: risc -> riscv. Otherwise, this is right so: Reviewed-by: Alexandre Ghiti Thanks, Alex