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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D0A0C25B78 for ; Tue, 4 Jun 2024 15:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vIAcZ6Y/1+1GE/YC+ExwCGyiOLB14+qA70TMUb7fBhg=; b=HBPBZw1zMVJ+SO GYku/He8emQ84s4C4aXQhHJnGyJy/Y6QToDnGp1xar+UDBCmxy6vMc1SkbKrNpRXheJf7uVTgUmSA 7+FHMSHMvYQmv5dT3LyDFddyKKXr+G+Bb+IRiXoZG7tQRODKNxxaIlZrW2li/3YSsIjsq7j/d1Z3B yiHIaX6rldgUKd8/0PwvQI/T2fh3JWlmqwyIHQjIVqMrx26zixYVn0LzWs7U7YnqhgJ3vZ2PbqEN0 vrDsFogn8XXdwgWh4n9wP/eZj7MHlU8T87Gh71Ef7o9tvwNI8Iuyyzw6J/h2MNHyRybd/zgkhaZdY jda+uDdun6Zk++mGNwzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEWVm-000000031Zn-2xl6; Tue, 04 Jun 2024 15:55:46 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEWVj-000000031Yi-0sXr for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2024 15:55:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AF28D6125F; Tue, 4 Jun 2024 15:55:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D6DEC2BBFC; Tue, 4 Jun 2024 15:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717516542; bh=d9xupwVDLSm6tV2FshRNHXaiUYZUrqvz6XXtUmlyJn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KnSJePGCdkPtmadAOeftoHNsZRFheJvrrtSuAFR6wZ9VvWbK9e9E6fv42x8BEE8f6 xSwG2F5Lvla5s+EWlagUjwMJJlsungUVG50fA3+Kp8odzf3mRKvhtGj+2rglELWRfD BeOwuKPlEwiEfZ1EhBuTSQ34QEVvUIuzPTC+AODN5n1Io8Chh7Q+IbD0z+pREb2nvJ mz33KDJSBESl6nppAUQTQWk7kfIgif7X98FMWcswcjwmjs5FuWOHM3paBzk6We7Bb9 nJqzyGy8sSkv4Ik6cumR7uVV1RS9zTPg/t8B1J+7JHnHZ5h9ne8JW4CigUslM0D3Sd vDff2HgZ/j8rg== Date: Tue, 4 Jun 2024 16:55:37 +0100 From: Will Deacon To: Arnd Bergmann Cc: Catalin Marinas , Jason Gunthorpe , Arnd Bergmann , Baoquan He , Kefeng Wang , Peter Zijlstra , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] arm64/io: add constant-argument check Message-ID: <20240604155536.GA20674@willie-the-truck> References: <20240528153717.2439910-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240528153717.2439910-1-arnd@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240604_085543_348715_4CA638C2 X-CRM114-Status: GOOD ( 19.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 28, 2024 at 05:37:11PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > In some configurations __const_iowrite32_copy() does not get inlined > and gcc runs into the BUILD_BUG(): > > In file included from : > In function '__const_memcpy_toio_aligned32', > inlined from '__const_iowrite32_copy' at arch/arm64/include/asm/io.h:203:3, > inlined from '__const_iowrite32_copy' at arch/arm64/include/asm/io.h:199:20: > include/linux/compiler_types.h:487:45: error: call to '__compiletime_assert_538' declared with attribute error: BUILD_BUG failed > 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > | ^ > include/linux/compiler_types.h:468:25: note: in definition of macro '__compiletime_assert' > 468 | prefix ## suffix(); \ > | ^~~~~~ > include/linux/compiler_types.h:487:9: note: in expansion of macro '_compiletime_assert' > 487 | _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:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' > 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") > | ^~~~~~~~~~~~~~~~ > arch/arm64/include/asm/io.h:193:17: note: in expansion of macro 'BUILD_BUG' > 193 | BUILD_BUG(); > | ^~~~~~~~~ > > Move the check for constant arguments into the inline function to ensure > it is still constant if the compiler decides against inlining it. > > Fixes: ead79118dae6 ("arm64/io: Provide a WC friendly __iowriteXX_copy()") > Signed-off-by: Arnd Bergmann > --- > v2: > - fix both 32-bit and 64-bit copies > - remove now-redundant macros > --- > arch/arm64/include/asm/io.h | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) I think this is superseded by Mark's diff in reply to v1, right? https://lore.kernel.org/r/ZlcODqVXTDh6n0h-@J2N7QTR9R3 If so, Mark, please can you post that as a proper patch so that we can get this fixed? Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel