Message ID | ee885978-7355-624b-cfe2-c3d75672b842@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 44DE3C7EE29 for <linux-mm@archiver.kernel.org>; Thu, 8 Jun 2023 19:30:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C3B628E0002; Thu, 8 Jun 2023 15:30:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BEB458E0001; Thu, 8 Jun 2023 15:30:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8CE48E0002; Thu, 8 Jun 2023 15:30:22 -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 95E1C8E0001 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 15:30:22 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3F4C91604A9 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:30:22 +0000 (UTC) X-FDA: 80880571884.07.1A3AF8A Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by imf07.hostedemail.com (Postfix) with ESMTP id 427E040028 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:30:19 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Z+1ROWx9; spf=pass (imf07.hostedemail.com: domain of hughd@google.com designates 209.85.166.170 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=1686252620; 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=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=fje5jr6ZYD0VAfpYophYZ7CRTSIYde/9MiFwhE6RO68UHR7Z2xJFmCV28hd88USflFeWTs U0QkKdsFBwo1MqaA9Prco7U20swZPvvwiN9CcpgFdbCDm0GYchXytwNbI2U/SNT6ZQhVDZ KIT4CTEAnydTLiT78CWhxiVsjaqPPVc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686252620; a=rsa-sha256; cv=none; b=4sAeNLgxvq93ulhwKnepudi9XzuTQPru488Yp137F8Z/jVGMIr6SnsMFKrXFdapwX5bYUD 5TDUzJAVXCmdDzvPvAwNh8Bpg+sRtITrbe2kgy9N4csLfEE+Hjpp/Djr2S8cbXJ78NyBrK XQWAU5Hwl4AQ12jzjAtuW4S2kwHuvXo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Z+1ROWx9; spf=pass (imf07.hostedemail.com: domain of hughd@google.com designates 209.85.166.170 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-33b04c8f3eeso4381485ab.0 for <linux-mm@kvack.org>; Thu, 08 Jun 2023 12:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252619; x=1688844619; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=Z+1ROWx9LnxdX5nt3Yo9Gw9A1LjKJHFc2WtgcRAYaFIpj6m1+MueknjL2tetH/Yt/E Jkma5NMQVv2CGzmJBnvKYmHLILgxFTZBZe29Vg5F330+u2fSbBPVEtX3NRx2YFJBGUmp kCJjjc7KvjHhyEDucY5j+/eHT1OpuVlzl/VgAMVyKWRQ9P9ksfEE7oKQrQHB2ZVzogis AlGkparAM9e3I8OX/wc+UGRKJ9WTDNWGaUDF7YaTiCVpSxpo1NNn2hyrTeXSAmMOPutQ TUN3B1UmJFKBBqlJCwM8cMmQBeV6xJ4ogL/1WbFBc8kxJTJPQLfJ0hWbM0sLcNxIcm/D dTzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252619; x=1688844619; 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=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=W5ehwXcAeSh6ijgjAvSMuIBVo/4ryxEsqHNyNI544Gw53CzeOazvLf6Vl6ujgG/le2 mgIp54hsTSoxtCVEMUBqp00SuqlUfDTEx/9lURzY6MNzigLP+xeNVjTUEDStoGWe6sWC 1hbf4SnigXH3lP1MrVlFkh0btx9kD3KjEezYzYgsWlDwjAFbi3gMZtRVfnb63xPSaoLJ +Vp0FikjlB2F4Lf5HoD0ykRW+cppHxwf67GvdtP3X+9gyrO4YdcJU/Xfv3fJUqnFWihj 7s2UNd9q6dROMkdvMQm8S8VQOQotMln4OQaWQvmF5v27QzcZkObWC4zxiaIvs7q9pQwV PkTw== X-Gm-Message-State: AC+VfDwyCWsOIX933rrvGdn/HEs726MubPOa7MjruVUayZhfSnYdyjty pgGgULKT+a5q0aBQHKyaU1oBIg== X-Google-Smtp-Source: ACHHUZ5FLPawoStHwp2n90KOP3LMuG/l1wNARr8CXyW4COytL00Jtvx4PAa220fnQj49mz7p+WoCNQ== X-Received: by 2002:a92:d34a:0:b0:33b:820:41ad with SMTP id a10-20020a92d34a000000b0033b082041admr8096921ilh.9.1686252619199; Thu, 08 Jun 2023 12:30:19 -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 h184-20020a256cc1000000b00bad07875d9bsm450282ybc.11.2023.06.08.12.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:30:18 -0700 (PDT) Date: Thu, 8 Jun 2023 12:30:14 -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 17/23] sh/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> Message-ID: <ee885978-7355-624b-cfe2-c3d75672b842@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: 427E040028 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qaymrxopyfk8gq36jyf1icne7fifxekq X-HE-Tag: 1686252619-113444 X-HE-Meta: U2FsdGVkX1/WP189P0Blisw+YkgfhE8gsfL4fmCdBeoHc1FfYPnacQ08MwU36+CXQHlf+iq5iliwLnNqwHW7fayuOYiZRB7X09QrGQxonwERnD8tf0QpVAvXsvwijXELKHtI10vSvxCyEokH1jcyMTYyCTKQm8Mj9f+05TTojay8YeTG/6vnduAN6CnZGg1hvaosvZ4j20bDT6eTF510ZsWFtiRHq10IGR2Qg/KzYryzQ74U6Kt1XS5MA6G7Xawd/h3XYmpeoNWJFPTXX0ogLEfD/KYJhabp8Khiso3z2agN/YwUU3ToA4lmq+M2WEM6f3x4XITg/zboOxE+Kz1lgEKQIlWx2dXkyfH/k7qdRiolvUMzWgW2gV3D3p6SvX8WomlteVKh9UqjdorjpCze/WKqMO2D0IBOujC9Grz+1nXlCSEj8CqLhNo6bciq2J9PsYTqibj0K3CmyJeFKdkXY/mdXjbDwsUL/Bl49ya7teGdPzpYKbDl0P73IxYN/6dlNlJ2iA9zch1vdVG3OpPHWmtBolKIL2N6GqQgcjZ1yj6bDkuj5pDzLYfz5kPijOAtNnkjDshPVTkmKFKwnEeWxcq9Jd1OTU2eV+O8SXo0nLBEVCvA/IQSU1ZABqzON0oivv0HvdpWLp3vQt1rl671IDC94P4PTb8W7e9wQBeYJwhyLJxdYo0essWqfNtL6NZn/F9J5hIKixay1Kyq1RqSuRVXKQdBydfLV3fQ83J3/1MB9TffnyFgoEGNPCNPEXhcxckCOFWzf+6BWuFXl/nfKXUKkmI/PrywqH9lAro729jo8NPjIwkLU2rpUWkY97xZsYL+EfoVkfWOhu7cdxD/99fUWAOyJAJhI24l+5zpmBD3jw4eUapXQc0bJG/z5cSyrYKkpPuLCRjJ9EkrBVJmix1/GKdsY2VMJequmFwQAJ6IB2kxEHOngePNvhq5PqtBScnDcenwlr9qHxjKThR aw6xMtNM PpO8Rn9T4Io3DRdU2+VPlyIx0BiMDCKB5fiZvUz4uXHJigPb7RierCCipKOsHZhtnEf+kWJ2lMlQsp0/8vm30LUiQgaDAXI+IZvQgv3VU/f4C37T1pRIUNB4t4rZw/8se4u8y6btv40XYDFDdoPyJg8d2Z7fc47YGptiOTFz6VGvcwnb8oZP7r3HXDRSSuX2hci/OTmXlvkDEXyeSsZTT3Xju31SKNmzcX7aCVcftS9p2LNPNsiR5LvI9ivWOYxbOM7pDR0+TAgcAEV+sEck5vZGP+hzHB3pylhrkPidSmFI0cvfoClanjmMDL2BY0J3Pz+NCa22Vj79gLNC4LfdiU4PrTRLN0XyUx4jqEB0hfHUP1q7Ki2K55jBeldzeF2tdV4ki49wGE/1/V7BpinnFh+RWTjXlkOkVElnK8SuwW6ELwULh0kpaDrxT4A== 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/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 999ab5916e69..6cb0ad73dbb9 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c @@ -38,7 +38,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); } } } @@ -63,7 +63,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, if (pud) { pmd = pmd_offset(pud, addr); if (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/sh/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)