Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3708173rwr; Sat, 29 Apr 2023 12:34:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Z+9Ehz/jNBEu3KE191MGmDtj1cR7NSOZGAoueMu4M2Dq5beAfiOezWOmHy2rhOEVRBYXI X-Received: by 2002:a05:6a20:8e19:b0:f6:9492:93b8 with SMTP id y25-20020a056a208e1900b000f6949293b8mr10101155pzj.3.1682796844228; Sat, 29 Apr 2023 12:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682796844; cv=none; d=google.com; s=arc-20160816; b=y1RumA+IdkX2zolk5M0/sFf02u4S6vfnnAKSrSB6I41on/2iFgAg0JEuHczIjTrFY/ Ey7DA7NWd1kggBVdudXKz9j586BR60w0wXHIWtPNry9w4MTxV4li/vtsRJl3EYFYaqO/ Heea1q1aUkkHUj2iiwv53nz+heROe+xBumK2lOx4n5wlDrCn906sI1CLdpTYq+0KbSk2 g6A6jd315UvMWdixWiTHuGSuCMBLal7A4whQDt4rQvp89HfbF6l/AKlqMKDQX7T6vs3E qKHaMRd4m0kCBpKc73WoPpGFhfgAID5CrkybCkZ6ZPVHqdmgW4Sfy2May4ZPcHWtrm9z 7dHQ== 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=RvfSv2vXhrQXd/FezE4UM1R+ph+dMkTIsCqUvf6TQ98=; b=FGSKE0w6QkmQiJVfcJnjcCbRw0MlLCzhRZJ2I7h5ri3W4FUrGRYP1kvH+VGtvzYUvM hUEY3O+FtPTY75w7TigKIIDiagx3BxL5+snYKOOxpK0G82yOqgV0Q8CEaLueN6UTHjy4 nguGCTQe0zmDpvVQ4nKbNlffjGgkypIqlAdk6v1XSP9zrVBhPSRPICP3nk/XJeXwIOuX e3LTUHwXVrEADaJfQhs6HpQzTwgVN3x8ZdkxT7zGIYCWhnYjynb1JSxFzmuT3H5EucKu HqOzBTon4sO2URdb88xQMJmi9DQocBIjqCOa91+MOMz9FeunCXyR8lL4OCxiY7rr4IZt OzDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jFtiN7ty; 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 h186-20020a636cc3000000b00524b02cbbc9si23703931pgc.835.2023.04.29.12.33.49; Sat, 29 Apr 2023 12:34:04 -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=jFtiN7ty; 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 S230311AbjD2TMA (ORCPT + 99 others); Sat, 29 Apr 2023 15:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjD2TL7 (ORCPT ); Sat, 29 Apr 2023 15:11:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8173510C1 for ; Sat, 29 Apr 2023 12:11:58 -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 1345960ACE for ; Sat, 29 Apr 2023 19:11:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5EEFC433EF; Sat, 29 Apr 2023 19:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682795517; bh=RvfSv2vXhrQXd/FezE4UM1R+ph+dMkTIsCqUvf6TQ98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jFtiN7tyRAJL1OqdrOMeX7uU3dLn0XbUColcbDm2uLnMYAa1bI5mBpQGC1I9fDcti MJqCKepChG+Su0LzxvKj3H2+SIZ0cV2YEXNrDoxG+K3XsLoRoBhjLG0UURF0jxPbiT 1BkvAcqnJ5X7zqdpcRQDWtguJVHB0/vXpGgnbcWKbBOt1bA0mqYjxEDZbf5lp2TFbF UD2Wf80q/eWOshi2jcd6KDMK1CbLALFWxpXmEwgdUS9Hv91zoH1c66ZpaJAdrhw6WA pR0NEGqsJkNQP2c6zRxsDCz6e2tmIcDmKb/fFeoxMzhoj6d8jQSR10J+6VBr2Rvt/6 cDoNlrLdKjpFA== Date: Sat, 29 Apr 2023 20:11:53 +0100 From: Conor Dooley To: Evan Green Cc: Randy Dunlap , linux-kernel@vger.kernel.org, Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: Re: [PATCH v2] RISC-V: fix sifive and thead section mismatches in errata Message-ID: <20230429-dandy-gush-6f5da93055bc@spud> References: <20230429155247.12131-1-rdunlap@infradead.org> <20230429-outboard-hypocrite-983e977103d2@spud> <37e6b325-44e4-8e65-68e3-eab2943018ac@infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFdXsuwzHEGiYpiV" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 --qFdXsuwzHEGiYpiV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 29, 2023 at 12:06:19PM -0700, Evan Green wrote: > On Sat, Apr 29, 2023 at 10:58=E2=80=AFAM Randy Dunlap wrote: > > > > > > > > On 4/29/23 10:48, Evan Green wrote: > > > On Sat, Apr 29, 2023 at 10:24=E2=80=AFAM Conor Dooley wrote: > > >> > > >> On Sat, Apr 29, 2023 at 10:21:39AM -0700, Evan Green wrote: > > >>> On Sat, Apr 29, 2023 at 8:52=E2=80=AFAM Randy Dunlap wrote: > > >>>> > > >>>> When CONFIG_MODULES is set, __init_or_module becomes , but = when > > >>>> CONFIG_MODULES is not set, __init_or_module becomes __init. > > >>>> In the latter case, it causes section mismatch warnings: > > >>>> > > >>>> WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_= fill_cpu_mfr_info (section: .text) -> sifive_errata_patch_func (section: .i= nit.text) > > >>>> WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_= fill_cpu_mfr_info (section: .text) -> thead_errata_patch_func (section: .in= it.text) > > >>>> > > >>>> Fixes: bb3f89487fd9 ("RISC-V: hwprobe: Remove __init on probe_vend= or_features()") > > >>>> Signed-off-by: Randy Dunlap > > >>>> Cc: Heiko Stuebner > > >>>> Cc: Paul Walmsley > > >>>> Cc: Palmer Dabbelt > > >>>> Cc: Albert Ou > > >>>> Cc: linux-riscv@lists.infradead.org > > >>>> Cc: Conor Dooley > > >>>> Cc: Evan Green > > >>>> --- > > >>> > > >>> Thanks, Randy. I'm confused at how I didn't see that when I made the > > >>> original fix. I feel like repro of these section mismatch errors > > >>> depend on some other factor I'm not understanding. In any case: > > >> > > >> Perhaps you had a cut-down config that did not enable either of the > > >> relevant ARCH_ options to get those errata compiled? > > > > > > It was weird, my original "fix" (the one listed in this Fixes tag) was > > > needed because while the hwprobe series was clean on Palmer's branch, > > > it generated a "section mismatch" on linux-next. As noted here, it was > > > only with !CONFIG_MODULES, so I explicitly remember generating that > > > config and checking it on linux-next to generate this "fix", and it > > > came out clean. It's like the robots are getting smarter. > > > -Evan > > > > I observed the problem in 8 out of 20 randconfig builds, > > using linux-next 20230427. >=20 > Oh interesting, so not the stock k210_nommu defconfig. That makes me > feel a little better at least. Ohh man, that's a pretty bad config to try use (if that's your default) for build testing stuff. The k210_mmu defconfig doesn't enable anything other than SOC_CANAAN. I could reproduce Randy's issue on defconfig w/ CONFIG_MODULES disabled. --qFdXsuwzHEGiYpiV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZE1r+QAKCRB4tDGHoIJi 0lMAAP9Yzh1VwUUltw6hlBNuhfRgwEhTKtB7BRE3pAN2cJsS3gEAw/ruaaFT0dyk VjeOLC2Kb/tzs4sxNU8jzEiNHondEA4= =XMXc -----END PGP SIGNATURE----- --qFdXsuwzHEGiYpiV--