From patchwork Fri Mar 9 03:21:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10269595 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 45D46602BD for ; Fri, 9 Mar 2018 03:24:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 372E729C8B for ; Fri, 9 Mar 2018 03:24:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ADA429CA4; Fri, 9 Mar 2018 03:24:10 +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 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 90D4D29C8B for ; Fri, 9 Mar 2018 03:24: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dGJUT6Y4w+T0mpOL2tjIISyaESIzdi5JKmktHSv82b4=; b=J7RrUUFk7qVZiN0V3yVgbv3Nxx O3lDRtpn3yPtD49mxrXMeVuat9blpCPDX0g//mIk/HqPn11/O3WKz61bUw6LXvB4od4hSFeDoiARz 9yopZu6qDWU+XBLNL3q1t9snbEZ7tnZjGL2ne3VnuWl6QW+3DNP8X/BByGTqiZ1HPjcuUaXPAYkQ4 8ZajbIWeebv4q4nzAhlrloeAe8uCT+KqjgZJk6h08pRcVuHXAy1rwC6kbjI86b7ZfLWezE+4W7XYW dwgJ+bNVg4gvve5iT5VvCfUshwCf1O0EyiPbbwakegFSTqHxIkPtgutJsXvBDvCB0Fm17vdWeMJdR jPSacZkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eu8dS-0001Sd-E3; Fri, 09 Mar 2018 03:23:58 +0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eu8bH-0000Aw-3F for linux-arm-kernel@lists.infradead.org; Fri, 09 Mar 2018 03:21:48 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 96073D55E7; Thu, 8 Mar 2018 22:21:30 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=0Sz/ AUcHV4nB3CqXNIoSmxj2S4g=; b=A9AKk4rj6FN8fLpT7xJyxPkRZAmEkrypiREA csGQUOGQLPwtUzUKOlIAwZZFplnPletaACc20mLHTzb3C1M+TzdOYli1FPvGrAcN IBf3oK/eYjeLyFkoBmjSJVp11+LPRvB42UmOZrXWEDsAwDaHyKlH2eXiUW+BmbZT PojOAUo= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 8E353D55E6; Thu, 8 Mar 2018 22:21:30 -0500 (EST) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 1AA4ED55E3; Thu, 8 Mar 2018 22:21:30 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id CEB632DA0652; Thu, 8 Mar 2018 22:21:28 -0500 (EST) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/7] ARM: simplify and fix linker script for TCM Date: Thu, 8 Mar 2018 22:21:00 -0500 Message-Id: <20180309032100.31039-8-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309032100.31039-1-nicolas.pitre@linaro.org> References: <20180309032100.31039-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: F5AEC5B8-2348-11E8-8D7D-44CE1968708C-78420484!pb-smtp1.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180308_192143_391088_DF5664CF X-CRM114-Status: GOOD ( 15.34 ) 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: Chris Brandt , Russell King - ARM Linux MIME-Version: 1.0 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 Let's put the TCM stuff in the __init section directly. No need for a separately freed memory area. Remove redundant linker sections, as well as comments that were more confusing than no comments at all. Finally make it XIP compatible by using LOAD_OFFSET in the section LMA specification. Signed-off-by: Nicolas Pitre --- arch/arm/kernel/vmlinux-xip.lds.S | 8 +++--- arch/arm/kernel/vmlinux.lds.S | 8 +++--- arch/arm/kernel/vmlinux.lds.h | 52 +++++---------------------------------- arch/arm/mm/init.c | 11 --------- 4 files changed, 14 insertions(+), 65 deletions(-) diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index c727c56f3c..d32f5d35f6 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -132,6 +132,10 @@ SECTIONS PERCPU_SECTION(L1_CACHE_BYTES) #endif +#ifdef CONFIG_HAVE_TCM + ARM_TCM +#endif + /* * End of copied data. We need a dummy section to get its LMA. * Also located before final ALIGN() as trailing padding is not stored @@ -143,10 +147,6 @@ SECTIONS . = ALIGN(PAGE_SIZE); __init_end = .; -#ifdef CONFIG_HAVE_TCM - ARM_TCM -#endif - BSS_SECTION(0, 0, 8) _end = .; diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 1e9f2a6b3d..b77dc675ae 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -127,6 +127,10 @@ SECTIONS PERCPU_SECTION(L1_CACHE_BYTES) #endif +#ifdef CONFIG_HAVE_TCM + ARM_TCM +#endif + #ifdef CONFIG_STRICT_KERNEL_RWX . = ALIGN(1<