From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43D271C7B70; Thu, 10 Oct 2024 13:03:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728565415; cv=none; b=XFIglxma88v5r+vZ42//7W2nkhPn7IhVT+ai8VFMk7QOgvxHI2KWPWvyGykyEmVmNNpdfyJPKC02If3uJQbIzBlh889CmO0UsNKoeC5560BS0dPxdRPyqKEQdWW5uRpN9VH7+dZXcv6aDJgzLzW1Ht/z3KZtjsc+9t2/jVl7g5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728565415; c=relaxed/simple; bh=lxTwG9FeY6tGa/suySl5tWQBbHE4hFx2E8w3ZHNgXu4=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=OLeTWvH7OVP6fUTCyiPouilYwS8aX1ejhZfAnafovvoOaiPaGTcFV3l1biOpFSMXuBuaLp1JpqzjkfFYDTCWchyrm18leWCc77klJKgiW7cNOgU8UTzLitdSJWrnfwwpB556W5/0RtwGm9ObUNYP42lwhni8UAN5RbWN/Ga3/p0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UO5kNgvI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UO5kNgvI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF9D1C4CECC; Thu, 10 Oct 2024 13:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728565414; bh=lxTwG9FeY6tGa/suySl5tWQBbHE4hFx2E8w3ZHNgXu4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UO5kNgvIcGDuHVNFYCYI0c+G0EbwoaMcgQWGOu4kZKes9aOcnYvxyWuBiC618dyNm QW0R+QFFjozmPlaezhHAuBP2U/1A0f55vTY68kB93dJ0gBFn5InP54GDYqomD+eIsY jRAvuk2q7UkZb7JNJwgfHPy+qnBHm3Ih75R17T0K1/99sx6vU/gDkp8yTMiB5OZKut px7ZyVjo8MgdeZkAAYYuM+U7p0MD+0yV7G0CpyqtEUMe901bxURJbPfJqk5LwSM/3O 2WL7360heBCEkHl1qq7+TO6mSQPyJhcZsb0UUWiSrSa7L+Rq9IbP+pVLBFzqclMNrN TEFLMCrXJQVfw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1syspI-002BvM-9A; Thu, 10 Oct 2024 14:03:32 +0100 Date: Thu, 10 Oct 2024 14:03:31 +0100 Message-ID: <86o73s5cv0.wl-maz@kernel.org> From: Marc Zyngier To: "tianjia.zhang" Cc: Nick Desaulniers , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Nathan Chancellor , Bill Wendling , Justin Stitt , =?UTF-8?B?UGllcnJlLUNsw6ltZW50?= Tosi , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] KVM: arm64: nVHE: gen-hyprel: Silent build warnings In-Reply-To: References: <20241009085751.35976-1-tianjia.zhang@linux.alibaba.com> <86set55yca.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tianjia.zhang@linux.alibaba.com, ndesaulniers@google.com, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, nathan@kernel.org, morbo@google.com, justinstitt@google.com, ptosi@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 10 Oct 2024 09:12:29 +0100, "tianjia.zhang" wrote: > > > > On 10/9/24 7:07 PM, Marc Zyngier wrote: > > On Wed, 09 Oct 2024 09:57:51 +0100, > > Tianjia Zhang wrote: > >> > >> This patch silent the some mismatch format build warnings > >> with clang, like: > >> > >> arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:233:2: warning: format specifies > >> type 'unsigned long' but the argument has type 'Elf64_Off' > >> (aka 'unsigned long long') [-Wformat] > >> 233 | assert_ne(off, 0UL, "%lu"); > >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > >> | %llu > >> arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:193:34: note: expanded from macro 'assert_ne' > >> 193 | #define assert_ne(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, !=) > >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >> arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:188:19: note: expanded from macro 'assert_op' > >> 187 | " failed (lhs=" fmt ", rhs=" fmt \ > >> | ~~~ > >> 188 | ", line=%d)", _lhs, _rhs, __LINE__); \ > >> | ^~~~ > >> arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:167:17: note: expanded from macro 'fatal_error' > >> 166 | fprintf(stderr, "error: %s: " fmt "\n", \ > >> | ~~~ > >> 167 | elf.path, ## __VA_ARGS__); \ > >> | ^~~~~~~~~~~ > >> > >> Signed-off-by: Tianjia Zhang > > > > I don't see these warnings. What version of LLVM are you using? > > > > I compiled the kernel on Apple Silicon M3 Pro in macOS 15.0.1, Maybe this is > a special scenario that is rarely used. > > Details of clang: > > # clang --version > Homebrew clang version 19.1.1 > Target: arm64-apple-darwin24.0.0 > Thread model: posix > InstalledDir: /opt/homebrew/Cellar/llvm/19.1.1/bin What I have is similar enough: ClangBuiltLinux clang version 19.1.1 (https://github.com/llvm/llvm-project.git d401987fe349a87c53fe25829215b080b70c0c1a) Target: aarch64-unknown-linux-gnu Thread model: posix InstalledDir: /home/maz/hot-poop/llvm/llvm-19.1.1-aarch64/bin and yet this doesn't fire. Can you try with a compiler actually targeting with Linux instead of MacOS? Thanks, M. -- Without deviation from the norm, progress is not possible.