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,URIBL_RED 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 524C2C11F66 for ; Tue, 13 Jul 2021 14:39:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B739061167 for ; Tue, 13 Jul 2021 14:39:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B739061167 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5EA046B008C; Tue, 13 Jul 2021 10:39:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59A516B0095; Tue, 13 Jul 2021 10:39:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43AB66B0096; Tue, 13 Jul 2021 10:39:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0221.hostedemail.com [216.40.44.221]) by kanga.kvack.org (Postfix) with ESMTP id 142606B008C for ; Tue, 13 Jul 2021 10:39:40 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B3DB718482271 for ; Tue, 13 Jul 2021 14:39:38 +0000 (UTC) X-FDA: 78357823236.16.2B8CB1E Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by imf19.hostedemail.com (Postfix) with ESMTP id C1374B0001AD for ; Tue, 13 Jul 2021 14:39:37 +0000 (UTC) Received: by mail-vs1-f48.google.com with SMTP id r18so1600207vsa.4 for ; Tue, 13 Jul 2021 07:39:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wGGUMchIHop3E0SCVlyOXwBpsXQkAPw2igHRXRuQ6fQ=; b=fAy9W3UUzPAFzOc1kCKN8oR3t/U+5wWO8IEhUW32bSwlT//f4/hd0xOObYhnBYqX0Q 93FJnC8tMsDpARzCXVI/Gy4v3Ed2YKKU/nm7u1s0HNkyEIW2u9Bmt8NyehOPDzup5x+D hfjjLm8h282FpaL/0MFy85ggkBvxEr4AU/MGIrszy59BE2AHAu/zZ8oX++tzOuIx/Wpm Kd5o9yy63m3kaDdb2jvBX/0olzfGMDJ1vSQ8V0i6BOvU2ncWNl7W6Lbv2pR+iROCyGMB v70vu5ZuQHn5I8c3vZo5Bk8MO4oo7jjZcpRQxl6Wj6HMGYIig0Y//gTZLLjyt3XJd3vn gH8w== X-Gm-Message-State: AOAM530yRDUMlH7MlkyxCM4SE787OOpq1EhXNMxdtMqomiFt1cfoIirD vcoxSB4/El+XXLmJgepo3O3ZsYjqsFqUQZT+pTg= X-Google-Smtp-Source: ABdhPJyBodoyvzQ+ruL7UabAemPOmapuFy3XG7KLkQ3iWwVxUmrgv6+5f8kkfaqPvIbGhJ4ndfzMxlO7bQhc0ApD3vg= X-Received: by 2002:a67:8702:: with SMTP id j2mr6641947vsd.3.1626187176156; Tue, 13 Jul 2021 07:39:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Tue, 13 Jul 2021 16:39:25 +0200 Message-ID: Subject: Re: mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge To: Christophe Leroy Cc: Andrew Morton , Nicholas Piggin , Mike Kravetz , Mike Rapoport , Linux ARM , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of geertuytterhoeven@gmail.com designates 209.85.217.48 as permitted sender) smtp.mailfrom=geertuytterhoeven@gmail.com; dmarc=none X-Stat-Signature: 4o1zsmh9gbb8yznx17k8n98it3obk14n X-Rspamd-Queue-Id: C1374B0001AD X-Rspamd-Server: rspam01 X-HE-Tag: 1626187177-685716 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: Hi Christophe, On Fri, Jul 2, 2021 at 10:16 PM Linux Kernel Mailing List wrote: > Commit: c742199a014de23ee92055c2473d91fe5561ffdf > Parent: 79c1c594f49a88fba9744cb5c85978c6b1b365ec > Refname: refs/heads/master > Web: https://git.kernel.org/torvalds/c/c742199a014de23ee92055c2473d91fe5561ffdf > 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 to what we > have for architectures without P4D. > > [christophe.leroy@csgroup.eu: arm64: define only {pud/pmd}_{set/clear}_huge when useful] > Link: https://lkml.kernel.org/r/73ec95f40cafbbb69bdfb43a7f53876fd845b0ce.1620990479.git.christophe.leroy@csgroup.eu > [christophe.leroy@csgroup.eu: x86: define only {pud/pmd}_{set/clear}_huge when useful] > Link: https://lkml.kernel.org/r/7fbf1b6bc3e15c07c24fa45278d57064f14c896b.1620930415.git.christophe.leroy@csgroup.eu > > Link: https://lkml.kernel.org/r/5ac5976419350e8e048d463a64cae449eb3ba4b0.1620795204.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=y and CONFIG_PGTABLE_LEVELS=3: ------------[ 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 r8a77951 (DT) pstate: a0400005 (NzCv daif +PAN -UAO -TCO BTYPE=--) 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): [] el1_dbg+0x24/0x4c softirqs last enabled at (1062636): [] _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 r8a77951 (DT) pstate: a0400005 (NzCv daif +PAN -UAO -TCO BTYPE=--) 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): [] el1_dbg+0x24/0x4c softirqs last enabled at (1062704): [] _stext+0x1c8/0x43c softirqs last disabled at (1062697): [] __irq_exit_rcu+0xdc/0x124 ---[ end trace 864024bcea12ea01 ]--- Switching to CONFIG_ARM64_VA_BITS_48=y and CONFIG_PGTABLE_LEVELS=4 makes the warning disappear. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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 like that. -- Linus Torvalds