Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3644686rwr; Sat, 29 Apr 2023 11:04:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iOCkIBRPVgDm7rJmodCOOjTcdLGfqOinIjP1/kdK93m1HGv32SuH8Hhxf/zkwtbOoJjE5 X-Received: by 2002:a17:903:244b:b0:1a6:5f92:3ba with SMTP id l11-20020a170903244b00b001a65f9203bamr11007020pls.0.1682791476009; Sat, 29 Apr 2023 11:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682791475; cv=none; d=google.com; s=arc-20160816; b=gOwWTWRXwUrWUGQpKjCpBZTfhmyzuBS/1kp5xfuUoiJDtsCByrU0XLCjvgwdoIc3Zs QhXfIDtHusVdWBd7nOLQr/6wauba5z+Oxzh4bIkfj2MdQdsa7M47R1A5fAz5Ueb6D+gZ SazQk3Qg8xut7Yw9PmnNfPWvjJxGeyKuS+K9jw/uDWw0bKEQ1gRvSUK8a6+PM7aJlNK8 RokeXuyyO9nO6TEen2tvuOGdYFfvCZJyZjbLpfUluh9e6kGn5LrweQBUpJkuIRW/VgOQ qabeS7Br3ZuVpBk6TU4Cs1nAU5Yv6kgmubUpqSk6GAkwAqJREfGg47Xx0ZzCLt2IdY8f WhKg== 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=PojX7n9y1aOGyHyL1VmBDz4x0J1ICc3U37mnhGQzRqw=; b=s1wG2+liyIhD+cxWBVfSTFQ4N6YP89K4pOB23KoHVv5bwSfpiBtIC2PJYL5ePLElzh vz8p34ackpgbhm7Yv6lA9nJ91OCoamO//bKx+Vv9Z6u4UcbKkanxShQ2g5sXExjDF6Tg PhtV0pFHIDcGZ5mawO36L37W53y/HtGZXmMVAKYaOo08AW9RGQQFVlhd5kuSZRlEEHhC kgfYa6rwsecHSzDy8GfcVcIKmZMV32m7XNfwynlC6zLWBoE+MP9bS6xzInVvWN8quArs KjpLXA7tL7FiMrpjeRWoHKy0TCvcQ/DBkimdRxxaN8K4tb2UeBO8wtXxB9a51ogefwMP oiAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=AwozKjrJ; 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 np16-20020a17090b4c5000b002471e305866si29584950pjb.35.2023.04.29.11.04.15; Sat, 29 Apr 2023 11:04:35 -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=AwozKjrJ; 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 S229532AbjD2RtR (ORCPT + 99 others); Sat, 29 Apr 2023 13:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjD2RtQ (ORCPT ); Sat, 29 Apr 2023 13:49:16 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E59A3183 for ; Sat, 29 Apr 2023 10:49:14 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2a8ba23a2abso8935501fa.2 for ; Sat, 29 Apr 2023 10:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1682790553; x=1685382553; 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=PojX7n9y1aOGyHyL1VmBDz4x0J1ICc3U37mnhGQzRqw=; b=AwozKjrJpvKPO20JkTdZKpX7tX9aSjJb+RjAdf9DpdhiejGiMjOtxO4g2VVLucmke/ imbfKbMa3zOgsL8SMg5k8bhbuiNJlCzh8i/Y/1V3Gosasoz81oK5F3LGlMfZouoMcVx3 kEeHH9dYfsW+kes2zyZImeZ/HU6ECCeRricaa3qoJExbX31DuuXOwZTCQQVnkIvRbWrw RMIOy/kaztJxJ50Ky3zYcXCN0BCZxhsyULr8DVBTpoJh1Jt3xYEDEfbHgaz9U2+lIzPx MSJv+jG1Ej2uQUhNsyXtE99ZgKiDwU/nvWvwhWXtFqBhHz6W22B9ayL+5fD8Ptk6xqHA 6F3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682790553; x=1685382553; 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=PojX7n9y1aOGyHyL1VmBDz4x0J1ICc3U37mnhGQzRqw=; b=lUBh8tReK3ylyNgJyqClY//DNJXK8AFZTrSPzC3kYkq9Lah06pGgwgZMcDVCVF2/8n iuZjRAAzKzUer+nUZ72R8ANH64N8gPkONxCM/EaQyuTi5RZyseyAGl0prsj9xP47Na7f CfGpc8mKzTu+WlShaxKpfJOVGpF6DEG919i0YPyp/zQlqy1yiKYMCtW/n7og30nYZpzd EKxhfBXzynXteSHp0Z3j0XzxL+ityWOFikU9bCX1bBuvwAnk93411enxpEaSBqJR0yBd d6zkJ4VjsmsCeMU7D1no3DzEnjdz4BEiLakleevJviU5uz4kqdzToWOozXNT4KZf0K8c WCFA== X-Gm-Message-State: AC+VfDxWeLC6k4NGeqkmAgki19RfkJHmmZm5t5MEbi9J7/iBZWABeuuZ 7bBLtHQ8EnxbZqyGUUqahJgjCEeDmRBc48gjdQTeGA== X-Received: by 2002:a2e:9d13:0:b0:2a8:c45f:9fd8 with SMTP id t19-20020a2e9d13000000b002a8c45f9fd8mr2078374lji.44.1682790553046; Sat, 29 Apr 2023 10:49:13 -0700 (PDT) MIME-Version: 1.0 References: <20230429155247.12131-1-rdunlap@infradead.org> <20230429-outboard-hypocrite-983e977103d2@spud> In-Reply-To: <20230429-outboard-hypocrite-983e977103d2@spud> From: Evan Green Date: Sat, 29 Apr 2023 10:48:37 -0700 Message-ID: Subject: Re: [PATCH v2] RISC-V: fix sifive and thead section mismatches in errata To: Conor Dooley Cc: Randy Dunlap , 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:24=E2=80=AFAM Conor Dooley wr= ote: > > 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 whe= n > > > 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_fil= l_cpu_mfr_info (section: .text) -> sifive_errata_patch_func (section: .init= .text) > > > WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_fil= l_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