Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6790981rwr; Tue, 9 May 2023 22:25:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44OUFYNOfS67dWRwtOYuUvm0A4FLrQvPldU6khp9m2OcAHrak2C6P5JaH4kVCt2lxtQar1 X-Received: by 2002:a05:6a00:2309:b0:63d:254a:3902 with SMTP id h9-20020a056a00230900b0063d254a3902mr23108038pfh.12.1683696353576; Tue, 09 May 2023 22:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683696353; cv=none; d=google.com; s=arc-20160816; b=CKXYppzwdzO1yilZYxOhWGwwegzoKcRmLwNV+xwnzYDiqRBPIsv+k8dn7cgmZbhFXo KZ2bR1HkTdKds7EvpQT2WZTUKxuaVWnEuRVpvJQ8vDibJFiRYQ5nG6y2Man80lUJwRc7 Y7bwUoKaAzw6iXNM0qN5MAc5+vSQfXRw++lvnE5hGyBol7v83KEz30b2YjcfncQAcP18 /+ZBarydv6w7R0aazIs8CT7IPH58dq5MhvePPU7+1nJFmwdhWD9lGm6SzAha5yBC2dcO HNThptJWbVr2tfuLQu0+o8N5sWnBYrStfteJY2GGUmxOzy3zRnYHiCBz/GhAdRzckV+Z YOOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=WguVNWbe7g+SE8eLKcilt1n/kxxL8yJPaBgUsfg3rjql1IXSR4iASel/vqqB4yT9Jq oBG/2d/h1CmxXAPFooDLot1Ug1UNOvqHOHAYk9rYtCwYZO9c/y5fPfLwClJXk5Sb7r3I 5nCi4mCr4bF4RfEJZ36um1v4wh2w6FW3J1VOXHYXDovaxBYcdtYEezvjhIWsXr0ANyKG 4AhExDCZFA61JbUh7Y0zPNaaaSTL6FRrcWcOMLpGp45TQEMRbVYGwEi4PYHuEeVMKJ0E Zt3jjGPQm58p3nTegeIpDYdwfdyoqRvU0kWMhp99KiiJffB+xLTodJhYGI+m2d/sV8yu GwRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=f+IDJIOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020aa79805000000b0063d48d82e85si4224371pfl.15.2023.05.09.22.25.41; Tue, 09 May 2023 22:25:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=f+IDJIOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbjEJFDv (ORCPT + 99 others); Wed, 10 May 2023 01:03:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235752AbjEJFDs (ORCPT ); Wed, 10 May 2023 01:03:48 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CA31FE8 for ; Tue, 9 May 2023 22:03:44 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-55af4277904so104230967b3.1 for ; Tue, 09 May 2023 22:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683695024; x=1686287024; 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=f+IDJIOxeE7pBv/ncUF3Dg8yBdNeigyWPgONUVZVc2EQnlwiXg/VQTMZqIyi1FwbhF hB12dPYWMlW78XVP1iXq4ueyFowA50D/X9k7kSng633zgtc6Ft9O69KyiELqvbNIUVet ZV3CNBYMAMk1NaEigxnnVZgnTZDfN2Zgt7qDs5DqEMg/xKQN3cvE2DpHKAZxvYja2q57 EzxbR8ATmL4FQRq126r5Vter9+9PB+pvzYqq8Q0Kq08+IAz0Ct1bpmRKsD6HzoQSgfyW CVzetCsMpC4GogX7r4Ise+/fDJ+qVHJTfa1OEDnQ873jx9nxbHKiO6uVblFCp5x/gnEx bWfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683695024; x=1686287024; 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=UPVJBM+5CVO0GVJtAYca8Wzkc2jaR6WwwfjW2sZO3ZwimC6FWf27/i96/agE9x27Wz eQFswQSlC1yvVGy1A1QHGu1KlwAb+kct8Hhmv7i9MK/rYeMzCNVOmVjXiIG1y/faMwY0 NnCrNQhPPocE/XNn3uNYRABu1VQFMx2/FiNanQWylcNHmbNl/UW5qgUUEyS7/EMGmiCz w5BnixfZAsF13kn32Rlrg0UTiyktLyxV4nU1XEOcyE0RlV8f/I3iDi1SIRYsQL0PeN7/ I2ufXPwLPVycW5myUTVZuDsIc8RzaDeHI1wuNdxukSUPknwyb82yIhzQvFcWZauS0Z5P mDDQ== X-Gm-Message-State: AC+VfDzeGLNVjCErzQJeuNigbWaz0LysxuT3iTY9IzeygyDIky3EBZ6G PU1fagq7cPX82XBMzoHaRKwiIQ== X-Received: by 2002:a81:6c42:0:b0:55a:1022:7814 with SMTP id h63-20020a816c42000000b0055a10227814mr19292393ywc.28.1683695023901; Tue, 09 May 2023 22:03:43 -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 i189-20020a816dc6000000b005463239c01esm3871312ywc.51.2023.05.09.22.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 22:03:43 -0700 (PDT) Date: Tue, 9 May 2023 22:03:39 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Helge Deller , John David Anglin , "Aneesh Kumar K.V" , Michael Ellerman , Alexandre Ghiti , Palmer Dabbelt , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , John Paul Adrian Glaubitz , "David S. Miller" , Chris Zankel , Max Filippov , 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 17/23] sh/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> Message-ID: <85eeffe5-95f2-2574-365e-c9af663c8672@google.com> References: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/sh/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } } -- 2.35.3