Message ID | 20240313214719.253873-11-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 85514C54E58 for <linux-mm@archiver.kernel.org>; Wed, 13 Mar 2024 21:47:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BADE480065; Wed, 13 Mar 2024 17:47:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B107D80063; Wed, 13 Mar 2024 17:47:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 804AF80065; Wed, 13 Mar 2024 17:47:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5172480063 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 17:47:41 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 223C01407F0 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 21:47:41 +0000 (UTC) X-FDA: 81893353122.04.56DA339 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf01.hostedemail.com (Postfix) with ESMTP id 086F340016 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 21:47:38 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eyHbBMqp; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf01.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=1710366459; 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=Z0Y+ceGC2u4mzi2lycxKAqHeA0qAqllKwMSRaV+2/Lw=; b=6CFZnPkLGQYmDY8MrBh+FmyPMojM7fgo4hMTxJdeLG4eKoRiO1wzFLAQEsmaCVTG0yT4T6 t9SdLFTdio8xSACvUukgw/X9T6pqKxf4G9ec5ps6DdmrG4+KqYiZQATOeGfCTntncfsN9V xHwTdMt7bX0CRlgwRyzq5GcXMNkM4gM= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eyHbBMqp; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf01.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=1710366459; a=rsa-sha256; cv=none; b=HRXjlhQW/9/lQj29bBLkNm3J13ICBGc0n3ytd06WPsBMuf5VMGGJiLYuLlY2wB5K4pofCX wFkjk7ycdrX2JDclc5qcB2oaBggJVqh354hmm3qAFPC1NM41qk20KjrzWRZuaH40QEvQZk BvIH+Zuori+YudAST5L+yBRQHEOdSZw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710366458; 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=Z0Y+ceGC2u4mzi2lycxKAqHeA0qAqllKwMSRaV+2/Lw=; b=eyHbBMqpmOdphPVDHPexS3Ajj36G1vhX7lqr4pB4NOt7QmQhjyIOvV/icmVrMFugV7x5GH z3VNZsGIXt6ughzlXTUes2Vmw8USsMedC2icP47Eu7Py4/LvoObJCBs5aA2dCAIGB9sQ/6 RYlaC9yqhbh+ks+xgNxOpgj7bKgNoHQ= 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-331-Tp254-WVPx2zP_0wUEm3Yw-1; Wed, 13 Mar 2024 17:47:36 -0400 X-MC-Unique: Tp254-WVPx2zP_0wUEm3Yw-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-69120b349c9so1131866d6.1 for <linux-mm@kvack.org>; Wed, 13 Mar 2024 14:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710366456; x=1710971256; 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=Z0Y+ceGC2u4mzi2lycxKAqHeA0qAqllKwMSRaV+2/Lw=; b=MSk9XuV0lEdU7MfP0mpDjX6wkHEUH5OD8td116IGg70My/XOLbsqDcO2ywbL8EMNLj ziSxcfrK9fuKh7iyrRkcFspg6iGWSbWwmn7IsR5v8qQVPqNE8fsPuoj1B2sqJifj9KyR uFuQgVGYYEGUQYmJB/mTx1q8nSEMSk2WrOiGda7r/AlGj2pZiobbhGBHhNy3RllI0t0q ShHUDYm5Wbp0nFooQ019vdx1l17Gf4fv4BUSzulC1P2Sx2tnoGaWpA519IFitLqePBEV MIk97SQ3hWxJrfyxtyxxlc9806/nrbErYWqiLYh1odQY1hUqatLzc9GcvgsTJWWzASIy JTzA== X-Forwarded-Encrypted: i=1; AJvYcCUlLF26kJttIglmRTIbZOfC/AqCaTpcTRAp2dsIPrflvukvH7AkziTzqe1unoiQ/2V3Dyh+pWQ6mO3e/6EMXtwD2po= X-Gm-Message-State: AOJu0YylKIjrRjxesGEyIL1127BPcbeZi+IQX4QGaH2yPe+DvZRTLT1y Xn9gSxvFb4aeeZF7oGdeRe9/aKP9cT5uk9WXlm7jlh8crRKpx5mA4hUJNj6zf+78pbjhlZ7U6of HkUHVVruXfzVdrEzDb7civq6ypJJHbsliYndORlyDS9V6gK3Y X-Received: by 2002:ad4:4c41:0:b0:690:c64d:c2 with SMTP id cs1-20020ad44c41000000b00690c64d00c2mr5759452qvb.2.1710366456316; Wed, 13 Mar 2024 14:47:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+HGFdkYe0dzh0k+TaZTCqm6znW50jTd/iFDz8bJGRu/cwrU7vGL7Qd6Yn9XWGaKvseEdKzw== X-Received: by 2002:ad4:4c41:0:b0:690:c64d:c2 with SMTP id cs1-20020ad44c41000000b00690c64d00c2mr5759436qvb.2.1710366455985; Wed, 13 Mar 2024 14:47:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 14:47:35 -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 10/13] mm/gup: Merge pXd huge mapping checks Date: Wed, 13 Mar 2024 17:47:16 -0400 Message-ID: <20240313214719.253873-11-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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 086F340016 X-Stat-Signature: tcztr4aq59yey8irpwnog8yd5pfkb87e X-HE-Tag: 1710366458-159631 X-HE-Meta: U2FsdGVkX1+S+XYSwBUZ47TPJdLRHpmonGJ5jUyi+gAMYj6iYnHSQqM6vV3mqC8NiX6AB+WPdib+LJtNk0ITpih2pT9Gv0WoHruOhmUBukH6nT9BrbbksAaR/B/bDLOBqXImUMB24Ox9kPhCb/G25LeCdUtLUL7BMor/J0Xy4rqgO1No5GbZkzWaBiZWkdid9FIq8WfDPW/biT9Zx8vA+dXhhyLg0BrKy0tJb+NnQfyo37oB8XW+TblGOD2/ybd/ypzrcTtY4P23OuztnT2t1aHFWzVMJRx2HUzjT443X4jbzz8X4ChlMNT/pqhGpOnMmOR/VXEI8bniHFwadCK2whR5h8QzCb4rzQWPo7raatoLt4mu6xG03YUgUKl5zLuojSIMeIX6AhkSPfS5MKn2zBxc++Wdp6x0UAGICOQeYtNirZUTzGs0pSv+4cQP9XmFzY8oVZfg52tVPWvZ+drKnFGwEd35/Tf00WfSmtO1Lxp+7yeTtKu07SWwBZZVWwR0PjDWzqbadWTvIU5HKJyzVQOCsscw5XsZ0Ce5vT9MNzRNWS/GwIRsh62Q9yJ3JCMrWd725BE18KCUaE7hy2Fi+hyvPtPPu/iWblLB9eXimv7SkFIEk52TAugELS7IPVPRZaTPY9tYLNg5nTeO5bLAoz8XP5pMv3eYb+wZdZxcBpyjFX4GFzuYvRNlDqo5z3fGwELb8LTazDMqLMzltN0lw5Sg5uzMb8e5gWGBNawEGhnOHQlJsepTSsnzaYpFCdLmgFow1+x9bVXPhDPVl/remo99ywU8pdJ9Hd3rJsk58bXeVlqm5H4wNhia+7/Z+tkBTegmiFZ50hBhBZPferRT5nV0dtjxtDYYY4aWkBHGVpOFtj308hgzAQAn8/4T0TzKw7C2U9fkEtz4RLm1zFBodwNGQhnpAb/+8zBqhLky+9pKhm1UOM7/eMazinMMz+sc+OPvcMuEAYwQbQ81ISW viA7If3O 0n1yqGdOUBneLvVl9DZJ1cFYswYjIGJUm3Hc/Teciv044yA0LHq90/r1XhiAlDdgLqlDJ9WF0wNPVzWlicS80lAo/GzrH7d0StF7eFaHVPtrT4vsKdQgm4yxQNI4mTf2rWCCeU3aTom658/9hfs/ui0hHGPqJL2i+UExU4L0IxKESqJhSwvSdxjOjZlcoD5FUshYsBL12mxbAP+nedRvrW4CCk+J1Pw7R9ZTxIy5kel1MJZPYHvJFX7P3xCKf8eaLD3Yv4lNSbXmfYeu6iYrLeeOME01j1/lxkf9g8gm1HRVVRS9F+8DWAE1d4rATviBQ5hAbq/JEQVHCw95aaIV2o+zidfhNf3mciXvSpNxYiClL65JFxslTop6M85AzOFd0Sw1aSDg85iWn/EO+8TmeZqQ46TAdLB9BSnaCwNT/ijLLOmeruw6lHdkGsb+sfo1aOpCNHiWxqzQTKtv/G+ulTRkPaA== 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 802987281b2f..e2415e9789bc 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -3005,8 +3005,7 @@ static int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, unsigned lo if (!pmd_present(pmd)) return 0; - if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) || - pmd_devmap(pmd))) { + if (unlikely(pmd_leaf(pmd))) { /* See gup_pte_range() */ if (pmd_protnone(pmd)) return 0; @@ -3043,7 +3042,7 @@ static int gup_pud_range(p4d_t *p4dp, p4d_t p4d, unsigned long addr, unsigned lo next = pud_addr_end(addr, end); if (unlikely(!pud_present(pud))) return 0; - if (unlikely(pud_huge(pud) || pud_devmap(pud))) { + if (unlikely(pud_leaf(pud))) { if (!gup_huge_pud(pud, pudp, addr, next, flags, pages, nr)) return 0; @@ -3096,7 +3095,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end, next = pgd_addr_end(addr, end); if (pgd_none(pgd)) return; - if (unlikely(pgd_huge(pgd))) { + if (unlikely(pgd_leaf(pgd))) { if (!gup_huge_pgd(pgd, pgdp, addr, next, flags, pages, nr)) return;