Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3716211rwr; Sat, 29 Apr 2023 12:47:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZbTtTJw0Z7U7qcZJRBlV3H40qKLX6+/FliNrWnxTUUArmupUx40Y18PyjIUENzOoIs6Mt X-Received: by 2002:a17:90a:34c:b0:247:2baf:d6f with SMTP id 12-20020a17090a034c00b002472baf0d6fmr8325643pjf.0.1682797669895; Sat, 29 Apr 2023 12:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682797669; cv=none; d=google.com; s=arc-20160816; b=obum/Rv3zEzcZz+aFrxq7RBq6RZ77xW6edL4Z2XzKjhvq4WmRYNwYDqDEgsstO2E38 xlDIA2dR69CVwFBKFi9BS6xw/fdaForlVrnPaffgZBIoT32XVxhzGYrnShRUW3CE+Hvc Uru2xfrdzlXXt0baOjckM1KqomdmVFphcXkgQ+MKvQKo2/7Mi3di/zEQgBLzlqQhDg5N 9pIQR3T+j5C7Fb0fNR9fjbQ1lJHmoz+WPIUuVNgLshi/7wzxxGdoHnCRcEugks0DsNmc qtYi+BOmZeBmTi3SKNecc8TmRU3GJ8Y6PLZg56OkA385xhykLa2MtJEN4fU+DTGoLyZ8 XI0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FZQprsIFxkb6uN+gB/WxK+KPOh1VYzqWl9rnM0y+44U=; b=KX/U3sPirFoq9FBjXtokZDwZze4dv68nNla8jd1HJFsbyjRjCd1zIDFr2u+oX0zxWb 8fL7XVN5Q9XswJz+PaJX6pt1OSbT+vIF5oX8rUl0063PoavQpOEy45l3BWYh4i5XR0aF COvN8wDteLf5v/N++vU++uJnKlGs0EpifNQN2pQatO1MHqgOcgm5rBmROkRXVR0FpEYY cB5ruUtaXPa73U06wMsfKyFH4H1X3JceqCZqwkvTWuic9D7Ow17b8K+0/cCJQx8kvcIG zVwbSH5qJB/T+Dw7dIY/Wijoo1XH7Uhytd3sRITyOvhOo46/FEZWF53flzO20Ak8k9Uu ZToQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=pqAoyNDv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a17090ae00d00b0024ddf090102si1679566pjy.56.2023.04.29.12.47.39; Sat, 29 Apr 2023 12:47:49 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=pqAoyNDv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbjD2THA (ORCPT + 99 others); Sat, 29 Apr 2023 15:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjD2TG7 (ORCPT ); Sat, 29 Apr 2023 15:06:59 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D29B6E5B for ; Sat, 29 Apr 2023 12:06:56 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2a8a59daec5so9146531fa.3 for ; Sat, 29 Apr 2023 12:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1682795215; x=1685387215; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FZQprsIFxkb6uN+gB/WxK+KPOh1VYzqWl9rnM0y+44U=; b=pqAoyNDvckoNrFVRFtTSPp+aKQgzq2t1zKzWv8Gf+uwfWoU1EacoHb/KSumyadsmTN ligsXTgRi7NgYGtXbNjWLhdLhquagRrcLsIgUQnDzkW21cWhRXl+A8A3cREW+DdR5wf3 i+VgJ7sAe68KrIJF8voahlUHYa+aZ7FkDRIipStSGZkMsRksQ9xOo1HFhxJrrN5WjVPE 6AsrJtEEteOfTbqyP6CxKcT7Yth5kfU1n9tTzj3uMBAzDBg/0eSecVMy3u9zOYd4huZw XVtHo4uQr++T6PPrl2Fzeuj0XMZ31Hld5PAnyepyMOi9zDzKIuWhVHf7RWrR2XsaSps+ IZKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682795215; x=1685387215; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FZQprsIFxkb6uN+gB/WxK+KPOh1VYzqWl9rnM0y+44U=; b=c/o5Eoe263MubwLClkHxv+tyxKBVLUBQGQ/Dh+1mpE5fTABZOK7tIT7e6h8vEi38Ib FerLNigV9RA1JC+StFXmC1503a1ag25NF5b7ndzKv+SC7sec5FRGeQ+790zoeXelOeEz FhmNpcaC4XXzrfO7DTL7XD7pv0xys5syJRukTsrgejTqf+TplXreBFGsE1mo/QLiuwqv 9Y8QhNPswN9lv6SRDpyzdxN7pjbS4Uo9t7/3yPW0tWW4N/oDpJkby3x3qx+oLCp9QkyJ 2mIMON5fzLUVKmLqTkN6fsgL67PFLNKRmU15elwZz/tVsz862t+Bwyul7CH/yR2DMYrD J+hw== X-Gm-Message-State: AC+VfDzwuw52LLanf8ZCUteSwOaE+BR1KAgNuEgmAub+qOvpCbf9HDrZ A26bXplf3iYR/ONGZPmzb5HOP9Xr77frHhACiXtO53UaLxTkxrYa X-Received: by 2002:a2e:9d47:0:b0:2a7:6e12:f75a with SMTP id y7-20020a2e9d47000000b002a76e12f75amr2226666ljj.53.1682795215108; Sat, 29 Apr 2023 12:06:55 -0700 (PDT) MIME-Version: 1.0 References: <20230429155247.12131-1-rdunlap@infradead.org> <20230429-outboard-hypocrite-983e977103d2@spud> <37e6b325-44e4-8e65-68e3-eab2943018ac@infradead.org> In-Reply-To: <37e6b325-44e4-8e65-68e3-eab2943018ac@infradead.org> From: Evan Green Date: Sat, 29 Apr 2023 12:06:19 -0700 Message-ID: Subject: Re: [PATCH v2] RISC-V: fix sifive and thead section mismatches in errata To: Randy Dunlap Cc: Conor Dooley , linux-kernel@vger.kernel.org, Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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, 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 wh= en > >>>> 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_fi= ll_cpu_mfr_info (section: .text) -> sifive_errata_patch_func (section: .ini= t.text) > >>>> WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_fi= ll_cpu_mfr_info (section: .text) -> thead_errata_patch_func (section: .init= .text) > >>>> > >>>> Fixes: bb3f89487fd9 ("RISC-V: hwprobe: Remove __init on probe_vendor= _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. Oh interesting, so not the stock k210_nommu defconfig. That makes me feel a little better at least. -Evan