Message ID | 20240305043750.93762-1-peterx@redhat.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 F36ECC5478C for <linux-mm@archiver.kernel.org>; Tue, 5 Mar 2024 04:38:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 87B446B0075; Mon, 4 Mar 2024 23:38:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 82AA86B007B; Mon, 4 Mar 2024 23:38:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F2826B007D; Mon, 4 Mar 2024 23:38:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 5FF056B0075 for <linux-mm@kvack.org>; Mon, 4 Mar 2024 23:38:07 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 083701601B1 for <linux-mm@kvack.org>; Tue, 5 Mar 2024 04:38:07 +0000 (UTC) X-FDA: 81861728214.10.24669D9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf02.hostedemail.com (Postfix) with ESMTP id C31808000F for <linux-mm@kvack.org>; Tue, 5 Mar 2024 04:38:03 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="e+wP/vvU"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf02.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709613485; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=YPd4GFiSShJn+ZRqzxhUGsjklTy+tvdVZ7YEdaffubE=; b=lnXUzZJrHmi9dVKnqGH75yU6lmB/8UfkBM+EPjiVzySydMS7+bFsxzesN3kvWs0nhW8MI/ GatmdWMX/W75Uq2xflR1Zn1b4mMiHYIhzRzprbq+6Z+ahM1nLaJZKD3hMBZ81+CUSVypMf 3CezmB8jya8X62Q6eHuE9hNO8qgjRLA= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="e+wP/vvU"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf02.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709613485; a=rsa-sha256; cv=none; b=AIYYwIOTcd5cNiIvg3iDGahrhCwqGiihbCQ5lQg7pZYX9B1kj1t/Du1XD+o0iuAPEeK50x 1ZB97GZmJiiU0jqwYeTgGCF4VtliW5je8Kzcwn9jgWz5UGsgM8SGHo2iXdy7VgmGSls9oy aNA/CHhNz5bxCvxV0gItrUXDKGW/Fjg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709613483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YPd4GFiSShJn+ZRqzxhUGsjklTy+tvdVZ7YEdaffubE=; b=e+wP/vvUrt3TdJ84C4CNxOg2Z2KKrRrogTgc0PUm/8h/cM3n2mMYamnpvypdzar0kKw/Mz SZ0bj8DcOHvmdZyKd/GOHjiysZYhsmOZ113m3j/B9izFHAPFN62fSp2etxkX28QlECOOzo yOewe4UAdrcc26rOQCoa3G0JbHL3XVA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-385-ls-yFlXOMLKW33D-c7G0hg-1; Mon, 04 Mar 2024 23:37:59 -0500 X-MC-Unique: ls-yFlXOMLKW33D-c7G0hg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id EDAC780F7EC; Tue, 5 Mar 2024 04:37:58 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E712C1F086; Tue, 5 Mar 2024 04:37:52 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Christophe Leroy <christophe.leroy@csgroup.eu>, x86@kernel.org, "Kirill A . Shutemov" <kirill@shutemov.name>, Jason Gunthorpe <jgg@nvidia.com>, Yang Shi <shy828301@gmail.com>, peterx@redhat.com, Andrew Morton <akpm@linux-foundation.org>, linuxppc-dev@lists.ozlabs.org, Muchun Song <muchun.song@linux.dev> Subject: [PATCH v3 00/10] mm/treewide: Replace pXd_large() with pXd_leaf() Date: Tue, 5 Mar 2024 12:37:40 +0800 Message-ID: <20240305043750.93762-1-peterx@redhat.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Rspamd-Queue-Id: C31808000F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: cyrq3qizdg5bq9t7a5n5txfim94169so X-HE-Tag: 1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eQcdPGZLm14y73ofPyaocapji+97bZxy5EIMDrE8qsNq8ODFwfvgikTLrLmHpH8dYTI1zp4E0dQlx2zVs0vnx+Z30KtEECgimxabVBUXZh+0njjQdWkWa9y5V83zyM5+4vZ9eSH+b/0eEpdZnYlgo3CIie2vApMobPJG8YHjuJTEcBsa38AEilLyofGQlKd6LxQBRz0fE 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/treewide: Replace pXd_large() with pXd_leaf()
|
expand
|
From: Peter Xu <peterx@redhat.com> [based on latest akpm/mm-unstable, commit b38c34939fe4] v3: - Added three patches - mm/treewide: Align up pXd_leaf() retval across archs Per request from Jason to further cleanup the retvals - mm/kasan: Use pXd_leaf() in shadow_mapped() Something I spot when saw a pXd_large() comment block, put it as a separate patch to cleanup. - mm/x86: Replace pgd_large() with pgd_leaf() Overlooked we even have pgd_leaf() defined for x86, added one more patch for it. Now I'm pretty sure p?d_large() all gone for good. - Collected R-bs / A-bs v2: https://lore.kernel.org/r/20240229084258.599774-1-peterx@redhat.com v1: https://lore.kernel.org/r/20240228085350.520953-1-peterx@redhat.com These two APIs are mostly always the same. It's confusing to have both of them. Merge them into one. Here I used pXd_leaf() only because pXd_leaf() is a global API which is always defined, while pXd_large() is not. We have yet one more API that is similar which is pXd_huge(), but that's even trickier, so let's do it step by step. Some special cares are taken for ppc and x86, they're done as separate cleanups first. Only lightly tested on x86. Please have a look, thanks. Peter Xu (10): mm/ppc: Define pXd_large() with pXd_leaf() mm/ppc: Replace pXd_is_leaf() with pXd_leaf() mm/x86: Replace p4d_large() with p4d_leaf() mm/x86: Replace pgd_large() with pgd_leaf() mm/x86: Drop two unnecessary pud_leaf() definitions mm/kasan: Use pXd_leaf() in shadow_mapped() mm/treewide: Replace pmd_large() with pmd_leaf() mm/treewide: Replace pud_large() with pud_leaf() mm/treewide: Drop pXd_large() mm/treewide: Align up pXd_leaf() retval across archs arch/arm/include/asm/pgtable-2level.h | 1 - arch/arm/include/asm/pgtable-3level.h | 1 - arch/arm/mm/dump.c | 4 +-- arch/loongarch/kvm/mmu.c | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 26 ++++-------------- arch/powerpc/include/asm/pgtable.h | 28 -------------------- arch/powerpc/kvm/book3s_64_mmu_radix.c | 12 ++++----- arch/powerpc/mm/book3s64/pgtable.c | 4 +-- arch/powerpc/mm/book3s64/radix_pgtable.c | 16 +++++------ arch/powerpc/mm/pgtable.c | 6 ++--- arch/powerpc/mm/pgtable_64.c | 8 +++--- arch/powerpc/xmon/xmon.c | 6 ++--- arch/riscv/include/asm/pgtable-64.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/s390/boot/vmem.c | 4 +-- arch/s390/include/asm/pgtable.h | 20 +++++++------- arch/s390/mm/gmap.c | 14 +++++----- arch/s390/mm/hugetlbpage.c | 6 ++--- arch/s390/mm/pageattr.c | 4 +-- arch/s390/mm/pgtable.c | 8 +++--- arch/s390/mm/vmem.c | 12 ++++----- arch/sparc/include/asm/pgtable_64.h | 8 +++--- arch/sparc/mm/init_64.c | 6 ++--- arch/x86/boot/compressed/ident_map_64.c | 2 +- arch/x86/include/asm/pgtable.h | 24 +++++++---------- arch/x86/kvm/mmu/mmu.c | 6 ++--- arch/x86/mm/fault.c | 16 +++++------ arch/x86/mm/ident_map.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 14 +++++----- arch/x86/mm/kasan_init_64.c | 4 +-- arch/x86/mm/mem_encrypt_identity.c | 6 ++--- arch/x86/mm/pat/set_memory.c | 14 +++++----- arch/x86/mm/pgtable.c | 4 +-- arch/x86/mm/pti.c | 10 +++---- arch/x86/power/hibernate.c | 6 ++--- arch/x86/xen/mmu_pv.c | 10 +++---- drivers/misc/sgi-gru/grufault.c | 2 +- include/asm-generic/pgtable-nopmd.h | 1 - include/linux/pgtable.h | 8 +++--- mm/kasan/shadow.c | 11 ++------ 41 files changed, 141 insertions(+), 201 deletions(-)