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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0A93C636D6 for ; Thu, 2 Feb 2023 16:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbjBBQgZ (ORCPT ); Thu, 2 Feb 2023 11:36:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232428AbjBBQgT (ORCPT ); Thu, 2 Feb 2023 11:36:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9336A6A33D for ; Thu, 2 Feb 2023 08:36:17 -0800 (PST) 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 3195161BF7 for ; Thu, 2 Feb 2023 16:36:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1953FC433EF; Thu, 2 Feb 2023 16:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675355776; bh=JytctRnLlmIQWNjAzhvXjLyHz2fxuSYWfasVqPSiFbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ejpBmvWqofPsVRnlh+Aksey5eg0wIpLSXz9WQMa6HvO4WwE00TY4q0TdohUFhbKab oKmEmhXcTzBaodCHEZGnHj9boK9rd8Pj7y+R3rsgttcy04XdCRNb/rbJ7wWWQOHagG 52pAygw16+yZMT3j80dvwTGM24fuQmNQk6q0nCnvhneUwfl5IZi+FXBCAEIqtPG9Vg y6dnsjaherSc173i1mVO+4dtlDacQKVYiv2LYO62l+UQU2rg+RMphek4SlwE3MHh7n DVM+8TngSeFGTNePYBxPART7PWayF4jHNhaCiPvW7NPTBoY8Zh+T96gkMK7zb4QTH3 7RxEarDiVsPuw== Date: Fri, 3 Feb 2023 00:25:41 +0800 From: Jisheng Zhang To: Palmer Dabbelt Cc: Palmer Dabbelt , Samuel Holland , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Dao Lu , Albert Ou , Heiko Stuebner , Paul Walmsley , Anup Patel , Atish Patra , Guo Ren Subject: Re: [PATCH] riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y Message-ID: References: <20220922060958.44203-1-samuel@sholland.org> <167523607081.29266.3967297527966644183.b4-ty@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <167523607081.29266.3967297527966644183.b4-ty@rivosinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 31, 2023 at 11:21:10PM -0800, Palmer Dabbelt wrote: > On Thu, 22 Sep 2022 01:09:58 -0500, Samuel Holland wrote: > > commit 8eb060e10185 ("arch/riscv: add Zihintpause support") broke > > building with CONFIG_CC_OPTIMIZE_FOR_SIZE enabled (gcc 11.1.0): > > > > CC arch/riscv/kernel/vdso/vgettimeofday.o > > In file included from : > > ./arch/riscv/include/asm/jump_label.h: In function 'cpu_relax': > > ././include/linux/compiler_types.h:285:33: warning: 'asm' operand 0 probably does not match constraints > > 285 | #define asm_volatile_goto(x...) asm goto(x) > > | ^~~ > > ./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto' > > 41 | asm_volatile_goto( > > | ^~~~~~~~~~~~~~~~~ > > ././include/linux/compiler_types.h:285:33: error: impossible constraint in 'asm' > > 285 | #define asm_volatile_goto(x...) asm goto(x) > > | ^~~ > > ./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto' > > 41 | asm_volatile_goto( > > | ^~~~~~~~~~~~~~~~~ > > make[1]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1 > > make: *** [arch/riscv/Makefile:128: vdso_prepare] Error 2 > > > > [...] > > Applied, thanks! Hi Palmer, I assume the build error is already fixed in v6.1 and can't be reproduced. Thanks > > [1/1] riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y > https://git.kernel.org/palmer/c/3c349eacc559 > > Best regards, > -- > Palmer Dabbelt