Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3471110rwb; Sun, 30 Jul 2023 08:17:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHH4SlpJeER9vlqC7I8sptxMPGEDSpkHluJzgSfAYm/Hd7qsqWgKpdH3ms66SPgvKwYWU1/ X-Received: by 2002:a17:903:181:b0:1b5:1467:c4e8 with SMTP id z1-20020a170903018100b001b51467c4e8mr9047750plg.15.1690730268161; Sun, 30 Jul 2023 08:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690730268; cv=none; d=google.com; s=arc-20160816; b=crhfDNIBdLKoFbEQp3EHQBneCMYgQSiZGold7aWJLP4FHAjMWMMXucfklItcOwmCFY aIiyeGjmghvhtJhAPtnJWdEa5xItUZEVYR4Nxrm//pG1J80IqdejuqUuh+8DVjV8gQMp xYAf6G5QkcC1XdiJGOXTTRIeBElupHKcvs8buoHF7hhEB2XTVc33dLp51RmBE4vRF4p3 +u/XOutJCKuMK27FSe1OMG+QUqaBc23Zv1WubNzdqQNniJv9HICXk5RfnWJfmD+QsyBO CJ5MxNGMC9Jw8kGoZKz/hSxLyjd6vdCYN/kfTnhnntRQjgcbn6ibUCWrWwOq9N5ZdEYu WDIw== 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:dkim-signature; bh=YaUHcKdk4JKCePUvstZes18rrFfbUgxxqISjdK5BX6I=; fh=E99j1YDatvynU586LVoi6I9GyxT9YuV5pFtv7FNJU+E=; b=jftmGhIDTcI272V/SW0aWAbwwRUxSpnFZMqILDm07eu9iaVHC1Cr1HeZew4Rbqln4q h4T8E02sTjnn/cfoiA70D4H8okWCkBahrYoz/9zk3c0KccnFSVVQnorxXpMUmdaPdxI9 HoVvRC4dzX2foL4TWRZNf8GnhcWMMG3lkXvkvL5HxGDAy7w8mjXPAAAI3wUzBVRF+Wfg 1iSzH797JuDeqKy115ZI8z1MugvVojVy+Ymmp0S27oYcqGAJP3ja9sVEcc5Eus3dibXX IqpYEm35McKTXB2Zu3ymGCUWHX0m2F+siONnYk2HXT0ROjYmrjWHXEcoaAp0QyOqY47W ULOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TI1dt1Ff; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a17090332c200b001b22f31cce9si6218754plr.179.2023.07.30.08.17.36; Sun, 30 Jul 2023 08:17:48 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TI1dt1Ff; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbjG3OhX (ORCPT + 99 others); Sun, 30 Jul 2023 10:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjG3OhV (ORCPT ); Sun, 30 Jul 2023 10:37:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9238ECA for ; Sun, 30 Jul 2023 07:37:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E75A60BA6 for ; Sun, 30 Jul 2023 14:37:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F8F2C433C7; Sun, 30 Jul 2023 14:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690727839; bh=o8Gc/P95YN1AULlhWvUaiLcwNxlJDRgI2XG/sKEwRNM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TI1dt1FfjHIB0V9hdfVRp9AMihxBSWpNay0ysWMhBiDC54h7dMWfyeQ1qfazV86WN shsVtSHgyG8p1iRnpbQVJzdPZ09ufOgctfLzqZHbmfYAHhBoU601NfMFRJWR9mngTf 8YSSmGysWque4KUxitWc5S1cj7zlcF0ysA0SRSjjDPVY1Ew2xMPTK/V+C0TZuKQcfs dlnL3zr6m3+yNAFs+vWuIVUWabEx9k1SjmmQZZXD9OAAIxNJA9wdg270VER3Q+rLqW X2j46UZgALPO9Pm7MEbWEtg0HxxUdN+03/3TJi+h5Klvpi9lZJbb00gUZyZZqKBrct LqmLJKBLTZXCQ== Date: Sun, 30 Jul 2023 22:25:41 +0800 From: Jisheng Zhang To: Conor Dooley Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Message-ID: References: <20230727160356.3874-1-jszhang@kernel.org> <20230729-shucking-slang-370c6baa358e@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230729-shucking-slang-370c6baa358e@spud> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Sat, Jul 29, 2023 at 11:34:38AM +0100, Conor Dooley wrote: > Hey, > > On Fri, Jul 28, 2023 at 12:03:56AM +0800, Jisheng Zhang wrote: > > Allow to force all function address 64B aligned as it is possible for > > other architectures. This may be useful when verify if performance > > bump is caused by function alignment changes. > > > > Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency > > for FUNCTION_ALIGN option"), riscv supports enabling the > > DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each > > arch needs to claim the support explicitly. I tried the config file in > > [1] for both RV64 and RV32, I can't reproduce the build error as [1], > > there is no reason for not allowing to enforce this function alignment. > > > > Link: https://lore.kernel.org/lkml/202202271612.W32UJAj2-lkp@intel.com/ [1] > > This is a CSKY randconfig, is there any particular reason that running > that randconfig (over a year later) and on a different architecture > would trigger whatever the condition was? Just use the randconfig and then s/CSKY/RISCV to check whether RV32 and RV64 can reproduce the compile error ;) > > The original commit here seems far too penal - why was it not just > disabled on CSKY??? I tried looking a bit on lore, but didn't see > anything explaining the subset of supported archs they picked. > I did see Guo Ren wondering if rv32 would be similarly problematic - but > since this is something likely to just trip up randconfigs, I think we > should go for it and if rv32 becomes a problem, restrict this to 64-bit. > > Reviewed-by: Conor Dooley > > Thanks, > Conor. > > > Signed-off-by: Jisheng Zhang > > --- > > lib/Kconfig.debug | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index fbc89baf7de6..39ffd218e960 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -502,7 +502,7 @@ config SECTION_MISMATCH_WARN_ONLY > > > > config DEBUG_FORCE_FUNCTION_ALIGN_64B > > bool "Force all function address 64B aligned" > > - depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || S390) > > + depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || RISCV || S390) > > select FUNCTION_ALIGNMENT_64B > > help > > There are cases that a commit from one domain changes the function > > -- > > 2.40.1 > >