Message ID | 20240318200404.448346-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 D1582C54E5D for <linux-mm@archiver.kernel.org>; Mon, 18 Mar 2024 20:04:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 110656B0083; Mon, 18 Mar 2024 16:04:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 046866B0085; Mon, 18 Mar 2024 16:04:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3DAE6B0088; Mon, 18 Mar 2024 16:04:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C42D86B0083 for <linux-mm@kvack.org>; Mon, 18 Mar 2024 16:04:15 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 90CEE14068F for <linux-mm@kvack.org>; Mon, 18 Mar 2024 20:04:15 +0000 (UTC) X-FDA: 81911236470.24.FE5BAF9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf11.hostedemail.com (Postfix) with ESMTP id 7B8F54001A for <linux-mm@kvack.org>; Mon, 18 Mar 2024 20:04:13 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hXBlPnLc; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.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=1710792253; 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=sRtJMn0oz+hP4LK32mA48Pzw1km5JgebRrN5FY+POEzdGZZBrrl+sMevZmol9nMAIS2i9E NOoygWL6uwR4aRH98caDmhnoePbsY/VfjtGuH7trOyXYGH9QJXmTjNyoMrTp6OfIdbRcya Rn+Pj7bizZhQbbmswAzb+/vrivqLU9g= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hXBlPnLc; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.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=1710792253; a=rsa-sha256; cv=none; b=UiUDLi0FoeUYwccZ8ep1iHmdvy55W1eVtCOXQwVKidggDi7MJaT772MqyuQ9dpZBuaScyl V9+4ZiIT0gU3kFV1BSc2ZbumUN69eHwIB4ODATwAc8yqkAZ3eYNcM/ifUjb87IQN8S238V SPYol4qkhGZ7JRnvd7H9GDdAjMUvyAU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710792252; 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=hXBlPnLcptxIoQrB4kSJW1/+u3eLQlV3Gt5Ez4iTGDi25xjF2oXhpEtd4DU/McbM/yv4Ze qB9M76bya54d4Si2iiVwyfPooHsaZQIPeK9Xr4TMI8QWtGOkuLAyybXFLW5trULmU4MoWU dXnfEm/3fE437vajDLqlDuBP4QxO61I= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-pbQb-BGjNliSRaoLNnfwCw-1; Mon, 18 Mar 2024 16:04:11 -0400 X-MC-Unique: pbQb-BGjNliSRaoLNnfwCw-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-430b4572a97so17522711cf.1 for <linux-mm@kvack.org>; Mon, 18 Mar 2024 13:04:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710792251; x=1711397051; 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=fgdmL3IMeqT7une3yaj0LN3BFoCavwY34SztG3B3/3q8zsH3HY20JC67jz7bD8cHqn g5oqNvVNZA6X1Lc3HbmpZTe92WlOl59ytArMV1QAbdUtX1S0EKHpTF6A4rs9BKUcpjBx ooTWyez2Pdg9K68qMtwas4yy3/CQl22esXffUlPPgz5npG/2QjdpxiC5ErECOfrdq1ol mEcz9re0/1dWj1VuEbtq28N6od1MIoQs5sknMgkpkmemcj1GhmRam6G6Hn/ugE21xxWI FV8HG9p6ZwSFfLbtQ3BboXKamWOXF98YkqbcAYTa42DAUBHCsXauJ9eBbSJylB1POKA5 Jtkg== X-Forwarded-Encrypted: i=1; AJvYcCVQfmObpUbumvr17TkQChs0EoeuysWHEhnuQlZEkB3M9lP22/mL3Ic75a2kBuG/sfYNnaLQL4Lq8rd7ocPhUZyAd2Y= X-Gm-Message-State: AOJu0YyVE+Xxo/HBIi7ieodlDF+FxHQdA1XLGRHIEfsKzcEwpspD2vvr //7/Vq7WIKezvC4KiBJoLtuYHFNv4dgCHfnDlOQqmWOz3ay6JHpwl+VWV74jRbhR7DfZivgUVqw zAmkMFJje/PFKJ4O2YtrbIAaxYsGicP4yAtgunyHau5AqtFqO X-Received: by 2002:a05:622a:100b:b0:430:ace8:9801 with SMTP id d11-20020a05622a100b00b00430ace89801mr13041013qte.1.1710792250872; Mon, 18 Mar 2024 13:04:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3lB75/Xyi/Yr3FGp4iv8P5rE4DSC0aUJAJLEw6DejnKFtl7A4ZV0qXSchssNp4WRDw4IDoQ== X-Received: by 2002:a05:622a:100b:b0:430:ace8:9801 with SMTP id d11-20020a05622a100b00b00430ace89801mr13040968qte.1.1710792250407; Mon, 18 Mar 2024 13:04:10 -0700 (PDT) Received: from x1n.. ([99.254.121.117]) by smtp.gmail.com with ESMTPSA id hj10-20020a05622a620a00b0042ebbc1196fsm3484491qtb.87.2024.03.18.13.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 13:04:09 -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 03/14] mm/gup: Check p4d presence before going on Date: Mon, 18 Mar 2024 16:03:53 -0400 Message-ID: <20240318200404.448346-4-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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 7B8F54001A X-Stat-Signature: qff76hkfgho877zurkcka7b7oeorga9z X-HE-Tag: 1710792253-939640 X-HE-Meta: U2FsdGVkX18y5TYjQt8MWiObORbS2q3GEpY9nrOG7Yr9h1QLavlGBdsStMDFm7/h6+TRl4IqPaV4WAFurTkcXorSJLvACg7O4Wakcej5AXw3JaFdiUgtu5A2NcUEfdvfA6BzWr6J0BakitaIMhXbZGs9hvlavOyqGpmDUa4uhD2Vq4qWj5po7QpWRrdQMKKrVgV1HITjyzxaOdHOruLCsp/pVNnja6UkTNxUwMbcR/VJlybvOgM8cQ5sMdPcUsKdcep0jjkN1UG9bznEHVRjBl/TxuMvtFD2MZn9Rt3HOX6o03a1E5xDOMxcdlRQIpjBbnzrqn7+9K+pw982DiFZWQz9v2/gw4BODRwfbR6l3e6zNy+aObXOAoKPgluZN86WRquprUtPsKkve4nksFDrV91Ihh/yNyc+RliMLNQ8rrpBuXe+Nhj4dhnztduAj+Qg/iY3bXfX0v60hMYiFEshDh3VNqN0NzLGqQ3F5jIgBgGsYPXTt11l6TUcYrNpk+dLKbtTM+I1V49MM3zayZGGPuz0xi9fbDxcS6EZsvUCBYHm2stxLEZAtVrWwtpYKlwF4ipkpYPJm/E5K2U/1w5iOsJ5kmysbTHjxi8ruJ23JGRLxpEeAVVm6sQ/yILkr+TmKXYwuInS0R1ppe/enUguIgR4XsSLIROPhPe4tSc9p6Q0vomTwX9lNvM/iYeVdNf8RZF+lB4Cm5hksJLtJ5re2Ui0GyKh42cZdBNKtt5Z+pjgLqNtEV1pmEXTCAK6sMEBiMh8wn62bnTYdCCmdGLMZk0RyILATXlG4g8P8qNVeGLjRn5y1mpC6mD+kZ0T/KC0Bs1PSdVH71tFM+xzyAyRlEJYxeIFr+gt2xfO2vpSJ/tzBi8z+39ELFsjD1eFmQQSaSxsVedg8FmkPwh1zmaIq9hKDHWQx8CnuP49ycnxJBpZ/ju/DLZUDVB7dOEITkIh2TDgrwc8N+Q0NlnT0jE XOYgMEGw jGu3C9RC4PKFGwIGUqxBKNAct9g6HyMPUkhXWVrFTjf0+Ym5z6fzpe6ViVzwfopzBvPzn1m+cg/wULTnmOXDYjRApiJFzZJ9QqjjETQExvwjvLzlAsN2DywTZkHE/B+ZbjQB8bcaRnGX1rZ0yRgoSmLMbVbCP2h+/yT12XbBHz0MUF+QUblAX+2JqsdXdcCawCtqB+z0fjxc1xqvJvfPMy6iS1rMVIpsLoAONxqu2k/DsukhQOolks79ivCyIZvSMRuDRAxToUK2bnK+2hSJfziq6FktKmCqj8RBnrowbidTlqvqScat0W7CVnKlCdMi3cgn6bx9lmIohTa8o/4awXCA1fuBvvbgmPA2Csw7k1V4XA1g+vY8+Q7rXGjAGbtxpEns3KZAQkwIbJzs= 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))))) {