Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp67474rdb; Mon, 22 Jan 2024 12:08:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+HHsPb3oc7TtwFHetreQnwVY/Mp9A8jBep7p6tmpqN/wR8Vmocw31k6dS1RVqvz1cAoog X-Received: by 2002:a17:90a:2bc6:b0:290:1747:237d with SMTP id n6-20020a17090a2bc600b002901747237dmr1482974pje.96.1705954120036; Mon, 22 Jan 2024 12:08:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705954120; cv=pass; d=google.com; s=arc-20160816; b=xpBUc90Ta3YQyPgTNW58/LzStI8Fgs6t32pmMnuNMUts9k6zddDu/bZfJ+Bb3UOoUg ChoMdjlXWYFqnJpXNiXcaxTmiAIVsz/8xzKMG8sRZguoIWT9d2W78QsRb4Pgad73FT9Q qV5gY+zfZvLGfzHD9Ol5hdjQ+PSeIqinmFayGv1u4WtAJMQanjsuQ1KeI4RJ+ssGfWuR RYgrNS/A0F7r4y3ohJs9jvhY//NaPFk1s4VLryqOgPUqB2TdRJWhDbfEZ4P8oGx67Rd9 eKz6riW+ltX+RbE0wTr6K54EbGzyVG9TfZHNshWCnTz8BMfhcPgHVwhuhoe2HgBr0kQf 95gA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=74vQSZ9Ib6W2cdwmSu4B7EOliPKMRAyQqJMwdDwvZic=; fh=KR/kAFwjDzVD1+UWH5IqqtMOEQO4nH4rPrGr6zN1zx0=; b=wuxdv+kVvfZo6sw1EC2zgjwG9/Y7OZHlUFvuesXGvMc9zXK3CvqFyVL1OXNdrtbfg9 ABxtQmZFBMp5Y37n3OEt6oWMiaBN9gkcN7QIAtW7E3uqpcopS3lT6W/eIe5CivU0iMMb S8BmSNha0bbCdw2CLT5gFIxkfSI932/zlxLTR+MhgGYTYqiSCGHi6KZZUPXyLdE5s8xq mcbl+O5MsRzBUdJU2068ffuwhygUSbPGdTuCaVDq7Q/1uWj80msWFWfxsmO7vPm6A//8 QuyCj18vhT1TNvWZHNUC+ixqkK2QCTH+DkM8urfwsVE7nuD2FfWEcRYVY+1/sn3GP2sg FWIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UPusDtoh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-34101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y14-20020a17090a600e00b002907debffa7si3725966pji.135.2024.01.22.12.08.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 12:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UPusDtoh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-34101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A64E428E475 for ; Mon, 22 Jan 2024 20:08:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF08B40BE5; Mon, 22 Jan 2024 20:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UPusDtoh" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 60CEE405DA for ; Mon, 22 Jan 2024 20:08:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705954114; cv=none; b=jcrC8TeI9lTdVGKG3OKP215mRbh1TExjXmxIhUT6+QFf3xE8mbOQVJuu38d6MshLLIKh12DF0aOjMf+lKzW5SGDpjvIy55zHuXwlmcTnlKEHC/Y8ZDLQbL7sgpVOP6tFb6PhQ1eyrPH444+MZY/ND5k8VNChJSjlvxalAxcZhQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705954114; c=relaxed/simple; bh=z5uM5OZjv/G1w3yuWwSEb6giYuSWp5QrDCaBnZEn+yE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H6hlSMYKEkIx1qwt9UUFfDXYY9+F2pyZbD7t4ZucvoFVDzbJOhtge6+ieSuTIYpD2XWopzmOUql0PyoohIaHvFfNFXCiXxdc8gyEV7wkqRuhZnt6gFfLpT36awnQGmiibSLSlEI/nyVf4RztaY03UJlUOM+fdXcf0tLFPSYG3vw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UPusDtoh; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705954112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=74vQSZ9Ib6W2cdwmSu4B7EOliPKMRAyQqJMwdDwvZic=; b=UPusDtohGcricQhdqTeH6ZQNjFht8PzZ7BEwt1SYTQp+aS+yy0rq64eYinIZper6Gq3UO9 SFMM77HP+cjeOB0hUQK49eAhREJAS89Gcd7JxyyGfISR1z9dq75G4NQR69zobQCCujjNoH 3bgg8RIf6vFX/fwX56ewVHIR+ks3PKE= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-482-rr7iqbORPoO9NwS01H4psg-1; Mon, 22 Jan 2024 15:08:28 -0500 X-MC-Unique: rr7iqbORPoO9NwS01H4psg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40eaf5c52d3so9063125e9.1 for ; Mon, 22 Jan 2024 12:08:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705954107; x=1706558907; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=74vQSZ9Ib6W2cdwmSu4B7EOliPKMRAyQqJMwdDwvZic=; b=aqfT6b4x327gHpfhJnW7pFLDfVCIL+ir1BaPuxyPUEhCZIzWwzKrgzptx/k0ccxzxa YYGLKJex5BKCZoBPq3tUlW8cptFQlRGK90ISyb0HCXcfX5xKwvUfhCutGuBYgxybSVso 5Lw1xenbfTb9XXezZpmJ7gKvXhsndNvUb19XChBmpKbzyK1tZjmQ2nADA7RH3y58Ea2R PeIjque66V057dj0quajZSaflBZM/Arv88BeorHu8iQ5mFZRgq7EZ7AfbHzbbiBVnyS5 H2yvqpjHn3uvGzVxzMnbBe+rzokuBpp7xiYgsABEsbRQz1kD3U/DjFBNjSKeTYe+25sI ID2A== X-Gm-Message-State: AOJu0Yy3VYgSZT8erb2KHESetKLq6/fK3s6bdxRfS5OJIgTlziCb4fCF 4WcP8JB96CXi5uBU/e3TOPUh2MRtLiube+C5BHOuWAXY/GWMQH9U+0EVtBevRhMIMi8mrI3shYh 2muSRxmJCT0l4D6u1Li3/mC1nkODZTAVhX9UJ3/JLTQrJmzkfQNqR/UTSbR8OfA== X-Received: by 2002:a05:600c:4f4a:b0:40e:b207:37ad with SMTP id m10-20020a05600c4f4a00b0040eb20737admr585135wmq.130.1705954106936; Mon, 22 Jan 2024 12:08:26 -0800 (PST) X-Received: by 2002:a05:600c:4f4a:b0:40e:b207:37ad with SMTP id m10-20020a05600c4f4a00b0040eb20737admr585125wmq.130.1705954106524; Mon, 22 Jan 2024 12:08:26 -0800 (PST) Received: from ?IPV6:2003:cb:c737:f400:b194:1841:c4a5:75f5? (p200300cbc737f400b1941841c4a575f5.dip0.t-ipconnect.de. [2003:cb:c737:f400:b194:1841:c4a5:75f5]) by smtp.gmail.com with ESMTPSA id v16-20020a5d4b10000000b00337d4eed87asm11594671wrq.115.2024.01.22.12.08.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 12:08:26 -0800 (PST) Message-ID: <01aa95ee-0abd-4d65-b03b-2191285d1ac3@redhat.com> Date: Mon, 22 Jan 2024 21:08:24 +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: Alexandre Ghiti , 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> <5601b896-f67c-432d-a169-0f08928123fc@ghiti.fr> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxR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ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <5601b896-f67c-432d-a169-0f08928123fc@ghiti.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 22.01.24 21:03, Alexandre Ghiti wrote: > 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: Whops :) > > Reviewed-by: Alexandre Ghiti Thanks! -- Cheers, David / dhildenb