Message ID | 20240313214719.253873-4-peterx@redhat.com (mailing list archive) |
---|---|
State | New |
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 C15A5C54E66 for <linux-mm@archiver.kernel.org>; Wed, 13 Mar 2024 21:47:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FA1380061; Wed, 13 Mar 2024 17:47:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B4338005E; Wed, 13 Mar 2024 17:47:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FDDE80061; Wed, 13 Mar 2024 17:47:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F27058005E for <linux-mm@kvack.org>; Wed, 13 Mar 2024 17:47:30 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9DEDDA1862 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 21:47:30 +0000 (UTC) X-FDA: 81893352660.17.9F509CD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf09.hostedemail.com (Postfix) with ESMTP id B1F2D140019 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 21:47:28 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NaW29IN0; spf=pass (imf09.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710366448; 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:in-reply-to:references:references:dkim-signature; bh=OThRyXZFMjugEtcpgf//pX/PpGcoxbD3wNFnQts0Kco=; b=gTGsGJ6NTS8WA4+oYqcrYUixDkjyQFewzx0MNZjfULE2pcOXeE+CgEFchu8rpcMWACmFgY 2Tz/CwbXf7aVBe68UmVXRR2cLIQR3wuYuMvCLCu3yiEnOeHdCn92ei5u44JLS051Ur5oPg H9ZAHwZgEe64XSM+U5NeQWZc2WR3RQU= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NaW29IN0; spf=pass (imf09.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710366448; a=rsa-sha256; cv=none; b=T4dnUfsmPVYa1qxKCHeE6P4lalfndVx6YQ9Fiu6tkR+9qT1UQlLrLtr2ZFVzdc6HQK2lLF E50LNNhqmf6AsQx029sclP/WVKDc+F5AKFUh1ZpI6560bayAgZlY3Q9GqyjhPgS/gd18lh lm9IRpd/b8no9ZTwQu16u84CGKTopTo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710366447; 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: in-reply-to:in-reply-to:references:references; bh=OThRyXZFMjugEtcpgf//pX/PpGcoxbD3wNFnQts0Kco=; b=NaW29IN0mjcGweLubhCPPHDdPUsoGFj+m5aC7TUzHECog87SBpty3S3OomZCiFdsJMO5kt CZXlKfa/P0gZ7ed/1Z7e7QWnpKt9Np4I73DW7lzrPOZaBFZIPLbk7FH2yLJIXRP43hpvsO 4X0HlQLTohF8ZKRDHFW14WI/taZ5jI4= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-5J7vmt_lPL-JXQdWsfeUMw-1; Wed, 13 Mar 2024 17:47:26 -0400 X-MC-Unique: 5J7vmt_lPL-JXQdWsfeUMw-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-691455cfa84so151396d6.1 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 14:47:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710366446; x=1710971246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OThRyXZFMjugEtcpgf//pX/PpGcoxbD3wNFnQts0Kco=; b=qW+TFXv9kUhoDwGQkPYvi6BHaBX1jfAhMbpFSqVdskTcpQmhtMXw5HDN40r0FQwIDM GJWv87ohd6sM+5LR6VdPQDEx3GHxlje6Dk1G67fiUiO6yYn/OQNdM3PYqehnTcF3bvFB 30f/uB0iHZT5h1ZT3oxaOa9Slo6NVDRMNsOPpBEK/BjBT/oUtLgwntdPdmutKbriMgpI TEqv8+yOzy62/V8PH2kaUw+S1E6Lo885BddPU/Yz5AgNaH9n0DSyYgXYpev5v/nK8i9j R0gcJNug0SpgIV0PCeolfPx7lzOCjDVsbr252NOr1uwcGYf5MCsVar9J2IPW1t3nxzT5 K3FQ== X-Forwarded-Encrypted: i=1; AJvYcCUWRXpsCzx3jVsf+BPMj1fYXvrxOT4PNazrmyfd1gbxErMbYV7H5FLnD56gONm/YedIUopYcbt1vje77caCEu6BBsE= X-Gm-Message-State: AOJu0Yz/Xt3S9HlHUOa/fw767cXCx2pLLu9tTTH+LUZBGdgsXApBhj0+ VZUbqmxc7c7FP3r99VhkleKYKaeJCSefBKhLFxBQEj3IhtUNqAmJtbVqs0GEYUxrdBe5Y/qgz1X 3D+bYvxAtNSO40yTP9N/erejBNgqvzZa+da3kerrYYBDR3XbHkxo2Aaun X-Received: by 2002:a0c:f508:0:b0:690:b02c:2a5f with SMTP id j8-20020a0cf508000000b00690b02c2a5fmr13464368qvm.4.1710366446017; Wed, 13 Mar 2024 14:47:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXIxC5CVGnx+p2qd8ZmV2KZnCoGCjWGy3mEq+yzfnYrTYJ2FsP7C7aom0bl0ipU8C23yK/Aw== X-Received: by 2002:a0c:f508:0:b0:690:b02c:2a5f with SMTP id j8-20020a0cf508000000b00690b02c2a5fmr13464349qvm.4.1710366445605; Wed, 13 Mar 2024 14:47:25 -0700 (PDT) Received: from x1n.redhat.com ([99.254.121.117]) by smtp.gmail.com with ESMTPSA id dv10-20020ad44eea000000b0069111c5cdd4sm60114qvb.100.2024.03.13.14.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 14:47:25 -0700 (PDT) From: peterx@redhat.com To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org, Matthew Wilcox <willy@infradead.org>, linuxppc-dev@lists.ozlabs.org, Christophe Leroy <christophe.leroy@csgroup.eu>, Andrew Morton <akpm@linux-foundation.org>, x86@kernel.org, peterx@redhat.com, Mike Rapoport <rppt@kernel.org>, Muchun Song <muchun.song@linux.dev>, sparclinux@vger.kernel.org, Jason Gunthorpe <jgg@nvidia.com> Subject: [PATCH 03/13] mm/gup: Check p4d presence before going on Date: Wed, 13 Mar 2024 17:47:09 -0400 Message-ID: <20240313214719.253873-4-peterx@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240313214719.253873-1-peterx@redhat.com> References: <20240313214719.253873-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Queue-Id: B1F2D140019 X-Rspam-User: X-Stat-Signature: ebgu8udjfe7a7eshtew3wmpxrue1nome X-Rspamd-Server: rspam01 X-HE-Tag: 1710366448-608838 X-HE-Meta: U2FsdGVkX18c3w/n6UcNuWChb1wTISGkJPzn0TJYo6H79FT9thQtJNIAwriWDYENO0W1PBmk+SdeuDfjqbZZ8F9e1CIX89KRg4v7fxrjoEAq+3LVKhKSI8Q9lpmpqA6KzyQwtb5z3AN/TetnwLKoNcyVoch+lCrPra8YketObao6g9oezhZVc1pXeSKuXf0fG0FQJpDLcwvSsrgLw8WdaQ0+ldMdFygq90NpCs+GTrT0e+VMxc1BBFg52RGLa0vA/TQc7yzJHgXKCoWaokratwXRQP4uAM14SRSTcCs9C6GIqTmv5Qg/jRMquIENpJEHeiNq3OnSvNiKhzBmvYwYce3hWuGwc68CuP8HHJhvkrbi82+bEUhQ0CYOraoCjDc+Ns2yQWPXw1fRPnJzCBM35ksuni0yAbJIY2GXiHKQazaI3/OIO7s0iILICd+apLpBkaw5SVlLFW47rAu/7vqf/39lO0TMx6RZjuXKVfRx40xB7ZRiUb8AzSaS/DEkYy1eTGpqfDzAJiW7d6i5S+8h1J5t0bFzUVHpyZ69rLt0rNoukT6rXFfYPR7mbA6Oh1S+nx2pyndHXXDCvu1aiv7rpwupMNZT3HqQX3Zwz+ik1IQ6pv7lkvA7cfbTeVgkgbf8kFvJlKAlv57tRltBwXHc05nyjZcextERx7w2JMMJfNZcpA5FdMfQkEU75AXRGuzHsoLcql+q98iHNYD14fcBs3VnJdrLwxbGIL7NSVqWjf+4iHnikI+uT/zaXGTA8m1wkUBmFC57EtTZoDVe6kM4JpXWAcSLRFcSNUu//22LepzRHzeyJbHdNIV8iBH1E4T7Kd1kLmM8+XA4UZsFhn0EfR13pHzPUredqT2u8mJq5KsKLnZksnJyvId+qciPPlBsEMyzvkk/dYDQwoyp8VJqwdXM10Sp4SVx74GIn3O1k04YfTdamJoiPRAGGoiYQOYk1iP1NkWyVxVSsZJEMVW W0SZSWoA SJWu1RIdZmKjq0MkzAWFUBsMXtxLyJofzsod4SRsn03HNaXQUdF38/2ou4ZfUKWdB8rRHpv6010Uffffcc1W58+dCdSxfBfy0CqwkYJ9ycRUrk2rUFhkVAjGPl5BOMrBh0EFl80j0gcYvjJHlfUAS8KKYBg== 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: Remove pXd_huge() API
|
expand
|
diff --git a/mm/gup.c b/mm/gup.c index 69a777f4fc5c..802987281b2f 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -776,7 +776,7 @@ static struct page *follow_p4d_mask(struct vm_area_struct *vma, p4dp = p4d_offset(pgdp, address); p4d = READ_ONCE(*p4dp); - if (p4d_none(p4d)) + if (!p4d_present(p4d)) return no_page_table(vma, flags); BUILD_BUG_ON(p4d_huge(p4d)); if (unlikely(p4d_bad(p4d))) @@ -3069,7 +3069,7 @@ static int gup_p4d_range(pgd_t *pgdp, pgd_t pgd, unsigned long addr, unsigned lo p4d_t p4d = READ_ONCE(*p4dp); next = p4d_addr_end(addr, end); - if (p4d_none(p4d)) + if (!p4d_present(p4d)) return 0; BUILD_BUG_ON(p4d_huge(p4d)); if (unlikely(is_hugepd(__hugepd(p4d_val(p4d))))) {