Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp470833rwd; Wed, 31 May 2023 00:31:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AO/V0msb+PTcz5IhTbplPBIOVn/a6wlGrea+vvYPRZk6UEPlunmxRic59AlFi2gS23CMU X-Received: by 2002:a05:6358:428f:b0:118:daa:ce7 with SMTP id s15-20020a056358428f00b001180daa0ce7mr1598464rwc.0.1685518273443; Wed, 31 May 2023 00:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685518273; cv=none; d=google.com; s=arc-20160816; b=JxfT9io7ZT8dJETi0dYBU0Yf2b6Dv8SqVYj4KJOyIfeODrkQpquOrDemT9uqtpHdlw NpZyQnQzqm/ja2b4xsKmK27x33GfNpQqQoeBggUaAbwRpHT8DzPbmKxQG4r4Xto+HGwp esH6UdGpOJrkqs0rCcNifUQV+Oq3lnm7104MGbTLtTaM+wpWmY7YJ1OzePKvlbhklmXq w3qzW5/5HcDiFqWyQ8cqvoo3ZAFSsQFq+7jM2LxCFTgqeIFS9GiwrpAgQeS6DjPSbiOb U0RrCIiNmC7gXG9lM4rdFTyQIwDt3qnF6TzOoBhPv5oCkzo/RnbXtuGrt9gbTwB9V7rO 1nbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=kXInNNdArfES3eu24qr0+5uet2aM59XfjYrImYP5/A4=; b=eHzNdAVJ/ORT0vgUkdVOVQYKxCjtoiQu/DIU0YCCp1rxw7429fa3okZqFznym6yi0e tNOglT7St5BQg+JLudDijz/11KvPDz4lxdBpvWkbN+566TB9/8HJG9orfSnghXmdm/lY PGyIXwQss1sXyibQ7lPH9RIZ7w+lMFj2x4OauJkRqCaMRDmULDXMqsOAw6pIWFfNqWcR ZhnhY+jU/mvHSR5oa9i1AgcYSubGmvY9TugKTmgXgdjAmZCAbQz/Yc7bOE+x7McQQBw8 Xx+9Y5KdcyqjErY/bwkiaQMrmgHm3JofWYpUE1bZB9HgiPDctPEr4pHbYeYAC5+qF13J T2pw== ARC-Authentication-Results: i=1; mx.google.com; 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 q196-20020a632acd000000b0053fc3bc33desi494577pgq.661.2023.05.31.00.30.59; Wed, 31 May 2023 00:31:13 -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; 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 S234497AbjEaH0p (ORCPT + 99 others); Wed, 31 May 2023 03:26:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233407AbjEaH0n (ORCPT ); Wed, 31 May 2023 03:26:43 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47DE2134 for ; Wed, 31 May 2023 00:26:32 -0700 (PDT) X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id BE849FF80B; Wed, 31 May 2023 07:26:27 +0000 (UTC) Message-ID: <0068add0-8949-11b7-a864-2ef8bed00809@ghiti.fr> Date: Wed, 31 May 2023 09:26:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH -fixes] riscv: Fix relocatable kernels with early alternatives using -fno-pie Content-Language: en-US To: Conor Dooley , Alexandre Ghiti Cc: Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andreas Schwab , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230528-darkness-grandly-6cb9e014391d@spud> <20230528-uneatable-earpiece-3f8673548863@spud> <20230529-skillet-quarters-3fbc3b6edb3a@spud> <41e57bb9-ce0c-7772-abeb-5c01d5ec19bb@ghiti.fr> <20230530-polka-trifle-7ccd7a093099@wendy> <92d4aaa8-a1ed-74e1-3a22-df9be1ca1e4a@ghiti.fr> <20230530-hatchery-unifier-64d7a2ffe0d0@spud> <20230530-atrocious-control-bcb37de558fc@spud> From: Alexandre Ghiti In-Reply-To: <20230530-atrocious-control-bcb37de558fc@spud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 30/05/2023 22:22, Conor Dooley wrote: > On Tue, May 30, 2023 at 08:04:17PM +0200, Alexandre Ghiti wrote: >> Ahah, I think we found the culprit! >> >> With CONFIG_RELOCATABLE, vmlinux is actually stripped from all the >> relocations (so that it can be shipped) and vmlinux.relocs is what you >> should use instead, since it is just a copy of vmlinux before the >> removal of the relocations! > That probably makes us both eejits for not realising sooner... Ahah, TIL a new word, thanks :) > > Tested-by: Conor Dooley # booted on nezha & unmatched > > Thanks for your patience here Alex. So I checked again if the -fno-pie should be applied to mm/dma-noncoherent.c as I suggested, but actually no: errata/thead/errata.c never reaches riscv_noncoherent_supported() in early boot (you can see how 'fragile' it is though and why something needs to be done...). Oh and I realized that I forgot the Reported-by from Andreas and the Fixes tags, so here they are: Fixes: 39b33072941f ("riscv: Introduce CONFIG_RELOCATABLE") Reported-by: Andreas Schwab Thank you too for your patience and your quick answers! Alex > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv