Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2665344rdg; Mon, 16 Oct 2023 10:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEakr3Mczd4gkYZYavgvm11p4ESIIZX4wZOk6MCa0WEJQ0PC2CAALsh/C7SzBblJGAClZns X-Received: by 2002:a05:6808:2792:b0:3ae:12f6:ac51 with SMTP id es18-20020a056808279200b003ae12f6ac51mr34145oib.41.1697478927064; Mon, 16 Oct 2023 10:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697478927; cv=none; d=google.com; s=arc-20160816; b=Kp8ScEEOxAHwgS4YlgmrcssmPJQt33JTKdgUzIjEjq/q1cxRaI+s5XdOA07ptCvSfn s+ugXrE14qpn37F05GcoQw9keXXfnyJPljRql40oDkDk5fTpM8/ACYbfYLmgltEfZC4D hfMdc5HxrVsTfg348St2dUsQWFavQ8szHZ56WdxHSKbyxR9cMSAr5jKgYP4HkPSpTyX8 9hGH2x8Pu4kYsYLHO/85ewoCnoxy+GCIAivIMlyrKO9Aa9eJVo6hFZRvtBcJTqveJ2gE 9LrWeMjQj2BVtVlDC1vdxNVlDOvarydpVBACOnhSrAXY1i/0W9X48S4woTufkkuXG8me sp2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QG3uJDJxEmCcdzDvVqBYPqnqTB+cODnGM1Vd4jyWZMY=; fh=bssit40IFtLVDpTYBKWqtdjn5zUY0IW/zK0P4Tt9+Ic=; b=wwEQpIv51eAJ98eGK7SISRsrSPe8HquAXcCXfurpHGHBxJKrYZYC1l6NoBKTwOH5Af nOJNBEjY2BXNgVY1IZ7DzjjMgopniGcq11KtNpS44Ee86FmmFKtdMK6wbTy7fczcMgY1 iJBkcxVkA2hqxJo8//cXtDKJ9I/8lU8z1npxQIZaMRoWtiGd9PDksevLD3plZ93aTidk iD6HQ4GMJxbAXvrJsne164fTW2bTZowhwJn7+ifmyspjY2IcBlWMU9D74YoLzjpcvbjG SnX+1Vjvs8V6PE5oXaC/WN1sVbYyFgBYVOuG8civL6kYxWiX6L2n60dV4IVlRh1GTx5R ZPCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q131-20020a632a89000000b0056433b221b9si8053233pgq.477.2023.10.16.10.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 10:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D77318039FD7; Mon, 16 Oct 2023 10:55:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232033AbjJPRy7 (ORCPT + 99 others); Mon, 16 Oct 2023 13:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjJPRy6 (ORCPT ); Mon, 16 Oct 2023 13:54:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00EBBA7 for ; Mon, 16 Oct 2023 10:54:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAD4CC433C8; Mon, 16 Oct 2023 17:54:54 +0000 (UTC) Date: Mon, 16 Oct 2023 18:54:52 +0100 From: Catalin Marinas To: kernel test robot Cc: Ryan Roberts , Will Deacon , Steven Price , Peter Collingbourne , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] arm64/mm: Hoist synchronization out of set_ptes() loop Message-ID: References: <20231005140730.2191134-1-ryan.roberts@arm.com> <202310140531.BQQwt3NQ-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202310140531.BQQwt3NQ-lkp@intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 10:55:24 -0700 (PDT) On Sat, Oct 14, 2023 at 05:15:51AM +0800, kernel test robot wrote: > kernel test robot noticed the following build warnings: > > [auto build test WARNING on arm64/for-next/core] > [also build test WARNING on arm-perf/for-next/perf arm/for-next kvmarm/next soc/for-next linus/master v6.6-rc5 next-20231013] > [cannot apply to arm/fixes] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Ryan-Roberts/arm64-mm-Hoist-synchronization-out-of-set_ptes-loop/20231005-231636 > base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core > patch link: https://lore.kernel.org/r/20231005140730.2191134-1-ryan.roberts%40arm.com > patch subject: [PATCH v2] arm64/mm: Hoist synchronization out of set_ptes() loop > config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231014/202310140531.BQQwt3NQ-lkp@intel.com/config) > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231014/202310140531.BQQwt3NQ-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202310140531.BQQwt3NQ-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > In file included from net/ipv4/route.c:66: > In file included from include/linux/mm.h:29: > In file included from include/linux/pgtable.h:6: > >> arch/arm64/include/asm/pgtable.h:344:65: warning: parameter 'addr' set but not used [-Wunused-but-set-parameter] > 344 | static inline void set_ptes(struct mm_struct *mm, unsigned long addr, > | ^ > 1 warning generated. Thanks for the report. I think something like below will do (I'll test and commit as a separate patch, it's not something that Ryan's patch introduces): diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 68984ba9ce2a..b19a8aee684c 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -341,8 +341,9 @@ static inline void __sync_cache_and_tags(pte_t pte, unsigned int nr_pages) mte_sync_tags(pte, nr_pages); } -static inline void set_ptes(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte, unsigned int nr) +static inline void set_ptes(struct mm_struct *mm, + unsigned long __always_unused addr, + pte_t *ptep, pte_t pte, unsigned int nr) { page_table_check_ptes_set(mm, ptep, pte, nr); __sync_cache_and_tags(pte, nr); @@ -353,7 +354,6 @@ static inline void set_ptes(struct mm_struct *mm, unsigned long addr, if (--nr == 0) break; ptep++; - addr += PAGE_SIZE; pte_val(pte) += PAGE_SIZE; } } @@ -528,7 +528,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd) #define pud_pfn(pud) ((__pud_to_phys(pud) & PUD_MASK) >> PAGE_SHIFT) #define pfn_pud(pfn,prot) __pud(__phys_to_pud_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)) -static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, +static inline void __set_pte_at(struct mm_struct *mm, + unsigned long __always_unused addr, pte_t *ptep, pte_t pte, unsigned int nr) { __sync_cache_and_tags(pte, nr); -- Catalin