From patchwork Fri Jul 28 15:27:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9869059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CFFD6035E for ; Fri, 28 Jul 2017 15:28:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F9B4288D2 for ; Fri, 28 Jul 2017 15:28:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 147D3288DB; Fri, 28 Jul 2017 15:28:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CAA8E288D2 for ; Fri, 28 Jul 2017 15:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lfX5DL25s1rN82Jg1tJLNDUbFaPMZeyK1/oLjy6nppI=; b=tNGbbiC6Aruj5T kGp4fjkrjPiLXuKmEoln/ZYpMf/xV+3IE4xYeYQdDZrbFYgsGXDEUpHtT53fyNCO709KrawftKL/+ H9x2FxsBq7jcOXq63ZKGLtKumXwkO+ljPZCygxSqOMtCGqmuGeqZhWfTAeeWNe4PMQQY5IiGG9cvs QwE4GxCp54Ge2vVGn3CU9fZTQlbAqagik7Uj0aBi6laj7/G77yNnfbAkEQ5mGLKhAEdbTSGRByBe5 EbpjxtSDO6mXCESpTHvyiFiLo86/bgVRcz0h3TW9aAgky+k7Tqq7oL7Q6VnDROcvuqiIH1cI8IHgM /PeFGGs87QWvFdd6a0xA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1db7BN-0007Dn-Tl; Fri, 28 Jul 2017 15:28:05 +0000 Received: from mail-it0-x231.google.com ([2607:f8b0:4001:c0b::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1db7BJ-0007CF-Lp for linux-arm-kernel@lists.infradead.org; Fri, 28 Jul 2017 15:28:03 +0000 Received: by mail-it0-x231.google.com with SMTP id v205so82375813itf.1 for ; Fri, 28 Jul 2017 08:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=/yEyCtlE8/QxswMz8HRaRc1QgwWM+OAqEmgAT2GYUQI=; b=fRIuKCJvbKumgh1ntTdg9eJxdEwhc+houJJVl0fDhstACwY1ypTfcEhwPOP8K4g19s 7hjM1l4eVYQZJZIzGeM7MyC7J/ciAJAsq3rKEO73wBx7cw/fFX8VnovCHZ+ITzQjiL1f RI5n7Ii141i6tZXzSjRCddLJnzjZ9JuYFLPJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=/yEyCtlE8/QxswMz8HRaRc1QgwWM+OAqEmgAT2GYUQI=; b=QyWHBs2TNQ1AKrbOro9zmGO6l+gKgtiOMRiibrCj1xfoV4Aau2VG1wqQ3Dp9PA/pHv kE4HgPTHmy23+uxgden/rcalQV7HineIsNfYNVQtzuhmj7Dvy0ktXSAx22TM91A349rv LvI6oU7LweR7lOhgF6EUdprM5LN1YfYEaMQ+daXuzWMtni+lF6dkfoTenJS3pPNV6GX3 wT29/ChJURR2XhdK/gB1NCFjYxIitO8FQpFa9ZHO8d7iE8Yj96SNS9/QL1C7JI7R48Hk SfqcCjj6I4fa4/2FY+Uo1ad6gGbHpNO+vS9kb/lpNOI1lAoAw5SqI/YBeEc6QBuG3akH i4ng== X-Gm-Message-State: AIVw112HKNV9gLlph+KJN7IsoXf+b70qZUZi9bupOaD1PedRO4tVr4h9 hji5J+on1F5cJboZ X-Received: by 10.36.53.13 with SMTP id k13mr9072224ita.93.1501255660181; Fri, 28 Jul 2017 08:27:40 -0700 (PDT) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id u79sm8497310ita.24.2017.07.28.08.27.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 08:27:39 -0700 (PDT) Date: Fri, 28 Jul 2017 11:27:38 -0400 (EDT) From: Nicolas Pitre To: Arnd Bergmann Subject: Re: [PATCH] [RFC] ARM: move __bug_table into .data for XIP_KERNEL In-Reply-To: <20170728141108.1283320-1-arnd@arndb.de> Message-ID: References: <20170728141108.1283320-1-arnd@arndb.de> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170728_082801_757940_242205F8 X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , Peter Zijlstra , Russell King , Stefan Agner , linux-kernel@vger.kernel.org, Chris Brandt , Matt Hart , Russell King , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 28 Jul 2017, Arnd Bergmann wrote: > Matt Hart reports that vf610m4_defconfig kernels grew to 2GB > xipImage size after the __bug_table change. > > I tried out a few things and found that moving the bug table > into the .data section avoids this problem. However, the > linker script magic is beyond my capabilities here, so this > is almost certainly not correct. Well, before your patch the BUG_TABLE location as well as its runtime functionality were completely wrong and broken. > I've added a few people to Cc that understand this better > than I do, hopefully someone can turn my bogus patch into > a proper one. Your patch isn't as bad as you make it, but maybe the following will avoid open recoding BUG_TABLE locally: Nicolas diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 8265b11621..21b4b29c2f 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -237,13 +237,13 @@ SECTIONS */ DATA_DATA CONSTRUCTORS - - _edata = .; } - _edata_loc = __data_loc + SIZEOF(.data); BUG_TABLE + _edata = .; + _edata_loc = __data_loc + SIZEOF(.data); + #ifdef CONFIG_HAVE_TCM /* * We align everything to a page boundary so we can