From patchwork Thu Jan 25 19:32:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 192264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp208768dyb; Thu, 25 Jan 2024 11:33:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQThEQJvI28v0k+Qig9xx/JpNIMp1qZfMjFgrZ/JVgbf1Ws/J7bxbmQNB4gDuxa2ivVWik X-Received: by 2002:ac8:5947:0:b0:42a:4565:b2d with SMTP id 7-20020ac85947000000b0042a45650b2dmr178989qtz.98.1706211211159; Thu, 25 Jan 2024 11:33:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706211211; cv=pass; d=google.com; s=arc-20160816; b=VCN1jxCToBj+wzpNCfj317bRV+QvGd4NZU15R050o7pmFKrcePvwXZVGR/xga7jsaS 8vvppF8RnKq1z2G9VvUD6AiKpOaO3w9UGM5yjZ30Z8krNj+HzkD29svBUnSEs/qtElt2 kwvTTf34Jxoib96+svR5qTgtAPclBuLxqGzNCqo/5xsrUiJZNcB8P16yL/OqhoOi68GG i3l/oLoGRvKuOgwAr5G0zYITfYWdCA+yv4JuaqqgFGJvkuaNryLnde3r3l4Yg95MqfHR w68FxVBVf1QF90O52QQJUmVQp9B6yJxGL0ZZbWIBymitlLyvFMD8T2LU9OKFsrttfl5d /PPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PQouyLY2O+uNJNW8rltya8+XjvAPXlL2xnyiW/c3KZ4=; fh=lZsZCQsH4ia1jFJuQK1Gi3cXLvdnrj+ub8bSs7lwlcw=; b=nxkPD60b4UjLRhE+d919scHd3+KiJHSNvF3Y+SQpcpKmHvx3IwdcY4WL2lzMYKiavf NF6Fv5FtBGfsjgJisxxtFtQGcUE3xxLZ+OgBWK1bLFrtQtYD5dHmEVtXSfpRfb0S7LNF 7fUSduhcpEOg2wogCCJnEWKwK2pICgSNt1k2VWXvArs8mHdkAJn+sWAiJtNBb5q7IMLV g9fB1zh6o2ie8lFHhoYaZgiXDHRMY5pq65cvpHGVsu7QngOrHK6vcg8Zzlr7FpbTi00y 7I7To/rnZVD6CRUkcQ4q8lRxpwY7MVN2pCjaR+8k8hLa/E8PssjfL+faszkyf4mm/d3g dHcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EiqCx66K; 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-39183-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39183-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b1-20020ac87fc1000000b0042a43f2babfsi8841526qtk.351.2024.01.25.11.33.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 11:33:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39183-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EiqCx66K; 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-39183-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39183-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EF1E61C22E7B for ; Thu, 25 Jan 2024 19:33:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73837137C40; Thu, 25 Jan 2024 19:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EiqCx66K" 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 568111350E6 for ; Thu, 25 Jan 2024 19:32:53 +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=1706211174; cv=none; b=uKBBnMCIYiuBteJl+YR4SD1i/wJM+j4921Fsa0GigiQjgyUoE4qzOkHB63pLMZ5sT8rPD2LVhJd+ZPtgsrGKLZ+TlkLsaCa7mpz5l/AOY22jD5iyfBOWHz8bj1jNzQUxBmze2H6zqkmAnrEplXuAp89qiW8qYyE/xOfcHZF1mwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706211174; c=relaxed/simple; bh=4oR4uklhnth919C6I1sotzXwyWZpiE5xrUKUZXjkCr8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TJMuNTkp8Lk79q6rv5wPocEKAWDp28XfevGUSpZOjN0tgKuxE/lBby+ad3M7nR7rfiMFLRR1BsGAU9RYwB+8H9aAasGRCspgF8baOwzGXA8B3i1aWVahPEyDoGM1ghS3MQS7lqKoT53DpjcxjXHVqXD/wDkVmzfAtBqIV408FI8= 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=EiqCx66K; 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=1706211172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PQouyLY2O+uNJNW8rltya8+XjvAPXlL2xnyiW/c3KZ4=; b=EiqCx66KLewv6UHctfjS1nW6UG7qTcWdoc6Z0OLp2hfJ5j3CqAWUOeELKK3SB5JNe2wKQ4 1xljly0JQ7WXWfzIcZn78tX4hY+WZtgjEerPw88L6/rYorHtWDdD/anz3zKt1UsH1QeqmT CWymlNnIXHVbjL2orVCBTDGXQ/B4gmU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606--28HdBjrN0mHVjdOaKldYA-1; Thu, 25 Jan 2024 14:32:48 -0500 X-MC-Unique: -28HdBjrN0mHVjdOaKldYA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AF58485A589; Thu, 25 Jan 2024 19:32:46 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.193.154]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37002492BC6; Thu, 25 Jan 2024 19:32:41 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , 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 Subject: [PATCH v2 02/15] arm/pgtable: define PFN_PTE_SHIFT Date: Thu, 25 Jan 2024 20:32:14 +0100 Message-ID: <20240125193227.444072-3-david@redhat.com> In-Reply-To: <20240125193227.444072-1-david@redhat.com> References: <20240125193227.444072-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789092126735220590 X-GMAIL-MSGID: 1789092126735220590 We want to make use of pte_next_pfn() outside of set_ptes(). Let's simply define PFN_PTE_SHIFT, required by pte_next_pfn(). Signed-off-by: David Hildenbrand --- arch/arm/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index d657b84b6bf70..be91e376df79e 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -209,6 +209,8 @@ static inline void __sync_icache_dcache(pte_t pteval) extern void __sync_icache_dcache(pte_t pteval); #endif +#define PFN_PTE_SHIFT PAGE_SHIFT + void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval, unsigned int nr); #define set_ptes set_ptes