From patchwork Wed Aug 14 15:44:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13763677 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC4F0C52D7B for ; Wed, 14 Aug 2024 16:09:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D2336B0088; Wed, 14 Aug 2024 12:09:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 659206B0089; Wed, 14 Aug 2024 12:09:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FA0F6B008A; Wed, 14 Aug 2024 12:09:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2D74A6B0088 for ; Wed, 14 Aug 2024 12:09:28 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 92C471C4CD0 for ; Wed, 14 Aug 2024 16:08:44 +0000 (UTC) X-FDA: 82451334168.29.F658197 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 38BF1C003B for ; Wed, 14 Aug 2024 16:08:38 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Nlp68Wv4; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723651649; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=Y8GzTtU2QoStw/WgTavIsPk3vntaV6mcfxUlw+vTkw4=; b=KEUQUBnqznLMCelnBkic1go8s4r6X3wo55LyIl9pmENfLBDPP0cMyXq+k4l5PGACINutvO ky7wMMUuk1+xZNC9TSFG7oQ0w0nQjcgAyNTpc5wBQTZ7ZwlP0lwgk/31nHc2NFpeym4ZYl 5vG0VaxNScRAFcbJe40vqKNvIGLoNrs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723651649; a=rsa-sha256; cv=none; b=EqUXY+V8JdMK2SD0gf/z7F9syvgaAyDbzoq9zYARtRqN/gmc0NCAW05Acr/57uGBXZJdik 7ZRTJ/EdJ56TIj9mP1BERliR8nDXxDkThxxb0wMYUfYsLOEigyg20QzSgmFFsBS5JF+AU9 9G7/4Y45PG/mvfsb11DVCmU1Cn3C+YA= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Nlp68Wv4; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=Y8GzTtU2QoStw/WgTavIsPk3vntaV6mcfxUlw+vTkw4=; b=Nlp68Wv4gWlG8g9amXu9RSnoTE bGIkORrON8YDkyXuNB3pHR0x3EWS8Cj46g5V0nmkoNra8NLu3eoLcdQDcSfXtQUcNoQv73JbO5irY YO/2KtHV5uYXpcKre5wKy5/4Hv3pAdgjf5CgBoylTiilTIclax+k/Y1qqeGMWDIu25oBopw+ZSuo/ +PbCg3gzutTroTrptbNhWjqMZBqJlVGdigr+h7eL9Gwfxuq3uaXQEiYu6lJesN6VHloOF2NJxcVQ5 g8Bi5zp2BmmvlEC8p4EYP5Qf2CZacyuv2wEMcW0vqzDern12I/bCWq9yZIfLqu4qinNlF3KSoMUbe DgnzBqVg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1seGAr-00000000gH2-3gSE; Wed, 14 Aug 2024 15:44:33 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org, linux-arch@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-s390@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org Subject: [PATCH 0/5] Provide a single definition of mk_pte() Date: Wed, 14 Aug 2024 16:44:20 +0100 Message-ID: <20240814154427.162475-1-willy@infradead.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Stat-Signature: cb3rp5rnztm11ecbuoc3hc7ds5os7u3j X-Rspamd-Queue-Id: 38BF1C003B X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1723651718-135124 X-HE-Meta: U2FsdGVkX180ncM30HaAFdsl8FDKirwRye3mzhHyBGZP6+k42IFaGcg1zpv0tSLatlhfxbxmYCPgwS416+ugrEzb+m1Ho0+3fwnAe7Fc6fXY0ADiAex9SuHdAylhkxUfSZIoXLMNgOoajznHusTjUFuMD4V1D5L2nO746lD8x5Fo//vuEAyrUwHDTVWIsY6r5/0HfR8tp/gQRu19bzgGyU9WH3jDnfdZRIg78S4nucxsZvgUPHn+6C1RY2LMjfgPmgWaIYw7qo21mVSu81+7HpQNWT0LBReTDL2tDFDFFoYm/R6aTpP3Ns7qbrhJUVlnPe6UFefncqRC3pMioEmvFOO5UtlzOiq7XXyilvcRSH2kfFNUB5FezLZzE4shdC/6RvTHsaVcS4em+wLFePIodRg9vA8AqGOKSikFrqI6vckzWkB56lLvy+VZGlzomMzj1lq4uWxBEH7scFlGZvMHZChYabp+ZZti3vcWPk2zjoqRXbuy7/xpWKCNoHK8TAObcq+sAmXSLl8MQCUtb0q24zyu2SZrXg17Dwldb2E6AUITQgNjR7PhknzYSuMvu8h+JG70CAOo/AEWzfGqXqNxNLNZZSbgCCNNtXGeb/yfk5ajMygOvk8norBMmeZLTnrznizBW+Nfejs4DQUMT8Op0tl07o9eeagYk6stiJpEMUBPO7e2DDfdSGz8T6Bm50hNkSP6JqA2hIl90OLzWkmhTWGFO9224FhSZqpnE4ZsH6HF69NGZdLSSsv/FAA+CTddOasAeS1zkIqfFos1jEnamb3tN40GWMLHuxEjUvVhTpyIKq+jWaWY3FJDZxLXcFfD2LAkxHfgSo5LqRsKkbnmYSN4P5nQ+dM71xG7GvhtE22GJPT/j/V/Vy3eesRo2hQAm9XOXi6+CIC251Gq9P8GsFrAxwYtXvq6NNp2xuLXlN03dkG+PF5FlcGyMIqO06XoS3rvOmKmUE7/yv98vCX x08i0rH8 7pNyl1KFz8bqcE2WT6Nmpll+iSSr7kqD0pjIcU7ycVosA+m3QliVqN5FYaUyJME3swbxiBSGrhZMSOLayEHMbE7Xnq3QPgHKEV3EW5+wzppa1k9UwSSBTJvx3oz9754+2pAKSTKlsY/idkRVo2+XKxsOno7DK+QF84w4TU/g2Ef2eGFngpTgOu52ysn9hJnHkOUVusFptfVT5mKw= 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: List-Subscribe: List-Unsubscribe: Each architecturee must provide a definition of mk_pte() today. They must also provide pfn_pte(). Usually the former is defined in terms of the latter, but not on some architectures. I was trying to decide what we should do for creating PTEs in a folio world, and it struck me that we should have architectures only provide pfn_pte() and then I don't need to trouble the arch maintainers with whatever MM API I come up with. The architectures not on the cc list I considered trivial. The architectures who have named patches are less trivial, and I did my best to write a decent commit message explaining why I did what I did to each architecture. I have some followup patches which remove folio->page conversions, but if this set of patches are wrong on any architecture, then they'll also be wrong, so I'm not sending them right now. Matthew Wilcox (Oracle) (5): mm: Introduce a common definition of mk_pte() x86: Remove custom definition of mk_pte() um: Remove custom definition of mk_pte() s390: Remove custom definition of mk_pte() mm: Make mk_pte() definition unconditional arch/alpha/include/asm/pgtable.h | 7 ------- arch/arc/include/asm/pgtable-levels.h | 1 - arch/arm/include/asm/pgtable.h | 1 - arch/arm64/include/asm/pgtable.h | 6 ------ arch/csky/include/asm/pgtable.h | 5 ----- arch/hexagon/include/asm/pgtable.h | 3 --- arch/loongarch/include/asm/pgtable.h | 6 ------ arch/m68k/include/asm/mcf_pgtable.h | 6 ------ arch/m68k/include/asm/motorola_pgtable.h | 6 ------ arch/m68k/include/asm/sun3_pgtable.h | 6 ------ arch/microblaze/include/asm/pgtable.h | 8 -------- arch/mips/include/asm/pgtable.h | 6 ------ arch/nios2/include/asm/pgtable.h | 6 ------ arch/openrisc/include/asm/pgtable.h | 2 -- arch/parisc/include/asm/pgtable.h | 2 -- arch/powerpc/include/asm/pgtable.h | 1 - arch/riscv/include/asm/pgtable.h | 2 -- arch/s390/include/asm/pgtable.h | 10 ---------- arch/sh/include/asm/pgtable_32.h | 8 -------- arch/sparc/include/asm/pgtable_32.h | 9 ++------- arch/sparc/include/asm/pgtable_64.h | 1 - arch/um/include/asm/pgtable-2level.h | 1 - arch/um/include/asm/pgtable-3level.h | 9 --------- arch/um/include/asm/pgtable.h | 17 ++++++++++------- arch/x86/include/asm/pgtable.h | 19 +++---------------- arch/xtensa/include/asm/pgtable.h | 1 - include/linux/pgtable.h | 5 +++++ 27 files changed, 20 insertions(+), 134 deletions(-)