Message ID | 20240318200404.448346-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 18847C54E58 for <linux-mm@archiver.kernel.org>; Mon, 18 Mar 2024 20:04:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B9A8E6B009B; Mon, 18 Mar 2024 16:04:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1AB66B009C; Mon, 18 Mar 2024 16:04:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96ED66B009D; Mon, 18 Mar 2024 16:04:33 -0400 (EDT) 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 84B596B009B for <linux-mm@kvack.org>; Mon, 18 Mar 2024 16:04:33 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5692916089F for <linux-mm@kvack.org>; Mon, 18 Mar 2024 20:04:33 +0000 (UTC) X-FDA: 81911237226.18.34F97A6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 32A301C0012 for <linux-mm@kvack.org>; Mon, 18 Mar 2024 20:04:30 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eNPwpQYv; spf=pass (imf20.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.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=1710792270; 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=krojSJrgubPlwN6AMmfv5bhmPyjUTEQsxebncouawPvmKpUyNpAFWVRNZ0ZQFYGch9NUne 94uw81vsTW9wUfaKZrlWVMgE8XgdpxUnYUaJZbKMHZbWLpmbaG+pstB8yvJD1vr2ECWkCV 1xgSIRCdZk1hPIVMST7LLN6UzCi6kac= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710792270; a=rsa-sha256; cv=none; b=l6tXgYWiV7hZ9vRR39vbRfBHYMKZSmWLpLuXC6lRE7Hrxh+id42QJrT1enOuVRwHd7uuoP Ng85RLDLIfV9i581wx4deDyx5AebTPteC3VlAzWg84Kwi8YhpvQX+LNAuACOaxCXVodgtr +yeZR8pq/Yjwyr7dt1uygbx4qe3pIrs= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eNPwpQYv; spf=pass (imf20.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710792269; 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=eNPwpQYvKPW0aVZZj0vPZQdUeNUhxCH1bh/qJ4jPfNagfQTyIzkoR9060uTSBfvjy07Gcp nt6Ow8x100yuJ4UC1jhJN/1vf71rjAcqK0XW5srTqrkWG95wWhRjqzgUvFSuzKTvVpNQqK rmtQ6CVfDKFwiP8k9Y9Gn0wuYbJ+PEg= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-6ZpROsw_OJCoygo6HV3mSA-1; Mon, 18 Mar 2024 16:04:22 -0400 X-MC-Unique: 6ZpROsw_OJCoygo6HV3mSA-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-430b4572a97so17524001cf.1 for <linux-mm@kvack.org>; Mon, 18 Mar 2024 13:04:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710792261; x=1711397061; 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=G3sAv/cOLAGxp/XSxREH9kU/s24h8Z/+GhfvVVhEM8T56BPd/3fWKabgOwwBcrx5Ku 456aXLS39SD+j1mJQERoLQf622AdI0mOJeSXmP0CmTdplyg3pkIUjKre5hmb8jTrTXVa utaYWbRgMdvdxNncHDQJNtsyNZ9eohfaFxTaU2f6TP2Sbhee3HHsJrZBWtx0/Lea+305 atEh3EEeHHEjE9YB0c0sCBilyusyoYLeV36TByhrzPcYayjmINgmMkE909kcTDPkQM2V oMwIFNHOYDwdO8WmVxSGhCH4j0ybrChiLS7G2mqhj5JdYon9tVP7DsJ+tWz3xN3p+6B5 h8Mg== X-Forwarded-Encrypted: i=1; AJvYcCXZXu7xYpHQY4AoKOHcN7x82M1hfyQj0RPl1vwm5bcv6yU5Y2IBQHBz5PD6uo69+RC5QJxAzwv5URI5clS3qmOqxgo= X-Gm-Message-State: AOJu0YyO0YktcWy/OCdqwJcrf78EkHOs8O4W9l3Fd0MLvatB6kxEaJx/ DoSkIygo75oXDvmDcf1T6TzUaFaUi8QG3rzGzOMadClxUydCty4TqkC4t4ZEWKGdpK1goaP39jI FdnWhnEaoIyy03PjTRUr7CpHdwTwDRuy2sjuhRmsl6FbwIntN X-Received: by 2002:a05:622a:15c8:b0:430:ae0a:c08f with SMTP id d8-20020a05622a15c800b00430ae0ac08fmr12238068qty.6.1710792261458; Mon, 18 Mar 2024 13:04:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQhMJRmPtSMLbLztL+aVkPHyOJfqD1JG0yGIJ+aGiheaz6nxeexYpcIdXvqwuavYhzTjiHrw== X-Received: by 2002:a05:622a:15c8:b0:430:ae0a:c08f with SMTP id d8-20020a05622a15c800b00430ae0ac08fmr12238049qty.6.1710792261015; Mon, 18 Mar 2024 13:04:21 -0700 (PDT) Received: from x1n.. ([99.254.121.117]) by smtp.gmail.com with ESMTPSA id hj10-20020a05622a620a00b0042ebbc1196fsm3484491qtb.87.2024.03.18.13.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 13:04:20 -0700 (PDT) From: peterx@redhat.com To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, x86@kernel.org, Muchun Song <muchun.song@linux.dev>, Mike Rapoport <rppt@kernel.org>, Matthew Wilcox <willy@infradead.org>, sparclinux@vger.kernel.org, Jason Gunthorpe <jgg@nvidia.com>, linuxppc-dev@lists.ozlabs.org, Christophe Leroy <christophe.leroy@csgroup.eu>, linux-arm-kernel@lists.infradead.org, peterx@redhat.com Subject: [PATCH v2 10/14] mm/gup: Merge pXd huge mapping checks Date: Mon, 18 Mar 2024 16:04:00 -0400 Message-ID: <20240318200404.448346-11-peterx@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318200404.448346-1-peterx@redhat.com> References: <20240318200404.448346-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: 32A301C0012 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 5ji5c57r61etmus5ame3gef54w6gremc X-HE-Tag: 1710792270-30636 X-HE-Meta: U2FsdGVkX1+Tszt/KZ8vAzn1QMl7DIUUp/79wKGOHXTlMywfbKOM29HDhNaN2TOx6Hovq2wBrtDudCS0lNo6Nqn1+12YKkaq3M9nxVqFCY80duzfonETMfJdaui5Q20y7BTy444SmSv3u1sZgkOuDI2zDzDrdfpcW1f5v9sWUeFEu/jZDh00h0ihPETMuXlH3Q199Hp2PEOQnLe2iTv1TSDeYP+V2Yh7zT/xoobEpvX5Elt7QEJTEl6RUJZAr+GCpjpZ6A0DyAOW7KgAzeGI+aN2kkpZNoVdlOV3AX8dCnW2fvNbbLiSbuajGF1DiD7DMvOLJ3Ax2N48ggRNXohTAPt8bqbpAQRujpueECO2bMGQQpAdEugkvZj0zS8wVCA2AtUILnSWt7krqBEKXDyP0FQMhWTDx3rcNiqhpyKVXtjmHxdUY1inVaBZLeG7u/LUsgwVYIyIUih5wMKQHE1Ijpfiwh2Ri7vkDwrnQ4W9n8yNnhUrVsPSDwYUHm3O9jdfmNcL3iO88uOel35G0Rw9QnGE4ogwVmOhqvv0tVKUzatFA4egyKAmBfHpyHIqoJ95fvun6q9XaWkvHkmKYFgJeAfKOIs0LyrRgmkfACyFEhw/K0i0kgQyra7KkSavEilwfzaKcjt91hBxmtFkXx3Usks9KKwx0X0PgaNeytOyGz4sIBB4g+4gojsJ82W/dRSK4iygHnPKHomj8fhTAXUhZb1LZepwoZuU4Ziau8Nfq6qKHYx58hM9KdtxQc+KHhltDmMI67xL73Iy3/y0ald37yiI9z+S6KJiCnDkJSO5dY38wTy/8xTrqAd5+PHueLmCTQzMGZsUo/xs8TryMB5IZ2aAcSNof7TxLv/poZfOsxtq7DVbVerUG3iHFcS5ks1EfoXHrnrdy7pwDtHJgdZL2+bylGGpAxIV9Vd+RoaglC7Otayme0cDvdm+iJUh//KevzWe9uDYQ3kGIdoFKAH 3vDZ51W/ IyPjjAK2jHLsxMLWVjzzYi4mGW9/D21Nyvn6u7MW35rkHWPTH7X0W5BKUjHN/hLiFKmeGEYArAEY2J8utSdOkGsQrYTT8iHwlcri/DsNzdEh/eD2z5hr6Th1gUoa/Aa0nY9elhymmkVgHrJWZe90a9oe/6Ts/BByOVyiFaWELf8s7diPunik1kMUcrH8TEHAry3q6Ua7JUFMgFCliuQzJeImj34WLRHXFx2DQg5SdPvCnrWNJ1Tp68oIlltAd313C8BOUkWMnyzDu5IMuG6djuJ3vrRoVH5ABoGLc5plP42UPJrxk05D3EGidwEs52cjTl7tQTKPbl9Ald9TT6maeMoJJmZw26v3FtlKCm/5ENQ8ewxheyzgA2wL7k5uN70sHjtykLN7j0Q2tF5jlHa08MpDJkX8fAMtjy9/K 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;