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=-10.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 7E8D2C433E6 for ; Tue, 2 Feb 2021 12:08:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55C8664F5E for ; Tue, 2 Feb 2021 12:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbhBBMIS (ORCPT ); Tue, 2 Feb 2021 07:08:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbhBBMIF (ORCPT ); Tue, 2 Feb 2021 07:08:05 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9199C061573; Tue, 2 Feb 2021 04:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ff/wpjr28khgZASsQau1yxjR8C0J+5ugrzPgigwTWJ0=; b=g+zlPNAWAiJW5GOWEjHNIVmqA 0i1nsvoEBElLib6NPI+ewFmTSmVP7JGSQ7ZLly3jTDpFtnIDio9CEcaBiQSFwcgmPHoMvRYCbwGWt PkjTmE1MYLjA2QUDOjN2Mn234zZSJtnzMrVt+Kc4GD8aK1RdS6EgeyWWIM9ttIO1LsqlzqeuKm1bX hC3JYtKbNMb2qpSdXuDo/qCblleoKhE5dft21RMev3iDIm67Fs0AiDx4do2YnTx+1m42FvFdXA9/n hFly2dtJBy7Hrr+SaHO+q+VcPF9VPjlgiUyfr22h++1gaon0GMT8fIpHV/Ua3BRHpputjXSfiebb7 f+YrLjvrA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38196) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6uSd-0004KH-MO; Tue, 02 Feb 2021 12:07:11 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1l6uSa-00030y-Hf; Tue, 02 Feb 2021 12:07:08 +0000 Date: Tue, 2 Feb 2021 12:07:08 +0000 From: Russell King - ARM Linux admin To: Ding Tianhong Cc: Nicholas Piggin , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables Message-ID: <20210202120708.GM1463@shell.armlinux.org.uk> References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 07:47:04PM +0800, Ding Tianhong wrote: > On 2021/2/2 19:13, Russell King - ARM Linux admin wrote: > > 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? > > > --- a/arch/arm/include/asm/pgtable-2level.h > +++ b/arch/arm/include/asm/pgtable-2level.h > > +static inline int pud_none(pud_t pud) > +{ > + return 0; > +} > > I think it could be fix like this. We already have that. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! 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=-10.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 14966C433E0 for ; Wed, 3 Feb 2021 01:27:20 +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 24D2464F4C for ; Wed, 3 Feb 2021 01:27:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24D2464F4C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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 4DVkYt5fsqzDqVr for ; Wed, 3 Feb 2021 12:27:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=armlinux.org.uk (client-ip=2001:4d48:ad52:32c8:5054:ff:fe00:142; helo=pandora.armlinux.org.uk; envelope-from=linux+linuxppc-dev=lists.ozlabs.org@armlinux.org.uk; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.a=rsa-sha256 header.s=pandora-2019 header.b=g+zlPNAW; dkim-atps=neutral Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DVNpw0cx2zDr9C for ; Tue, 2 Feb 2021 23:07:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ff/wpjr28khgZASsQau1yxjR8C0J+5ugrzPgigwTWJ0=; b=g+zlPNAWAiJW5GOWEjHNIVmqA 0i1nsvoEBElLib6NPI+ewFmTSmVP7JGSQ7ZLly3jTDpFtnIDio9CEcaBiQSFwcgmPHoMvRYCbwGWt PkjTmE1MYLjA2QUDOjN2Mn234zZSJtnzMrVt+Kc4GD8aK1RdS6EgeyWWIM9ttIO1LsqlzqeuKm1bX hC3JYtKbNMb2qpSdXuDo/qCblleoKhE5dft21RMev3iDIm67Fs0AiDx4do2YnTx+1m42FvFdXA9/n hFly2dtJBy7Hrr+SaHO+q+VcPF9VPjlgiUyfr22h++1gaon0GMT8fIpHV/Ua3BRHpputjXSfiebb7 f+YrLjvrA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38196) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6uSd-0004KH-MO; Tue, 02 Feb 2021 12:07:11 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1l6uSa-00030y-Hf; Tue, 02 Feb 2021 12:07:08 +0000 Date: Tue, 2 Feb 2021 12:07:08 +0000 From: Russell King - ARM Linux admin To: Ding Tianhong Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables Message-ID: <20210202120708.GM1463@shell.armlinux.org.uk> References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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, linux-kernel@vger.kernel.org, Nicholas Piggin , 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" On Tue, Feb 02, 2021 at 07:47:04PM +0800, Ding Tianhong wrote: > On 2021/2/2 19:13, Russell King - ARM Linux admin wrote: > > 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? > > > --- a/arch/arm/include/asm/pgtable-2level.h > +++ b/arch/arm/include/asm/pgtable-2level.h > > +static inline int pud_none(pud_t pud) > +{ > + return 0; > +} > > I think it could be fix like this. We already have that. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! 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=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 9EA98C433DB for ; Tue, 2 Feb 2021 12:11:59 +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 5127E64DDA for ; Tue, 2 Feb 2021 12:11:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5127E64DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Kd5eEctNx65mRU2WI4F7xDFaeZqEaLvarsNZWZynrac=; b=ea6wtpfKTqAAxOjysNixlK8ec DECqIGwRaSDbm4D1rZazaTsh8Hng68TJ11Md4UmH+OnvXCca14D4LIipg0fHAkknLC/yyji3xrIar mGZScyXo759TjtErFhzqCVnZOO+/JtJwhh8gB1iY9eboSRlLh3sqc5qNASj55jgYwhYj6frqoJoXM fso4dkJyzTqF/RfqYUzVMQg4h8uFOwCipydzjgkqIH9aEMtbwESr2Uy8PKp5wmo+LQg9qUMhmUbK+ qRnPFwqoR/3eAW50Lqma9pQ9W8Z/Das/TbYogMIqt6kU4Q+1WSq1kMuhyhc2RINC/TVMy4LpzMJeP zLqwgqWIw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6uVs-0008T1-GI; Tue, 02 Feb 2021 12:10:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6uVq-0008EO-Q6 for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 12:10:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ff/wpjr28khgZASsQau1yxjR8C0J+5ugrzPgigwTWJ0=; b=g+zlPNAWAiJW5GOWEjHNIVmqA 0i1nsvoEBElLib6NPI+ewFmTSmVP7JGSQ7ZLly3jTDpFtnIDio9CEcaBiQSFwcgmPHoMvRYCbwGWt PkjTmE1MYLjA2QUDOjN2Mn234zZSJtnzMrVt+Kc4GD8aK1RdS6EgeyWWIM9ttIO1LsqlzqeuKm1bX hC3JYtKbNMb2qpSdXuDo/qCblleoKhE5dft21RMev3iDIm67Fs0AiDx4do2YnTx+1m42FvFdXA9/n hFly2dtJBy7Hrr+SaHO+q+VcPF9VPjlgiUyfr22h++1gaon0GMT8fIpHV/Ua3BRHpputjXSfiebb7 f+YrLjvrA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38196) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6uSd-0004KH-MO; Tue, 02 Feb 2021 12:07:11 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1l6uSa-00030y-Hf; Tue, 02 Feb 2021 12:07:08 +0000 Date: Tue, 2 Feb 2021 12:07:08 +0000 From: Russell King - ARM Linux admin To: Ding Tianhong Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables Message-ID: <20210202120708.GM1463@shell.armlinux.org.uk> References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_071030_886212_00027A81 X-CRM114-Status: GOOD ( 17.35 ) 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, linux-kernel@vger.kernel.org, Nicholas Piggin , Christoph Hellwig , linux-mm@kvack.org, Christophe Leroy , 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 On Tue, Feb 02, 2021 at 07:47:04PM +0800, Ding Tianhong wrote: > On 2021/2/2 19:13, Russell King - ARM Linux admin wrote: > > 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? > > > --- a/arch/arm/include/asm/pgtable-2level.h > +++ b/arch/arm/include/asm/pgtable-2level.h > > +static inline int pud_none(pud_t pud) > +{ > + return 0; > +} > > I think it could be fix like this. We already have that. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel