From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A41F0C282D1 for ; Thu, 6 Mar 2025 11:54:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4542B280002; Thu, 6 Mar 2025 06:54:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 403B8280001; Thu, 6 Mar 2025 06:54:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F2B1280002; Thu, 6 Mar 2025 06:54:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 128A7280001 for ; Thu, 6 Mar 2025 06:54:28 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4B231C1401 for ; Thu, 6 Mar 2025 11:54:30 +0000 (UTC) X-FDA: 83190968700.08.470E36C Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf30.hostedemail.com (Postfix) with ESMTP id 3260680012 for ; Thu, 6 Mar 2025 11:54:28 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741262068; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qj5zMVY6ybE+9w8uFeoIR1Juz6pAcyfWaacjP9KfLAA=; b=lg0BlqrleXvQ/Hy5Yt6D7x6fEbDze9ysrbzpnlVbwYXl+5IfDkHL9TyPA6qchmwemsnIb5 8LZc7BZKK4Y/Je/nHZvF+YttkH6EcFDpjx+SvbCeUDJPRAKJOKkDbqC5jz/DybyRMAPsH3 mHjkXVQ/eaICY2ln0gEuGZW6RWquEIo= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741262068; a=rsa-sha256; cv=none; b=RP9wZaGeOVaJFd6zu+08olnukgMN6+hJvBNMdbGfOVpoTcuHJMxy+r3CmUB6pbUKclTLF0 XK9uJY3rfwwrOgRhT79AoSBh9BQ/bKNcmIjyaXIJtA1+Jtm54A2kXLrqciY+TxRkuC1de6 guNF8KHBZUKAx/ojeRqBsGmVEIs2Uow= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 271491007; Thu, 6 Mar 2025 03:54:40 -0800 (PST) Received: from [10.1.37.172] (XHFQ2J9959.cambridge.arm.com [10.1.37.172]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ADE103F673; Thu, 6 Mar 2025 03:54:24 -0800 (PST) Message-ID: <169f2d13-8374-48b2-8af1-db412f283e5b@arm.com> Date: Thu, 6 Mar 2025 11:54:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 04/11] arm64/mm: Refactor __set_ptes() and __ptep_get_and_clear() Content-Language: en-GB To: kernel test robot , Catalin Marinas , Will Deacon , Pasha Tatashin , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , David Hildenbrand , "Matthew Wilcox (Oracle)" , Mark Rutland , Anshuman Khandual , Alexandre Ghiti , Kevin Brodsky Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250304150444.3788920-5-ryan.roberts@arm.com> <202503061237.QurSXHSC-lkp@intel.com> From: Ryan Roberts In-Reply-To: <202503061237.QurSXHSC-lkp@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: pnjjmraanc9z79a4yjx19nioftr8m9h7 X-Rspamd-Queue-Id: 3260680012 X-Rspamd-Server: rspam07 X-HE-Tag: 1741262068-223828 X-HE-Meta: U2FsdGVkX19TlOOU/HXqoCBKYVmQ+wTRB/djBcR710RRgJfwwqxdOAf+HYBAIjdSFH+J41/wVf3UW/y8e8e7IzdBbXH9faHq/wJs31P79hF98JxvYhK8kyV/LrKnUM777MoHgAS59fVoPU8VTB85oRZKhg4tEcE+reKhjOjfQdtBg2qK7oAUr0Rl0DhgTRwdQfP9EVnwcx8cHgTJK+f9wwZBZzFDcmwP7cCXpgda4jtIs+JphaDZlWf71TpY3civGk3uB8D3S678VdC+8pDU58SBOhDQ5zxQRYMFZd3uI3grmw4tcNkpSSxRn66kbTf/kK8Q3hiSn6+kJqhaLyNl0rHTqh3V2z8+TKU2FqA9Ljo1wnM9XRGOLhD3dEp3oUNQJj1P62J4XVuM6ediGC3SlVQkO+0AoMJu9wo2mJFbQpqkIcfZGixsDFsVk9nmGf8u8fCjMBcsAkM3II7+PUFndITd1O4IYjjvRCSLyJF07JkJGyWeKwZKs6KwD3x0LAZqhIRWbmI1q5ivyvB6HDEAmR8piit9JJRIJACll5Gj1eiVd3Td6n+uVl7mBhe0PAbogW4Wr+ccFfkm9/tr6rsQn/zpzCNtTScK/ZehT03A3LvfmJD3fQcnHM9hIbPl0xglIGmyutBOxPtDWxWbR8GG1f7Q05bsV/tM1uCBSqS9Frzt4WSkpwjt+NcQ4cZLwRTOlTgxnQtEOwzjlQw/0lkMUrdlj4TKkEflQfrsWpxcl3QLAmCGYHKhCtt63zWctZ+ylzi6P6dvZEDD4Gygzkv6kvEHNUDSdAJAJ9YOV+qRROwsQr3neSPB9weHES8SJdf9aLOKGlDLdHqtFVFjNM1L1z6T3Oh8nAL4Zv7nHe+Cm46q5ueObHvXlbCjJ5uagAomqaJTHfghrABG1ggE1M4jJb+1N1+d8Nu/wqk07CfADtyip0dU4NHRv1fUtbEm/T1TpGrw8u4z1wLxnf30hTW oeBjhhN+ Ws+n/UsD1OqstUEu0I6BNevrHQ3IrHrv5DTByd44YwrIHbmy3AzFB81U11x4F6PYZsuMOLOTWo6z+isjL3Bq1HxJlh2AR0M2QMtHUkLYnxxmwkjvAuyWVTbfqZzcCTqihmzb3QFaxswDI7s9nfKig+YrWx26qCVxD32cQJ6FQAnZjFt6C9nxmq4YvCOSL1x526fYTtG0yhZ1tYBpBC2zeYEtBF29mqbWpl9dfUBThpWinm1beKtif2JfOjfFM+HEX/33zXGfvXJdM8ZBE7vOY0oeJzucUEUrprvQgn4kSIgBtPypBPMbAs8aTvEIqCl8To5nNDDurhmhTWJFY/LYo9Z3Eo+QG/uPBgWlHgG6o9OruCTOLwamIzG6Ur1LRO0ZSgpwozHmYSxb5GZd+6nJofHJiIA== 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: List-Subscribe: List-Unsubscribe: On 06/03/2025 05:08, kernel test robot wrote: > Hi Ryan, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on linus/master] > [also build test ERROR on v6.14-rc5 next-20250305] > [cannot apply to arm64/for-next/core akpm-mm/mm-everything arm-perf/for-next/perf] > [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-hugetlb-Cleanup-huge_pte-size-discovery-mechanisms/20250304-230647 > base: linus/master > patch link: https://lore.kernel.org/r/20250304150444.3788920-5-ryan.roberts%40arm.com > patch subject: [PATCH v3 04/11] arm64/mm: Refactor __set_ptes() and __ptep_get_and_clear() > config: arm64-randconfig-001-20250305 (https://download.01.org/0day-ci/archive/20250306/202503061237.QurSXHSC-lkp@intel.com/config) > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503061237.QurSXHSC-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/202503061237.QurSXHSC-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > In file included from arch/arm64/kernel/asm-offsets.c:12: > In file included from include/linux/ftrace.h:10: > In file included from include/linux/trace_recursion.h:5: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:11: > In file included from arch/arm64/include/asm/hardirq.h:17: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:14: > In file included from arch/arm64/include/asm/io.h:12: > In file included from include/linux/pgtable.h:6: >>> arch/arm64/include/asm/pgtable.h:639:7: error: duplicate case value '536870912' > case PUD_SIZE: > ^ > include/asm-generic/pgtable-nopud.h:20:20: note: expanded from macro 'PUD_SIZE' > #define PUD_SIZE (1UL << PUD_SHIFT) > ^ > arch/arm64/include/asm/pgtable.h:636:7: note: previous case defined here > case PMD_SIZE: > ^ > include/asm-generic/pgtable-nopmd.h:22:20: note: expanded from macro 'PMD_SIZE' > #define PMD_SIZE (1UL << PMD_SHIFT) > ^ > In file included from arch/arm64/kernel/asm-offsets.c:12: > In file included from include/linux/ftrace.h:10: > In file included from include/linux/trace_recursion.h:5: > In file included from include/linux/interrupt.h:11: > In file included from include/linux/hardirq.h:11: > In file included from arch/arm64/include/asm/hardirq.h:17: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:14: > In file included from arch/arm64/include/asm/io.h:12: > In file included from include/linux/pgtable.h:6: > arch/arm64/include/asm/pgtable.h:1303:7: error: duplicate case value '536870912' > case PUD_SIZE: > ^ > include/asm-generic/pgtable-nopud.h:20:20: note: expanded from macro 'PUD_SIZE' > #define PUD_SIZE (1UL << PUD_SHIFT) > ^ > arch/arm64/include/asm/pgtable.h:1300:7: note: previous case defined here > case PMD_SIZE: > ^ > include/asm-generic/pgtable-nopmd.h:22:20: note: expanded from macro 'PMD_SIZE' > #define PMD_SIZE (1UL << PMD_SHIFT) > ^ > 2 errors generated. > make[3]: *** [scripts/Makefile.build:102: arch/arm64/kernel/asm-offsets.s] Error 1 shuffle=4064171735 > make[3]: Target 'prepare' not remade because of errors. > make[2]: *** [Makefile:1264: prepare0] Error 2 shuffle=4064171735 > make[2]: Target 'prepare' not remade because of errors. > make[1]: *** [Makefile:251: __sub-make] Error 2 shuffle=4064171735 > make[1]: Target 'prepare' not remade because of errors. > make: *** [Makefile:251: __sub-make] Error 2 shuffle=4064171735 > make: Target 'prepare' not remade because of errors. > > > vim +/536870912 +639 arch/arm64/include/asm/pgtable.h > > 626 > 627 static inline void set_ptes_anysz(struct mm_struct *mm, pte_t *ptep, pte_t pte, > 628 unsigned int nr, unsigned long pgsize) > 629 { > 630 unsigned long stride = pgsize >> PAGE_SHIFT; > 631 > 632 switch (pgsize) { > 633 case PAGE_SIZE: > 634 page_table_check_ptes_set(mm, ptep, pte, nr); > 635 break; > 636 case PMD_SIZE: > 637 page_table_check_pmds_set(mm, (pmd_t *)ptep, pte_pmd(pte), nr); > 638 break; > > 639 case PUD_SIZE: > 640 page_table_check_puds_set(mm, (pud_t *)ptep, pte_pud(pte), nr); > 641 break; Looks like this needs to be wrapped in `#ifndef __PAGETABLE_PMD_FOLDED`. This failing config folds the PMD so PMD_SIZE and PUD_SIZE are the same. Given there are now 2 kernel robot reports, I'll respin the series next week, giving time for any interim review comments. Thanks, Ryan > 642 default: > 643 VM_WARN_ON(1); > 644 } > 645 > 646 __sync_cache_and_tags(pte, nr * stride); > 647 > 648 for (;;) { > 649 __check_safe_pte_update(mm, ptep, pte); > 650 __set_pte(ptep, pte); > 651 if (--nr == 0) > 652 break; > 653 ptep++; > 654 pte = pte_advance_pfn(pte, stride); > 655 } > 656 } > 657 >