Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2413202rdb; Mon, 12 Feb 2024 04:17:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUI8XaH9l6ocXxnpd+OvMJ7E25FwTY9xmcNKlYdnl/hNoCkUaPZTVB1sj7ZQNF6ckJDNR9qGOd5qet9uqc/swr3Rxy9w/zikGNL1J3kDQ== X-Google-Smtp-Source: AGHT+IGgN0HTG8sV6dVzbdrBfPUZUoWA8/QcPEcP8qVUvDoecjas+P0kZP8jWZTIr8F89OxRHFCA X-Received: by 2002:a17:90b:3781:b0:296:3edf:d48a with SMTP id mz1-20020a17090b378100b002963edfd48amr3902967pjb.3.1707740272640; Mon, 12 Feb 2024 04:17:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707740272; cv=pass; d=google.com; s=arc-20160816; b=cf6DSdGW5tFHmhRVaYLRAOGYYaZNTDgVMS0NhCRvngu/L1rt/9zbhKHsmVypcpZtqo o1pGDoSdGoneRztRIINxCuEoXVx9J00/gjD4sZcgLVLoYaQ6vkONuMvLg0fmcqoq8BoU aGOzox1WvVBPGM982xpuLt3WqvzUK4nzuYAltuXW9zx9oHgIyGNgtZAV64EQURMdGu6p p5mm0pTrPSoCtsJ7mdymbfwkM2f6V0tDHgltX5bSgTf8tWtl+cv7hdg/dftO/B08Rmlp MryUL7vpchlOXqWDJqFL5OCiVkCfqtPEXGQlSARa/kW3idHKER3lWcvfXHG2Tv1GhcD2 pceg== 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=pFmZN5D+FLkUR/TqfEmtJ0sttF3Ny0Zc/N855oN1DmU=; fh=H6V2tjhYODPgzcB0mdxEA8wA6xB2ubcJWis3JyYsNyQ=; b=C6J0LfdTDdrtvrVmk1VuSWf59cOz3x+y0QGBXsk0d78vQoVMmxIJbms1rrd5pUttUj 3chB5a0+6h2CEQFxZgno+Nd8/X/k+eCToTdAkzubKCrdyrR1bAblQEyK2G4em1VKOUtr VFIABiAlRoJCf89sorD3yZDaGANre6a93IOIdodAueaoR1t1ZDuurbZQf2NAzxb6Lz6V nfstxZ5inJl2en+EqAMO7jJtydMCUlRBOhZZQOwivXvuyBKJOLMyQHaE1huZ/75qSWCa pc0c9LCH4th4i8GqpMoJN+AJYHu/baLAYG27gDRXSMbv2rvcbSuLdx5f0kmtdIV03WCh bcSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MWjTPFy8; 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-61532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCXB8KkMuL0+nI+pjGb6MbL0e2l88Pqx6OftZA89yoAR89gX90IE6CnDSWmHWHiexvK3UKqHQ1/pLOb3iO6QbsvV6FrjDbl2fgjfObSj5w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e15-20020a17090a7c4f00b00290da6bae15si189260pjl.127.2024.02.12.04.17.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61532-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=MWjTPFy8; 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-61532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61532-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 2BCBB286861 for ; Mon, 12 Feb 2024 12:16:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C4AE39FE9; Mon, 12 Feb 2024 12:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MWjTPFy8" 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 B0EE539AE3 for ; Mon, 12 Feb 2024 12:14:29 +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=1707740071; cv=none; b=AtNcZRxSxxNBDCWeTXKj+jrHSqk2R9gpqNf1fQlL3/P7njPBvSAYQTwrEL4FXH0BDMEKPWhsGO0iNg2v/Jq0sO2g3qVKEomH+BrbJi5+zUi0tXhOlvwRy5CwVI5x2EYJDfCNqEqE0Qdpih4vNaKjiszbRbRKeL5nSJofhk0zC+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707740071; c=relaxed/simple; bh=61boOWGHAX7npIXs0W2z0PM+ZzOIKqtd39yP/p1NOqo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BsrhNA/EKdAZdXIvShcBPw4QL9czE9DPBOHEEpxf6j+rPoLjlZHZHLQfb3Q8CxDNbs8+1WeqmN4c3UglDG7c++OIk8fFsU9myI+C/JU7vTM9ZA/KOtmzjAYPD8COejzuZ5+hA/e1VK+c+mH4u6lF3f6LkTkk07ohdnXG+hxP308= 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=MWjTPFy8; 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=1707740068; 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=pFmZN5D+FLkUR/TqfEmtJ0sttF3Ny0Zc/N855oN1DmU=; b=MWjTPFy8tyOxjDG7G6/KLw5Or3I+bK+qMmv2ZkM+oZly8LDAfKysm6llMixpIpbIGynx5j bph+UZX8cJfpPxHT3bJKc+ncRBpRe+5V6LiTsI9Agg7RNP7YYydxcaVxas1HSe+lUdh7SJ 3aovxi/UTR3e1+fMzMi2ustUDRUMy44= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-d_mpaUmYOLywFy8PyYEFHA-1; Mon, 12 Feb 2024 07:14:27 -0500 X-MC-Unique: d_mpaUmYOLywFy8PyYEFHA-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5117bac8b0cso2121551e87.3 for ; Mon, 12 Feb 2024 04:14:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707740065; x=1708344865; 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=pFmZN5D+FLkUR/TqfEmtJ0sttF3Ny0Zc/N855oN1DmU=; b=ED7utruF+xzAWjZFY5i4F5GzTLxmj6cajn/FN++y1kqZeP/tbBwrFBy5q26MO8JNoi 4oXlk7TPcQ4X0Rv/b7NBecDJbmPfo+9vrQvicKibhW2f4vMszhp09O0dm2/p3maWj55g 5hs8kkMTIJ3xIQ54F22o58aALq/zuWwiCJLYOYF/9Tg5J94EXFt9da4vOZkiWHaPVE4R VJ21tBFeTXK2HiPNSIEi9At3A+eAvq49XtoK62eRF7T3MiPSyBcAiX24y6uxweuKa5Cb epCK5d17+6Q2tgbUnSYPuWK9Gyr2tnOqiB9UEqYm3DuHN8jE04zENJjF5fKV4QlZMY4d xJeg== X-Forwarded-Encrypted: i=1; AJvYcCWa/6x8n7NVGJUkiAz58cZ0ZG4iJ1AHx9SSi6X6OQNd4pg6SCMC+4/tkQzkWG2sXRLYuxXUSF1csrfTJOhxAJnynfdxg7v3A0yBn2qM X-Gm-Message-State: AOJu0YwqGgr9pN2JxOudzuI5ctkO3oAi3okHwXF8T+SfyXhafG6JLEIC W0ztPLHdPWLp1oCIxxFnwGu3JqSLZjTtgYvYUuCm1tq4FdkNtH8CGjr8/L9IS7enlEOZS07y3jk B2K6dA+vHQ6pSNtZiybsLR3weZJKtA+qcsgJ3cQ8YXRNZR+o7Hccm36EuVHlMjA== X-Received: by 2002:a05:6512:39c9:b0:511:751c:7e8f with SMTP id k9-20020a05651239c900b00511751c7e8fmr4678240lfu.20.1707740065660; Mon, 12 Feb 2024 04:14:25 -0800 (PST) X-Received: by 2002:a05:6512:39c9:b0:511:751c:7e8f with SMTP id k9-20020a05651239c900b00511751c7e8fmr4678188lfu.20.1707740065123; Mon, 12 Feb 2024 04:14:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWin1JcrzkSHrzXWn9NgERU1bRLCGCJmSYsfWUE1Od2oRRe6X1Bvd7ng1cs1dC1WVKDTfFn08/VMnSZDG0Mvx2X9Det59j0bGx41Nv6uj4UY71dgUvdLRhV/SLXp8xFc/1teR4RCtNkBRrYFgWZNNxvmID3326dbEcsOqwzumRnQSASEI0wYBi3PEBSNoStgvtbyNeWpzzBlvqkYjbOzoUJdBHvHBdeAE8jIgKcJ4qW+LRY4kwh+gPsVsss6PU97R866f2R/IragU//+z3eijNEkM4+n+ZwADmS4jvU73NJ6mauZui+QlX+jSe6Ld+T0AFs/rrQn2zAxWYBqlz2nP3FdPsIHwitRXQtN/UyzXyMc+BQ1Oo3cSkXtrs6M9HxVxzi2g+gv57LWHD7XVsOCOvDdnTPdZPN7crMZ5WWohiyyi5k2aPOQcdjFtRFEgqXzoBgVA/6Up29knbYbxje4Eixf96iuwaJ7GQ64S+z5+ZdNLu+18nTjDhfMFZmvmnzham9cxa9/U/rcUdRx7xvi4RlYlXqEsy/DvCBpFrYzMRt92NmvkQl+g6hKDXwxTW5UzlcKKixMaS7fHzEosfl3q9nm6SUk59RdzfOSew7Y0gd2RuNurV5j9tzuvBWCB9ssXeiUjyoBhdUdtmGFuDZns7usjCkgDVTh9DfBhJITZKUh/X1zE2EXw1wz6bxdZlIynR7grKLrWEOZSI6GNLC7V0CdBVdRj6xytotCrTVH+cH5HyAu49HNHbH3180mcDDx0blzsXmgJmMj+Tob6Qn9zURZdCxFwJyNUy3qVRJvuyBXiPOWzFDsu/v+s3j5AnAITgoS9mHgQFC0KqfiMwsEAbut24ZL93SsLjpsEcfCPte Received: from ?IPV6:2003:cb:c730:2200:7229:83b1:524e:283a? (p200300cbc7302200722983b1524e283a.dip0.t-ipconnect.de. [2003:cb:c730:2200:7229:83b1:524e:283a]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b00410cfc34260sm3105364wmo.2.2024.02.12.04.14.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 04:14:24 -0800 (PST) Message-ID: Date: Mon, 12 Feb 2024 13:14:23 +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 v5 03/25] mm: Make pte_next_pfn() a wrapper around pte_advance_pfn() Content-Language: en-US To: Ryan Roberts , Catalin Marinas , Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Cc: linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240202080756.1453939-1-ryan.roberts@arm.com> <20240202080756.1453939-4-ryan.roberts@arm.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacP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N/MpN3hD3 AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+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: <20240202080756.1453939-4-ryan.roberts@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02.02.24 09:07, Ryan Roberts wrote: > The goal is to be able to advance a PTE by an arbitrary number of PFNs. > So introduce a new API that takes a nr param. > > We are going to remove pte_next_pfn() and replace it with > pte_advance_pfn(). As a first step, implement pte_next_pfn() as a > wrapper around pte_advance_pfn() so that we can incrementally switch the > architectures over. Once all arches are moved over, we will change all > the core-mm callers to call pte_advance_pfn() directly and remove the > wrapper. > > Signed-off-by: Ryan Roberts > --- > include/linux/pgtable.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > index 5e7eaf8f2b97..815d92dcb96b 100644 > --- a/include/linux/pgtable.h > +++ b/include/linux/pgtable.h > @@ -214,9 +214,15 @@ static inline int pmd_dirty(pmd_t pmd) > > > #ifndef pte_next_pfn > +#ifndef pte_advance_pfn > +static inline pte_t pte_advance_pfn(pte_t pte, unsigned long nr) > +{ > + return __pte(pte_val(pte) + (nr << PFN_PTE_SHIFT)); > +} > +#endif > static inline pte_t pte_next_pfn(pte_t pte) > { > - return __pte(pte_val(pte) + (1UL << PFN_PTE_SHIFT)); > + return pte_advance_pfn(pte, 1); > } > #endif > I do wonder if we simply want to leave pte_next_pfn() around? Especially patch #4, #6 don't really benefit from the change? So are the other set_ptes() implementations. That is, only convert all pte_next_pfn()->pte_advance_pfn(), and leave a pte_next_pfn() macro in place. Any downsides to that? This patch here would become: #ifndef pte_advance_pfn static inline pte_t pte_advance_pfn(pte_t pte, unsigned long nr) { return __pte(pte_val(pte) + (nr << PFN_PTE_SHIFT)); } #endif #ifndef pte_next_pfn #define pte_next_pfn(pte) pte_advance_pfn(pte, 1) #endif As you convert the three arches, make them define pte_advance_pfn and udnefine pte_next_pfn. in the end, you can drop the #ifdef around pte_next_pfn here. -- Cheers, David / dhildenb