Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2298124rwd; Fri, 19 May 2023 04:00:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57STRFjzQ2vbRKEetlhKegIbbsciK47jT6pKhB4jLORemQyhzewEo0eTEVTONfHjesuFgE X-Received: by 2002:a17:90a:ab86:b0:253:3118:1ba0 with SMTP id n6-20020a17090aab8600b0025331181ba0mr1748916pjq.11.1684494033492; Fri, 19 May 2023 04:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684494033; cv=none; d=google.com; s=arc-20160816; b=VsUlEhMuV2TMIC6UnfFCgPzdoGs3QNJywVYGMMDIxbEYufJ1iaXZOEIObRa3faFfPu o6xe68Xe97a1LT3wusM/khL96HNDOloAKR7Z0YoUg+/Lyk3rQXCh/Gfa7LyJQDCFCIte /p508hk5gditfKJqBjEPXZqLe7oFlWyJwsOuMBICYqwDR8p3dRR4v17lZ3BtF5Yx/Das 9cF/4WOyU//72KiTleW9G71UtU20b4H9CHdYv+RjDBVZYy07vKXsbvLbrbeewh3Iq7Av PeSTpnjFD4wEutRvbCNpCBCCcTBUMX9YDDyv9ScSCAmkYNXtyIIk7lJv47X0/FBt6xgW A8lA== 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=ZyrleQ/UnNhQW+Wh+OzWMk47ErdvTbWcDFXe0QzeUJc=; b=rYjLoGIAaP2TKvj6b6s+0LpxZpBTGIopPGZZO6MCRED/USf8fgnv7Sg9W2z0ik4y8A jVKbMpYWIPq+QfE0AjyW6h3Z+qq8bDDn5Ngfrqkq61kLetuQoGBvsQV0s5STZCt2FhzG KBf0WYKjFVFCF+1n/FOo03h8xfxg1vH/dammLr2+8p9/IZb13TyI/4cVj0VHYHsc30Un FzPKyj6KUZkVCtnV6P+uOTV4uyMnzdI+AHWcnKXDwcAcB3GrO8h0nys6XCNTMpYX/iBJ lDNlQosSIMaw8ueQEcKbOrBeaK7YvIWSYur9bN15cs6Eozj1ydsjGftdrlSVkaIKKnGR 1CrQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt24-20020a17090af01800b002533eca039dsi1444825pjb.185.2023.05.19.04.00.17; Fri, 19 May 2023 04:00:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230335AbjESKpf (ORCPT + 99 others); Fri, 19 May 2023 06:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjESKpc (ORCPT ); Fri, 19 May 2023 06:45:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A9AE7F; Fri, 19 May 2023 03:45:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6257565676; Fri, 19 May 2023 10:45:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CA5C433D2; Fri, 19 May 2023 10:45:27 +0000 (UTC) Date: Fri, 19 May 2023 11:45:24 +0100 From: Catalin Marinas To: Naresh Kamboju Cc: Linux-Next Mailing List , open list , linux-mm , Linux ARM , lkft-triage@lists.linaro.org, Ard Biesheuvel , Arnd Bergmann , Dan Carpenter , Andrew Morton , David Hildenbrand , Will Deacon , Mike Rapoport , jforbes@fedoraproject.org, Anders Roxell Subject: Re: next: arm64: build/gcc-12-lkftconfig-64k_page_size - error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Fri, May 19, 2023 at 04:06:35PM +0530, Naresh Kamboju wrote: > On Wed, 17 May 2023 at 18:56, Naresh Kamboju wrote: > > Following arm64 builds failed on Linux next-20230517. > > > > - build/gcc-12-lkftconfig-64k_page_size > > - build/gcc-11-lkftconfig-64k_page_size > > > > Reported-by: Linux Kernel Functional Testing > > > > Build log: > > ====== > > include/asm-generic/div64.h:46:27: warning: conversion from 'long > > unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from > > '4398046511104' to '0' [-Woverflow] > > 46 | uint32_t __base = (base); \ > > | ^ > > include/linux/math.h:40:44: note: in expansion of macro 'do_div' > > 40 | ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) > > | ^~~~~~ > > include/linux/math.h:43:9: note: in expansion of macro 'DIV_ROUND_DOWN_ULL' > > 43 | DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d)) > > | ^~~~~~~~~~~~~~~~~~ > > arch/arm64/kvm/mmu.c:95:22: note: in expansion of macro 'DIV_ROUND_UP_ULL' > > 95 | n += DIV_ROUND_UP_ULL(range, PUD_SIZE); > > | ^~~~~~~~~~~~~~~~ > > In file included from : > > mm/huge_memory.c: In function 'hugepage_init': > > include/linux/compiler_types.h:397:45: error: call to > > '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON > > failed: (((16 - 3) * (4 - (2)) + 3)-16) > 10 > > 397 | _compiletime_assert(condition, msg, > > __compiletime_assert_, __COUNTER__) > > | ^ > > include/linux/compiler_types.h:378:25: note: in definition of macro > > '__compiletime_assert' > > 378 | prefix ## suffix(); > > \ > > | ^~~~~~ > > include/linux/compiler_types.h:397:9: note: in expansion of macro > > '_compiletime_assert' > > 397 | _compiletime_assert(condition, msg, > > __compiletime_assert_, __COUNTER__) > > | ^~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:39:37: note: in expansion of macro > > 'compiletime_assert' > > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > > | ^~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' > > 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) > > | ^~~~~~~~~~~~~~~~ > > include/linux/bug.h:24:25: note: in expansion of macro 'BUILD_BUG_ON' > > 24 | BUILD_BUG_ON(cond); \ > > | ^~~~~~~~~~~~ > > mm/huge_memory.c:470:9: note: in expansion of macro 'MAYBE_BUILD_BUG_ON' > > 470 | MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER > MAX_ORDER); > > | ^~~~~~~~~~~~~~~~~~ > > make[3]: *** [scripts/Makefile.build:252: mm/huge_memory.o] Error 1 > > Linux next 20230517 arm64 64k page size build failed. > > - CONFIG_ARM64_64K_PAGES=y > > Reported-by: Linux Kernel Functional Testing > > Anders bisected and found the following is the first bad commit. > > commit fd2d1cb8c5454888f67aba4c6218e30106862070 > Author: Catalin Marinas > Date: Wed May 3 13:33:42 2023 +0100 > > arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional We are dropping this commit for now but the problem is still there with EXPERT enabled. The problem is that we start with ARCH_FORCE_MAX_ORDER of 10 in defconfig and we then change the page size to 64K but this value is no longer valid (only 13 works for this page size). I'll send a patch dropping the config description entirely, unless there are some strong requirements to have the ranges back. -- Catalin