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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 7BE2CC07E9B for ; Mon, 19 Jul 2021 16:10:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24F2061435 for ; Mon, 19 Jul 2021 16:10:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24F2061435 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B994A8D00F4; Mon, 19 Jul 2021 12:10:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B70378D00EC; Mon, 19 Jul 2021 12:10:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3A388D00F4; Mon, 19 Jul 2021 12:10:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 7863E8D00EC for ; Mon, 19 Jul 2021 12:10:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 019B5183B95BE for ; Mon, 19 Jul 2021 16:10:51 +0000 (UTC) X-FDA: 78379825902.21.DDACAB0 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf14.hostedemail.com (Postfix) with ESMTP id 4C4D360019B0 for ; Mon, 19 Jul 2021 16:10:49 +0000 (UTC) Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4GT6Jl233DzB5LN; Mon, 19 Jul 2021 18:10:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SatrIHxHtDdN; Mon, 19 Jul 2021 18:10:47 +0200 (CEST) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 4GT6Jl15MKzB5LJ; Mon, 19 Jul 2021 18:10:47 +0200 (CEST) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 57179688; Mon, 19 Jul 2021 18:15:59 +0200 (CEST) Received: from 37.172.104.68 ([37.172.104.68]) by messagerie.c-s.fr (Horde Framework) with HTTP; Mon, 19 Jul 2021 18:15:59 +0200 Date: Mon, 19 Jul 2021 18:15:59 +0200 Message-ID: <20210719181559.Horde.qwhVC8Uechv72gvR3QHrow1@messagerie.c-s.fr> From: Christophe Leroy To: Geert Uytterhoeven Cc: Linux Kernel Mailing List , Linux MM , Linux ARM , Mike Rapoport , Mike Kravetz , Nicholas Piggin , Andrew Morton Subject: Re: mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge References: In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.236.30 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none X-Rspamd-Server: rspam05 X-Stat-Signature: qcykpbsw9msgazx8ipjeohnjpdkedy9p X-Rspamd-Queue-Id: 4C4D360019B0 X-HE-Tag: 1626711049-477477 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Geert Uytterhoeven a =C3=A9crit=C2=A0: > Hi Christophe, Hi Geert, I'm currently on holidays, I'll have a look when I'm back=20=20 first=20week of August. Sorry for the inconvenience > > On Fri, Jul 2, 2021 at 10:16 PM Linux Kernel Mailing List > wrote: >> Commit: c742199a014de23ee92055c2473d91fe5561ffdf >> Parent: 79c1c594f49a88fba9744cb5c85978c6b1b365ec >> Refname: refs/heads/master >> Web:=20=20=20=20=20=20=20=20=20 >>=20https://git.kernel.org/torvalds/c/c742199a014de23ee92055c2473d91fe5561= ffdf >> Author: Christophe Leroy >> AuthorDate: Wed Jun 30 18:48:03 2021 -0700 >> Committer: Linus Torvalds >> CommitDate: Wed Jun 30 20:47:26 2021 -0700 >> >> mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge >> >> For architectures with no PMD and/or no PUD, add stubs similar=20=20 >>=20to what we >> have for architectures without P4D. >> >> [christophe.leroy@csgroup.eu: arm64: define only=20=20 >>=20{pud/pmd}_{set/clear}_huge when useful] >> Link:=20=20 >>=20https://lkml.kernel.org/r/73ec95f40cafbbb69bdfb43a7f53876fd845b0ce.162= 0990479.git.christophe.leroy@csgroup.eu >> [christophe.leroy@csgroup.eu: x86: define only=20=20 >>=20{pud/pmd}_{set/clear}_huge when useful] >> Link:=20=20 >>=20https://lkml.kernel.org/r/7fbf1b6bc3e15c07c24fa45278d57064f14c896b.162= 0930415.git.christophe.leroy@csgroup.eu >> >> Link:=20=20 >>=20https://lkml.kernel.org/r/5ac5976419350e8e048d463a64cae449eb3ba4b0.162= 0795204.git.christophe.leroy@csgroup.eu >> Signed-off-by: Christophe Leroy >> Cc: Benjamin Herrenschmidt >> Cc: Michael Ellerman >> Cc: Mike Kravetz >> Cc: Mike Rapoport >> Cc: Nicholas Piggin >> Cc: Paul Mackerras >> Cc: Uladzislau Rezki >> Cc: Naresh Kamboju >> Signed-off-by: Andrew Morton >> Signed-off-by: Linus Torvalds > > Since this commit, both WARN_ON() tests in pud_huge_tests() are > triggering on arm64 if CONFIG_ARM64_VA_BITS_39=3Dy and > CONFIG_PGTABLE_LEVELS=3D3: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1 at mm/debug_vm_pgtable.c:438 > debug_vm_pgtable+0x6d0/0x7c4 > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted > 5.13.0-salvator-x-00209-gc742199a014d #1068 > Hardware name: Renesas Salvator-X 2nd version board based on=20=20 >=20r8a77951 (DT) > pstate: a0400005 (NzCv daif +PAN -UAO -TCO BTYPE=3D--) > pc : debug_vm_pgtable+0x6d0/0x7c4 > lr : debug_vm_pgtable+0x6cc/0x7c4 > sp : ffffffc0124cbd00 > x29: ffffffc0124cbd00 x28: 0000000000000c30 x27: ffffff84c5e465a0 > x26: ffffff84c5e46000 x25: ffffff84c5e42000 x24: 00000000000005a0 > x23: ffffffc010c41000 x22: 0020000050cb0fc3 x21: ffffff84c5e45ed0 > x20: ffffff84c27470a8 x19: ffffff84c2747040 x18: 0000000000000cc0 > x17: 00000000b2491cf5 x16: 0000000000000014 x15: 0000000000000000 > x14: 0000000000000002 x13: 00000000000b56dd x12: 0000000000000901 > x11: ffffffc01116d040 x10: 00000000000038e4 x9 : 00000000ffffffff > x8 : 0000000000000000 x7 : ffffffc010cc4cd0 x6 : 0000000000000000 > x5 : 000000000004028e x4 : 0000000000000000 x3 : 0000000000000000 > x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffffff84c08bc040 > Call trace: > debug_vm_pgtable+0x6d0/0x7c4 > do_one_initcall+0xec/0x278 > kernel_init_freeable+0x220/0x224 > kernel_init+0x10/0x108 > ret_from_fork+0x10/0x18 > irq event stamp: 1062694 > hardirqs last enabled at (1062693): [] > free_unref_page+0x120/0x138 > hardirqs last disabled at (1062694): []=20=20 >=20el1_dbg+0x24/0x4c > softirqs last enabled at (1062636): []=20=20 >=20_stext+0x1c8/0x43c > softirqs last disabled at (1062627): [] > __irq_exit_rcu+0xdc/0x124 > ---[ end trace 864024bcea12ea00 ]--- > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1 at mm/debug_vm_pgtable.c:439 > debug_vm_pgtable+0x6d4/0x7c4 > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W > 5.13.0-salvator-x-00209-gc742199a014d #1068 > Hardware name: Renesas Salvator-X 2nd version board based on=20=20 >=20r8a77951 (DT) > pstate: a0400005 (NzCv daif +PAN -UAO -TCO BTYPE=3D--) > pc : debug_vm_pgtable+0x6d4/0x7c4 > lr : debug_vm_pgtable+0x6cc/0x7c4 > sp : ffffffc0124cbd00 > x29: ffffffc0124cbd00 x28: 0000000000000c30 x27: ffffff84c5e465a0 > x26: ffffff84c5e46000 x25: ffffff84c5e42000 x24: 00000000000005a0 > x23: ffffffc010c41000 x22: 0020000050cb0fc3 x21: ffffff84c5e45ed0 > x20: ffffff84c27470a8 x19: ffffff84c2747040 x18: 0000000000000cc0 > x17: 00000000b2491cf5 x16: 0000000000000014 x15: 0000000000000000 > x14: 0000000000000002 x13: 00000000000b56dd x12: 0000000000000901 > x11: ffffffc01116d040 x10: 00000000000038e4 x9 : 00000000ffffffff > x8 : 0000000000000000 x7 : ffffffc010cc4cd0 x6 : 0000000000000000 > x5 : 000000000004028e x4 : 0000000000000000 x3 : 0000000000000000 > x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffffff84c08bc040 > Call trace: > debug_vm_pgtable+0x6d4/0x7c4 > do_one_initcall+0xec/0x278 > kernel_init_freeable+0x220/0x224 > kernel_init+0x10/0x108 > ret_from_fork+0x10/0x18 > irq event stamp: 1062706 > hardirqs last enabled at (1062705): [] > exit_to_kernel_mode+0xf0/0x100 > hardirqs last disabled at (1062706): []=20=20 >=20el1_dbg+0x24/0x4c > softirqs last enabled at (1062704): []=20=20 >=20_stext+0x1c8/0x43c > softirqs last disabled at (1062697): [] > __irq_exit_rcu+0xdc/0x124 > ---[ end trace 864024bcea12ea01 ]--- > > Switching to CONFIG_ARM64_VA_BITS_48=3Dy and CONFIG_PGTABLE_LEVELS=3D4 > makes the warning disappear. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 --=20=20 >=20geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. = But > when I'm talking to journalists I just say "programmer" or something=20= =20 >=20like that. > -- Linus Torvalds