From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 984EEC433DB for ; Wed, 3 Feb 2021 03:22:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D70A64F72 for ; Wed, 3 Feb 2021 03:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232882AbhBCDWK (ORCPT ); Tue, 2 Feb 2021 22:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232719AbhBCDNU (ORCPT ); Tue, 2 Feb 2021 22:13:20 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D10C061573; Tue, 2 Feb 2021 19:01:54 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id g3so13656676plp.2; Tue, 02 Feb 2021 19:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=sjnb/xpg2f3ib4neVS501ZZ2+5QYiUqICTfujzksFFyQvYH9TTRQ1OHrQ42QsKAXSw bYeMWQeeyhhJ2MqhVAjE/WET+Lr0Z5huKLrYJ8ysoXbZDvjSBYqrbZV2uDM/7yce2mp4 xqiKORJgRDQ2BObp815Hkg/jms8ML0Waag35kaQiy4qmqOHdGz92PvVy8Q7IB/VJMguq lHOoJy5FAmrj4d4B6yT8Dc98F4Lvm3ysZk3pWiatccBV6pgOgdhhBhtMFa3uP5o4RDHo MYU9ebBwx4j4daf2bNPsakaE9OJcuDEYdJ07eo99qx2mYqdjYpE59yOSMBlWXXOBZ5ui FWsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=WZjMecXcWWDQVxjGRw3gYx0yXFiZxnPLDji+jYcguCqPHXRQlZeNl6VOJmUUT4YYM0 /YgfqAcy12bho83b5v80HGDL24zVU5p1yl/C75YrH/PjRJs1inThWTPA7EpUG5L1/qAJ sVYNOOlg+1hVqlFLcY1zsD5IG4dZL3MCpEF01a2pBaLDk9YmknXrwOmuppG8CCIwCoTY /Qbd/jMYz3pGUI1kddtEp2P2wOjqAVgjXHS9u9fF+mCa+ZiM82M78rWsLhKKRGU7rK0Z 2pgPV3UOsqPvLI1NeZQPoe1WGR4Fb28HxmVc3ZNuXtt3MZkD64ZXPsXHv+i1D2Z+vBbZ e6sQ== X-Gm-Message-State: AOAM532gZvNDoFXgBGlBNZP32TpTnn83p9wW5MzqCWfUd7rzgoD9cCIz qe15lYvtamwrfWUArT+tYcM= X-Google-Smtp-Source: ABdhPJzMyqDrlccGlrZjTkYB9avc7WfWGiiIvH2N7+xa6oX+t0dwLupW2e+1/RqMFKXpP4AxmXtK+Q== X-Received: by 2002:a17:902:a40b:b029:e0:1096:7fb with SMTP id p11-20020a170902a40bb02900e0109607fbmr1125710plq.40.1612321313502; Tue, 02 Feb 2021 19:01:53 -0800 (PST) Received: from localhost (60-242-11-44.static.tpgi.com.au. [60.242.11.44]) by smtp.gmail.com with ESMTPSA id 78sm322545pfx.127.2021.02.02.19.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 19:01:53 -0800 (PST) Date: Wed, 03 Feb 2021 13:01:47 +1000 From: Nicholas Piggin Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables To: Russell King - ARM Linux admin Cc: Andrew Morton , Christophe Leroy , Ding Tianhong , Christoph Hellwig , Jonathan Cameron , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Rick Edgecombe References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> In-Reply-To: <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Message-Id: <1612321006.e59gckigqu.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Russell King - ARM Linux admin's message of February 2, 2021 = 9:13 pm: > On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtab= le.h >> index c02f24400369..d63a5bb6bd0c 100644 >> --- a/arch/arm/include/asm/pgtable.h >> +++ b/arch/arm/include/asm/pgtable.h >> @@ -166,6 +166,9 @@ extern struct page *empty_zero_page; >> =20 >> extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; >> =20 >> +#define pud_page(pud) pmd_page(__pmd(pud_val(pud))) >> +#define pud_write(pud) pmd_write(__pmd(pud_val(pud))) >=20 > As there is no PUD, does it really make sense to return a valid > struct page (which will be the PTE page) for pud_page(), which is > several tables above? There is no PUD on 3-level either, and the pgtable-nopud.h which it uses=20 also passes down p4d_page to pud_page, so by convention... Although in this case at least for my next patch it won't acutally use=20 pud_page unless it's a leaf entry so maybe it shouldn't get called anyway. Thanks, Nick From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55B66C433E0 for ; Wed, 3 Feb 2021 03:15:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A457364DDE for ; Wed, 3 Feb 2021 03:15:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A457364DDE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DVmz40vWWzDwwR for ; Wed, 3 Feb 2021 14:15:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102c; helo=mail-pj1-x102c.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sjnb/xpg; dkim-atps=neutral Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4DVmg84KLhzDwmD for ; Wed, 3 Feb 2021 14:01:55 +1100 (AEDT) Received: by mail-pj1-x102c.google.com with SMTP id d2so3697031pjs.4 for ; Tue, 02 Feb 2021 19:01:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=sjnb/xpg2f3ib4neVS501ZZ2+5QYiUqICTfujzksFFyQvYH9TTRQ1OHrQ42QsKAXSw bYeMWQeeyhhJ2MqhVAjE/WET+Lr0Z5huKLrYJ8ysoXbZDvjSBYqrbZV2uDM/7yce2mp4 xqiKORJgRDQ2BObp815Hkg/jms8ML0Waag35kaQiy4qmqOHdGz92PvVy8Q7IB/VJMguq lHOoJy5FAmrj4d4B6yT8Dc98F4Lvm3ysZk3pWiatccBV6pgOgdhhBhtMFa3uP5o4RDHo MYU9ebBwx4j4daf2bNPsakaE9OJcuDEYdJ07eo99qx2mYqdjYpE59yOSMBlWXXOBZ5ui FWsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=g7xjtMw4xzlycY2wF42CvyQqCvbLc15IX+yS5IIrCfczy7F08ZKye+G+OLKXYeHmPm PRU3iVPujkebQoRwGk5NcOxrrgB75+RU047K4Xk5X+fkVPVC3APeepBU+lioDoaaMdaV 3sSw1hx5hjjLbmXQPBIERQkSeUX6q26ExcYKBiZK13+eWvb85mLn3hp8BBpaKhAl7RwR bDZgJrozRrCWcI7SyWKq8/W0SWk7X5ESaAB6SFKr9MKD2viQJU+2AHlju4+wYO0I+x+S 1hfUjUAEElxBbQSpr1B+PHKuAMdEdhVuHQAcqkO36EYDuFIl3EPoGFGsQpdO7mp5DH8f N+Gg== X-Gm-Message-State: AOAM533atIVttf34Mth1NNDBcSQRrjGx+mq4G3GF0l+boVEaOekNoW5n 5Jj0M6hZGdPYAwIHRKVxzH0= X-Google-Smtp-Source: ABdhPJzMyqDrlccGlrZjTkYB9avc7WfWGiiIvH2N7+xa6oX+t0dwLupW2e+1/RqMFKXpP4AxmXtK+Q== X-Received: by 2002:a17:902:a40b:b029:e0:1096:7fb with SMTP id p11-20020a170902a40bb02900e0109607fbmr1125710plq.40.1612321313502; Tue, 02 Feb 2021 19:01:53 -0800 (PST) Received: from localhost (60-242-11-44.static.tpgi.com.au. [60.242.11.44]) by smtp.gmail.com with ESMTPSA id 78sm322545pfx.127.2021.02.02.19.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 19:01:53 -0800 (PST) Date: Wed, 03 Feb 2021 13:01:47 +1000 From: Nicholas Piggin Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables To: Russell King - ARM Linux admin References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> In-Reply-To: <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Message-Id: <1612321006.e59gckigqu.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Ding Tianhong , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Jonathan Cameron , Andrew Morton , Rick Edgecombe , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Excerpts from Russell King - ARM Linux admin's message of February 2, 2021 = 9:13 pm: > On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtab= le.h >> index c02f24400369..d63a5bb6bd0c 100644 >> --- a/arch/arm/include/asm/pgtable.h >> +++ b/arch/arm/include/asm/pgtable.h >> @@ -166,6 +166,9 @@ extern struct page *empty_zero_page; >> =20 >> extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; >> =20 >> +#define pud_page(pud) pmd_page(__pmd(pud_val(pud))) >> +#define pud_write(pud) pmd_write(__pmd(pud_val(pud))) >=20 > As there is no PUD, does it really make sense to return a valid > struct page (which will be the PTE page) for pud_page(), which is > several tables above? There is no PUD on 3-level either, and the pgtable-nopud.h which it uses=20 also passes down p4d_page to pud_page, so by convention... Although in this case at least for my next patch it won't acutally use=20 pud_page unless it's a leaf entry so maybe it shouldn't get called anyway. Thanks, Nick From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC26AC433E0 for ; Wed, 3 Feb 2021 03:03:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6404164F49 for ; Wed, 3 Feb 2021 03:03:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6404164F49 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:MIME-Version:In-Reply-To:References:To: Subject:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ft/2rQkzVO/RNrn+yN+g+IXoSizlnJS6TQH1jxvSlZs=; b=OcthYCW2pQKTzUVtQqSo0a1Q4 thuPxklpipkUMQtAmYnGI8KfZ6c8y3LlagElsO7pVuBxH5bdm59SL4Ub7GwvSlCnHbwS3nyBx+tQN F7lGykE0Nco7fPAjlNmokskZ0OdQRtvJrG0pPrmo81HhZZ0gGDCdzRzyhlEv9MtHTjdXojZcv5FXR CN70O+Ln7TuTg071MlJAwWTPt6nb0I/WSlEV9WWf8W9+aIYmMpkh9GrTyXPCIWy/8+JzPk2c+J5fC 99F8oZfvyVDhsRmwX6aMMVQR3lq8sm9pwd/XzOO9nasJpQyshEGot2UPhm3gIUJui5toeks2syWP0 0GYQRkfww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l78QY-0007oF-Fm; Wed, 03 Feb 2021 03:01:58 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l78QV-0007nQ-RB for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 03:01:56 +0000 Received: by mail-pj1-x1029.google.com with SMTP id cl8so2256616pjb.0 for ; Tue, 02 Feb 2021 19:01:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=sjnb/xpg2f3ib4neVS501ZZ2+5QYiUqICTfujzksFFyQvYH9TTRQ1OHrQ42QsKAXSw bYeMWQeeyhhJ2MqhVAjE/WET+Lr0Z5huKLrYJ8ysoXbZDvjSBYqrbZV2uDM/7yce2mp4 xqiKORJgRDQ2BObp815Hkg/jms8ML0Waag35kaQiy4qmqOHdGz92PvVy8Q7IB/VJMguq lHOoJy5FAmrj4d4B6yT8Dc98F4Lvm3ysZk3pWiatccBV6pgOgdhhBhtMFa3uP5o4RDHo MYU9ebBwx4j4daf2bNPsakaE9OJcuDEYdJ07eo99qx2mYqdjYpE59yOSMBlWXXOBZ5ui FWsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=1D1lbt3Rz38vk3ZD1aJTQKM02Emv7JinCawTwnh8mas=; b=uhzbm+Tt4pthqgYDHFmZEVIrTjSTMAAXFAxUqdrPpBP3xrO5GjMdi2/CUOSr34Nkb9 Hjln7aarQKx9AQlsNW9qMs3ivaTbLKfz9yUQ0xBR/G2yLjM+vlvT6/RnI0FnCpXPXYA9 5XevXXivk2BpDbuXv067uVlL2XgYLJSjcuPKz45agQiD0B6PoJvSihZR65ri5ni8MOnf CJ6z8QZ6s+/foqTEC8rP1s9+0zbauxQ5oeASMCVBrhxtk4p95xoUWLHpbAxUnhS85L5T cs5SjOiG/qf0v580Tt8op6PZQ5rsof5SMBAgy/XWH7GOR4BfVd6rRka36ttZsUyfKK+k 7AYQ== X-Gm-Message-State: AOAM531B3BzPlA+qMvE0KXDLP89tRBhXUFTT48QI0qh684zAVT2A4acv JIk8tdjMavSPIgg+8drVLrQ7vDnzNr0= X-Google-Smtp-Source: ABdhPJzMyqDrlccGlrZjTkYB9avc7WfWGiiIvH2N7+xa6oX+t0dwLupW2e+1/RqMFKXpP4AxmXtK+Q== X-Received: by 2002:a17:902:a40b:b029:e0:1096:7fb with SMTP id p11-20020a170902a40bb02900e0109607fbmr1125710plq.40.1612321313502; Tue, 02 Feb 2021 19:01:53 -0800 (PST) Received: from localhost (60-242-11-44.static.tpgi.com.au. [60.242.11.44]) by smtp.gmail.com with ESMTPSA id 78sm322545pfx.127.2021.02.02.19.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 19:01:53 -0800 (PST) Date: Wed, 03 Feb 2021 13:01:47 +1000 From: Nicholas Piggin Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables To: Russell King - ARM Linux admin References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> In-Reply-To: <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Message-Id: <1612321006.e59gckigqu.astroid@bobo.none> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_220155_898500_007D660A X-CRM114-Status: GOOD ( 14.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Ding Tianhong , linux-kernel@vger.kernel.org, Christophe Leroy , Christoph Hellwig , linux-mm@kvack.org, Jonathan Cameron , Andrew Morton , Rick Edgecombe , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Excerpts from Russell King - ARM Linux admin's message of February 2, 2021 9:13 pm: > On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h >> index c02f24400369..d63a5bb6bd0c 100644 >> --- a/arch/arm/include/asm/pgtable.h >> +++ b/arch/arm/include/asm/pgtable.h >> @@ -166,6 +166,9 @@ extern struct page *empty_zero_page; >> >> extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; >> >> +#define pud_page(pud) pmd_page(__pmd(pud_val(pud))) >> +#define pud_write(pud) pmd_write(__pmd(pud_val(pud))) > > As there is no PUD, does it really make sense to return a valid > struct page (which will be the PTE page) for pud_page(), which is > several tables above? There is no PUD on 3-level either, and the pgtable-nopud.h which it uses also passes down p4d_page to pud_page, so by convention... Although in this case at least for my next patch it won't acutally use pud_page unless it's a leaf entry so maybe it shouldn't get called anyway. Thanks, Nick _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel