Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1753020rwd; Fri, 9 Jun 2023 01:23:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VY0i8gqG2hkQTpwa2Zsw1n9XCWwGxuIRcynY6y/redRdwub0b87NiEWQvGLjIdN6eABPb X-Received: by 2002:a05:6871:6baa:b0:19e:8deb:389b with SMTP id zh42-20020a0568716baa00b0019e8deb389bmr635569oab.41.1686299028046; Fri, 09 Jun 2023 01:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686299028; cv=none; d=google.com; s=arc-20160816; b=US6yQN1sD+cW6R+flPwWATHmz36ce3X3nKO/2+Y3VphLIDr/x0UEpleRS/yZFD1KID t4cQlDpweGkp0PDHBibvIEYsztv6TTqwc7tmIvAkXkmcVadTvy2hc1nL3YJb6XEgwRkF znfzDnGR/DkB3NxstwJfUpyUT+xxQoWgWm7Tt20mEPochNVdgW0ZOs5pyrFfDrGk3Hwy M/zdKq535MIgz7uzQd5CrdMxiEoNrqwUdFw22uR+h8rAkFBQ4ZIKLm5PxBrwYgzzi2va ixy0XCgIbySkWWHI3nLh+WF+XL5xogJJGnZCyvKsQenzhl1MUIrjQWKoGqzkQCF+1YDk GKvg== 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=D+JG9ScbeIgWCoIoD1lrBSynxF7pZ7ZmtCOtSuAlDGQ=; b=EwpUHXrV6O6258F6cyic2UK5+faXcVp1cfVYiY7IX0tkUMq1NUXtO/RFNYhgLBgB/p oAykTtVvqWar63gBsfm+SollJu10clnUBKHSteH+6DB+o3f+yPYwinxGGDjsQy03nVla kJi+8/KWPl7UyOXrunEPMUFnLlWmwRlsc/JAK8gxyI3AJLv2IWtTHdzVOg3N1mCa4cR1 YG202Y/3Qv1KCN1BS9Zt1DdQ0Yoa0B6unP0F8gCOwkB/na40/NTZErzar2egNNggf9HP 1Ndjf7SnLXn0cpE11txBL54r8idv+vaj8ybZY9uYdhfDTGnX1cl+PhxpkcT0eqa1Vk6v XwYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=RfeoHUBL; 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 i65-20020a636d44000000b005440127a162si2234504pgc.561.2023.06.09.01.23.33; Fri, 09 Jun 2023 01:23:48 -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=RfeoHUBL; 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 S238515AbjFIIKW (ORCPT + 99 others); Fri, 9 Jun 2023 04:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240168AbjFIIJ3 (ORCPT ); Fri, 9 Jun 2023 04:09:29 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F19B43A80 for ; Fri, 9 Jun 2023 01:09:07 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-565e6beb7aaso13701807b3.2 for ; Fri, 09 Jun 2023 01:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686298146; x=1688890146; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=D+JG9ScbeIgWCoIoD1lrBSynxF7pZ7ZmtCOtSuAlDGQ=; b=RfeoHUBLwqk9vTTBDLCpOuzNXpllWDEkPYc6yjXtxGCPNmX/rvie991AU10lJs4XbF 9RzbOtcSEpi5Rh8KstlxITQN3Ffo4ROyfYENBHFqs9HkcG3CFgO7j5lBQrxeeGMGBjp2 NZdxOQon49qNf9HZ1Qgrz3xC18+gnVg36Hvk5SsHYUm7h4j5tszvUdFL2KV4ehwHCBOk gyj3AdqSIMMtQdGmRCxc7HYtfEU+n7ezPeWYkyEIY3KjdS94V8qvWswp+jF2hFiGMFim NoPZGExtzKBOx7SOm5zC/zUvIhzRSqstVSVI3uYZkXeW9ex9SLXGk6aLeA5PY5ojGjGB epOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686298146; x=1688890146; 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=D+JG9ScbeIgWCoIoD1lrBSynxF7pZ7ZmtCOtSuAlDGQ=; b=eNcq1vEnbYas9GdNDJuuT+ezQEyKeNJweClGQfpE/1t8VdGFXViIhDQBoU6O8YP/nL cBQnKcHC4DO7S3ViwaF0hR5codHd3/TzrkLe2GHcRYhrm8uIERMNAMVlb+NWS4/n+jin kPw/Lxn8gBmlLeIr9E/xhwZjE6ipi8oY4zL89hNQKCabV469Lyk0Z7Ie5IhPKyV67bY2 hDra7VRlYAZ3gdojNgdjiIFz8+SaHGlj4IX9pVDOhENWmrTNlpcTTduaEv/VqOo4jUhq wNFgMrVr/K2HfEpOEjCCce2Jn0jlda1w86zCFJCa4Y2F/tRbwJk4s77FC7XnoanVjVG2 n5Nw== X-Gm-Message-State: AC+VfDzB1BclvD+P63rrZeYGcsgQS9gsQFiRxWKcv0CLnPVzMAo0zGEA fdkuqFxnG3WXCZrv185a/49LCA== X-Received: by 2002:a0d:e684:0:b0:565:e87f:a78f with SMTP id p126-20020a0de684000000b00565e87fa78fmr500342ywe.25.1686298145738; Fri, 09 Jun 2023 01:09:05 -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 n19-20020a819c53000000b005688f7596ccsm453200ywa.78.2023.06.09.01.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 01:09:04 -0700 (PDT) Date: Fri, 9 Jun 2023 01:08:52 -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 , Peter Zijlstra , 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 , Alexander Gordeev , 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 v2 07/23 fix] mips: update_mmu_cache() can replace __update_tlb(): fix In-Reply-To: <178970b0-1539-8aac-76fd-972c6c46ec17@google.com> Message-ID: <6852be98-64e6-6092-d1c-13124b97bc75@google.com> References: <178970b0-1539-8aac-76fd-972c6c46ec17@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 I expect this to fix the arch/mips/mm/tlb-r4k.c:300:16: warning: variable 'pmdp' set but not used reported by the kernel test robot; but I am uncomfortable rearranging lines in this tlb_probe_hazard() area, and would be glad for review and testing by someone familiar with mips - thanks in advance! Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306091304.cNVIspK0-lkp@intel.com/ Signed-off-by: Hugh Dickins --- arch/mips/mm/tlb-r4k.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index c96725d17cab..80fc90d8d2f1 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -293,11 +293,13 @@ void local_flush_tlb_one(unsigned long page) void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) { - unsigned long flags; +#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT pgd_t *pgdp; p4d_t *p4dp; pud_t *pudp; pmd_t *pmdp; +#endif + unsigned long flags; int idx, pid; /* @@ -316,15 +318,15 @@ void update_mmu_cache(struct vm_area_struct *vma, pid = read_c0_entryhi() & cpu_asid_mask(¤t_cpu_data); write_c0_entryhi(address | pid); } - pgdp = pgd_offset(vma->vm_mm, address); mtc0_tlbw_hazard(); tlb_probe(); tlb_probe_hazard(); + idx = read_c0_index(); +#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT + pgdp = pgd_offset(vma->vm_mm, address); p4dp = p4d_offset(pgdp, address); pudp = pud_offset(p4dp, address); pmdp = pmd_offset(pudp, address); - idx = read_c0_index(); -#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT /* this could be a huge page */ if (ptep == (pte_t *)pmdp) { unsigned long lo; -- 2.35.3