Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4015113pxk; Tue, 29 Sep 2020 11:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV7249f7wy0FdpiFGHw3nxVbbhWaPjL94t2NHEGWDflXdDZ1ODcuCIIFEVkMfWJw2VCa4G X-Received: by 2002:a05:6402:6d3:: with SMTP id n19mr4710608edy.381.1601405606583; Tue, 29 Sep 2020 11:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601405606; cv=none; d=google.com; s=arc-20160816; b=WE5IkwnstZQ7PLcq1eaT6e4gi82CPWRFF+HkSN0q/AJqzqD4KAqwI09tGvg2whklt5 Ee8pzqC/4Xsu9vrRvQvA44G4zT3c9crPkPFQ6P4EeORLKgQ701RjQ/Hrw0PbnQD39xHZ UNT9Z641sVRHz8eNIGhhEBPvBQa2k80IQjIXD4SWgaVAre8F3xB/bV0sYR/IdNu2kuSR VY2EWwIPMO254F1yihwZ7gc+5bjZcYNAnr5mX38/eWy3z/mT6rSu5KLSvdgxeFZGq6zL 1PtWn47QBTXRSWV3Vx11wcPe+WcBeIWosjUf870LWzhRAeJDG76mJSMXsvUuGO2zJLv8 JN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=4oPHUpydHQHVg7N/DiTg/2k5w4HoApzrMoMKz556bOk=; b=bEU7pqkN6dBpbfggarFbBoiYZuDywGoDUjEagaXGPgfu/3RJxbXcvJtStQyDlMqciN Dm7PBjoHp5f/CD2+kSA6NMd7pRSLz5Hdy1FtdpA1gUtSfZTsqEF4W6lkIKzEV321cBD+ hC7DKp6udxpKAo3AgZPUkUfTgmJo+d5v/Y26pzkJIjjytb92Rxt8VOKJ2SSlF+3QnM/X PlvUQtrtqAJmXr8Bw9GiNlV0499NdnlZuRtDi4MBkv6MvPUjzs6U5NdpE6X0RQWIoGLF PeYYqv0lf/6V58Hn8EKNg6KoT8/37XcptYBv8+Z8YTt9D+k6cVeVxgQA4ab+NbrikkI+ GgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aurel32.net header.s=202004.hall header.b=LYrI13lQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr21si4078645ejc.186.2020.09.29.11.53.03; Tue, 29 Sep 2020 11:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@aurel32.net header.s=202004.hall header.b=LYrI13lQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbgI2Svm (ORCPT + 99 others); Tue, 29 Sep 2020 14:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728166AbgI2Svm (ORCPT ); Tue, 29 Sep 2020 14:51:42 -0400 Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9870C061755; Tue, 29 Sep 2020 11:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=4oPHUpydHQHVg7N/DiTg/2k5w4HoApzrMoMKz556bOk=; b=LYrI13lQzAkLkQtkFjsnhoaIto +1o1p738YrPZINi8UpfLvfRYPfu9YXt/TWANnemzsu/WSbVsODTgNC/ARyLKp/gLoIW2mMZcjbv3h xuq8plU4wHnSGvLKW7Na6oePETtve74DhVmSH1azo2sOAD20v1lKUPSjlfwiZTCV4h428O7imIpgq Snj2dEUyADwX3v8TK2TE3RW9aKAlgwp0u6u7LrqL0g3WUhu28JHW/wN0OwOFJb3Vw1LrEIoySZeWm pL3Vh556nV4bXwDnWg55LQ2iKoMUCR+NdXDfzufhACNgLNiyB5lv78YOlT6Ir/QgO5WLarIidRO86 Tg+BbfCw==; Received: from [2a01:e35:2fdd:a4e1:fe91:fc89:bc43:b814] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNKio-0004jI-HC; Tue, 29 Sep 2020 20:51:30 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.94) (envelope-from ) id 1kNKil-000oKY-UZ; Tue, 29 Sep 2020 20:51:27 +0200 Date: Tue, 29 Sep 2020 20:51:27 +0200 From: Aurelien Jarno To: Guo Ren Cc: Andreas Schwab , Tycho Andersen , Albert Ou , Nick Hu , Anup Patel , Palmer Dabbelt , Linux Kernel Mailing List , linux-csky@vger.kernel.org, Guo Ren , Zong Li , Paul Walmsley , Greentime Hu , Thomas Gleixner , linux-riscv Subject: Re: [PATCH V2 1/3] riscv: Fixup static_obj() fail Message-ID: <20200929185127.GC2705@aurel32.net> Mail-Followup-To: Guo Ren , Andreas Schwab , Tycho Andersen , Albert Ou , Nick Hu , Anup Patel , Palmer Dabbelt , Linux Kernel Mailing List , linux-csky@vger.kernel.org, Guo Ren , Zong Li , Paul Walmsley , Greentime Hu , Thomas Gleixner , linux-riscv References: <1593266228-61125-1-git-send-email-guoren@kernel.org> <1593266228-61125-2-git-send-email-guoren@kernel.org> <20200911204512.GA2705@aurel32.net> <20200914103836.GB2705@aurel32.net> <87lfgzeidk.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.6 (2020-07-11) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2020-09-25 00:19, Guo Ren wrote: > How about this, revert the commit and don't free INIT_DATA_SECTION. I > think the solution is safe enough, but wast a little memory. > > diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S > index f3586e3..34d00d9 100644 > --- a/arch/riscv/kernel/vmlinux.lds.S > +++ b/arch/riscv/kernel/vmlinux.lds.S > @@ -22,13 +22,11 @@ SECTIONS > /* Beginning of code and text segment */ > . = LOAD_OFFSET; > _start = .; > - _stext = .; > HEAD_TEXT_SECTION > . = ALIGN(PAGE_SIZE); > > __init_begin = .; > INIT_TEXT_SECTION(PAGE_SIZE) > - INIT_DATA_SECTION(16) > . = ALIGN(8); > __soc_early_init_table : { > __soc_early_init_table_start = .; > @@ -55,6 +53,7 @@ SECTIONS > . = ALIGN(SECTION_ALIGN); > .text : { > _text = .; > + _stext = .; > TEXT_TEXT > SCHED_TEXT > CPUIDLE_TEXT > @@ -67,6 +66,8 @@ SECTIONS > _etext = .; > } > > + INIT_DATA_SECTION(16) > + > /* Start of data section */ > _sdata = .; > RO_DATA(SECTION_ALIGN) > This patch doesn't apply, as tabs have been converted to space somewhere. After fixing that, the patch applies and I confirm that it fixes the problem. Tested-by: Aurelien Jarno Thanks, Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net