Message ID | 7963aeed-f7d2-e0-f3c6-3680c5572444@google.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 C1E9BC7EE23 for <linux-mm@archiver.kernel.org>; Thu, 8 Jun 2023 19:21:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 671E78E0002; Thu, 8 Jun 2023 15:21:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 622558E0001; Thu, 8 Jun 2023 15:21:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5118F8E0002; Thu, 8 Jun 2023 15:21:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 420F28E0001 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 15:21:15 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 14F171C7A08 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:21:15 +0000 (UTC) X-FDA: 80880548910.02.F709DAD Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) by imf25.hostedemail.com (Postfix) with ESMTP id 414EFA0011 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:21:13 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=HKd31Lqv; spf=pass (imf25.hostedemail.com: domain of hughd@google.com designates 209.85.128.180 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686252073; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=HUHoZ/aBAOCl16zTkenD7mEg4Ghdr5zJgx/UL9k71h42w93oybFyYSdNpHNfNRa36hrCbh fl0Tanv7Ahq5JE57iTOQFVwOyb768jbjnxV1U0RPihq6xW+qSOVNfCdXLsA+XMxY7EvaM9 /w1ZCbJbUOyi35IhA44ytmXJ8O+Afu8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686252073; a=rsa-sha256; cv=none; b=aLE3i660qN/9iN79KyFw+cbMQsJcmuEsf9dEaonvTjDIadUAlKuy3j50Wx9AL3FEPgVucr BLXbNXEpwVUAV7eHUt/XxGMNskOdDSkdhxAiF8VKUh8BZ4tfeij1hHnv8WOdeWzo+eisdx +dvgb9vyVTdhZFgki+bLHEDTCTNhQyU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=HKd31Lqv; spf=pass (imf25.hostedemail.com: domain of hughd@google.com designates 209.85.128.180 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-565c7399afaso9156227b3.1 for <linux-mm@kvack.org>; Thu, 08 Jun 2023 12:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252072; x=1688844072; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=HKd31LqvAwT3pdB9H8RTJjakAJAT9HvglTvKC+OkvKmv5VhsoaZHAtLpo2tFkCpDhK eaJn1uAawotb3pLd5xLGg7DzD6kDQrKAHxas7kU/r2KN0gO+8LwEgaLotjlfcSI+ExXP OsTJ1O2tfGB1hyPd2BGfO1Hv0XjmUpnPR5LgmonoIasqGq2fAG/aN3V/iTrXbCwGdrUM I50yE5ZJKvbdrlam2CeJEmfXKvbJkG9Wl49W11ZHf6B9xR5DJRVBfUy3eWMAtZhLeFU3 MFev89ALFBnRCYsOlrl0s+V0pK/HvUPQhOTjtpCkmArqzAHuVaF4G3AF2HiTPrlcql5n hmyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252072; x=1688844072; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=ieMgSw56JgZMkC78S2zssyQK1kkVemfzKxVlqv5fCpZI9HVzmECk4u9meW+p1vpNeB oZDHOY+UByFuKqr7u1fNOLfdYx3qQhM82NdYEJ/EBGHA5q93sKVmArVP9Rp6+TKClv+5 JSLBvr0l8BmWiliGKltqURm2IMHZjG+7p0RmIMNRV2a6Hx6AS+zHBuIokAojrbxUX8rO MrCHwgMyfGwd4c6MTVbHitp08dddhokcANSznZCZAnDpacdV4fHK84xCr8Ft1EWLAo5K kESOytk/CYSxCvqzfkrB53hTmQaRAv8Sf1/fJ3yiJ2Ap7JnbclkHSc2l36ak1/+MmoFL 1d3A== X-Gm-Message-State: AC+VfDzi+xK2bPRH52xPO2W/QzzzCXQjx5XuZDaEOYMPMV+nRWvZmqfg NhEYlmz4D/f/59b+wB3b6EYPJA== X-Google-Smtp-Source: ACHHUZ6osQDL46P3M+nFsTgwfoyN2ZCBLpMaIBhxVjRNKZnry7+6/FcNKdRpu6hPkSNVLheeDpiVWQ== X-Received: by 2002:a0d:d98f:0:b0:565:ba4b:aa81 with SMTP id b137-20020a0dd98f000000b00565ba4baa81mr612161ywe.45.1686252072277; Thu, 08 Jun 2023 12:21:12 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id f184-20020a0ddcc1000000b00552ccda9bb3sm108635ywe.92.2023.06.08.12.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:21:11 -0700 (PDT) Date: Thu, 8 Jun 2023 12:21:07 -0700 (PDT) From: Hugh Dickins <hughd@google.com> X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton <akpm@linux-foundation.org> cc: Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Suren Baghdasaryan <surenb@google.com>, Qi Zheng <zhengqi.arch@bytedance.com>, Peter Zijlstra <peterz@infradead.org>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Michal Simek <monstr@monstr.eu>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Helge Deller <deller@gmx.de>, John David Anglin <dave.anglin@bell.net>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Alexandre Ghiti <alexghiti@rivosinc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Heiko Carstens <hca@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, Alexander Gordeev <agordeev@linux.ibm.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, "David S. Miller" <davem@davemloft.net>, Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 10/23] parisc/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> Message-ID: <7963aeed-f7d2-e0-f3c6-3680c5572444@google.com> References: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 414EFA0011 X-Rspam-User: X-Stat-Signature: sex6fqn7zdred45fmmesn94et7w6qo6n X-Rspamd-Server: rspam03 X-HE-Tag: 1686252073-530389 X-HE-Meta: U2FsdGVkX18N9OlSV9WLYpYuktaPMfmQpbpdnfGgx2gETZqgrABDPIoA9KveDau1pAZybCKuNwH+eFE7IRNJAtcM6v7o0TkHIs5x1EhqhzCRA9Z9JHamAnOTyqyGSGJZ9mTpA3qXw6UtbVRY6LndX9cgdoJy7ZrQOwFmmWlBPvfqF8drofFf0e/wn/Y7GXaaESsLAu4yNUmM+Ay1M68F6LFWKLNoQtcJ850NdOsTuDAdpsL1RdeZBbseBrrKCPjbITeLrK79E5tynbUXH9GfZV2KdQAWokPSUsrvzjL2Tb9mX+d3DSWfqM3SssYgZUdztuffBK5W3gj4BWYfcxkRgCC81zsu1mlwmjU9yVuSDWqd0xlFyHN4scvPPWpFZgcgusVj7HiW/yAl2cg37jnlpA7xpxUuDIGkra48VSFeMY0ijOQz/F27eFGY8QGsfNX+iR1PjuhXAhMAKb+x3q369q58i/Cqewe5csO7YMEQOCY3IgZ4bkXVCugk9kprdVrOiyf8rVcdOLgrd2H/LY4gRfIehGyz72RAAl6lhS7FG9vKu5Jiap3AGBw5utuRxwkYEZWZneQVLnhuIeHKd4YOIdDe3ZNuswPIppxNBFdICFxCiGCLuY1uixxxim97n3mURm23huepjmEzCIJPoaSs8NbW91572NRJBebIVf/PUkTLVEtptBhtiWvpRlq1cn++30CJbovQAlRGYE0OGNJZcG3ZuCw/NCqz1FVq18+d7FTc8dykISoLhIWHeuk5cDLvviMrnbDV8vP+p0snK73YjLLv/JB38nNzTrQjFlubUk54ir2OaGu7rkw7GpZYxIcuCJhy+qXD/lYYXicECa/F/8eApmzneTY32+KC6Q2VxWuGrZccaUMZHSa90wmDEeDEfJoWjI8OQv3TW3qSqYBs2j4x3mqxU4s0nagrUQbQLsYKL8O4mx/76/ejDGXc3ObDn4pkm5GZjW6Kyf5Izg7 iipYaqfy 1KgwNPRxOnfjI75+I+5zi5u/4szmrJZmQpDFgBPDe7qEtGeeorNoQSxCuTlaw31tYGApw/LigbzcceaDUrTUNETmiY/ECXa/m9bsRhBZGTohXCMM6qw/mYav7ozqdicspeUH3kbpsu4dvjcmc+Isg1IWKc2RGZPfG4FfKVdBZS4dBz2YnS7LQKHmgmxqlyvgqT1DBvNYKvHXfbFY0P71lga9+yPpe2w5HQTlgtsWDXvR0TYakxSe8es8CpQ3nP5g+05tHG/LHkffClu6n3pbiA6Uz9sY9LzmduLIEsM3GziCu/ZpN2Pdfeag5f32VB+2XjIQi9N0ZP6PrQeiAqkoRK3Yi9rTnZmRoLc9AVl+MIy+AdXKfKwFc5Df2uhLCFtlLIj9Yd05bAFrsX5lebsISAM4+pzjyoTAPB4gxt5xjimcvuIaqPVbJ8an5rg== 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> |
Series |
arch: allow pte_offset_map[_lock]() to fail
|
expand
|
diff --git a/arch/parisc/mm/hugetlbpage.c b/arch/parisc/mm/hugetlbpage.c index d1d3990b83f6..a8a1a7c1e16e 100644 --- a/arch/parisc/mm/hugetlbpage.c +++ b/arch/parisc/mm/hugetlbpage.c @@ -66,7 +66,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, if (pud) { pmd = pmd_alloc(mm, pud, addr); if (pmd) - pte = pte_alloc_map(mm, pmd, addr); + pte = pte_alloc_huge(mm, pmd, addr); } return pte; } @@ -90,7 +90,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, if (!pud_none(*pud)) { pmd = pmd_offset(pud, addr); if (!pmd_none(*pmd)) - pte = pte_offset_map(pmd, addr); + pte = pte_offset_huge(pmd, addr); } } }
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins <hughd@google.com> --- arch/parisc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)