From patchwork Tue Nov 17 16:45:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Brandt X-Patchwork-Id: 7639461 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C613BF90C for ; Tue, 17 Nov 2015 16:46:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 354822041A for ; Tue, 17 Nov 2015 16:46:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F61720425 for ; Tue, 17 Nov 2015 16:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932132AbbKQQqF (ORCPT ); Tue, 17 Nov 2015 11:46:05 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:45063 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932070AbbKQQqC convert rfc822-to-8bit (ORCPT ); Tue, 17 Nov 2015 11:46:02 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 18 Nov 2015 01:46:00 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 8B6824358E; Wed, 18 Nov 2015 01:46:00 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 7345F480A4; Wed, 18 Nov 2015 01:46:00 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 6C58C480A3; Wed, 18 Nov 2015 01:46:00 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id BAD08487; Wed, 18 Nov 2015 01:46:00 +0900 X-IronPort-AV: E=Sophos;i="5.20,308,1444662000"; d="scan'208";a="198759544" Received: from mail-hk2apc01lp0207.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.207]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Nov 2015 01:45:59 +0900 Received: from HK2PR06MB0561.apcprd06.prod.outlook.com (10.161.183.154) by HK2PR06MB0563.apcprd06.prod.outlook.com (10.161.183.156) with Microsoft SMTP Server (TLS) id 15.1.325.17; Tue, 17 Nov 2015 16:45:58 +0000 Received: from HK2PR06MB0561.apcprd06.prod.outlook.com ([10.161.183.154]) by HK2PR06MB0561.apcprd06.prod.outlook.com ([10.161.183.154]) with mapi id 15.01.0325.003; Tue, 17 Nov 2015 16:45:59 +0000 From: Chris Brandt To: Nicolas Pitre CC: "linux@arm.linux.org.uk" , "linux-arm-kernel@lists.infradead.org" , "linux-sh@vger.kernel.org" Subject: RE: [PATCH v3] ARM: xip: Use correct symbol for end of ROM marker Thread-Topic: [PATCH v3] ARM: xip: Use correct symbol for end of ROM marker Thread-Index: AQHRIK01s8/pF44pj067et4P7aZ/JJ6fHTRQgAASJACAATx1sA== Date: Tue, 17 Nov 2015 16:45:58 +0000 Message-ID: References: <1447362108-4333-1-git-send-email-chris.brandt@renesas.com> <1447697140-4099-1-git-send-email-chris.brandt@renesas.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chris.Brandt@renesas.com; x-originating-ip: [4.59.13.106] x-microsoft-exchange-diagnostics: 1; HK2PR06MB0563; 5:Y11q255N492QRGz10geI5jrKWGv2db1XzOAHtzbmTB4XR40qri5y8KjHZYUt0IiLlPgIUpnDhfQXZUyr3OgDErRDEXmpK0MTxL5BtlDkkXV+dEUKIZ9g1tuBCPUACQoSdJJnQahPQc9jrzHgGJrvRw==; 24:iZ0yVEU5m8nJzKep+AxCdOBDQxuAqlERNs5K2+IjQjazv0NOBRG0oLcmikAbYd4OIn/At58x77AxUm06pFZRBfgiwbbC/M95Aow5HVwitUc=; 20:h4aoz3UnYx3f8JGB8EUNgict3pEYA6yMela83Kem+MQygEl8qTUYNyiSCy92MFzisGwQkn1cosjJISzsyEP2WEhSajMA0RB4A/W5EggrpVJ5rNLsjpe7DVx26sfsyDcPFYd+SmjhUTA56J9eEw1NJNtZzwkerQ3zYFPvqqa1APk= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB0563; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:HK2PR06MB0563; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0563; x-forefront-prvs: 07630F72AD x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(76104003)(199003)(92566002)(2900100001)(2950100001)(10400500002)(77096005)(102836002)(5003600100002)(189998001)(81156007)(66066001)(110136002)(76576001)(97736004)(5007970100001)(40100003)(5008740100001)(19580395003)(122556002)(93886004)(86362001)(5001960100002)(74316001)(87936001)(33656002)(5004730100002)(54356999)(76176999)(106116001)(586003)(50986999)(106356001)(5002640100001)(105586002)(101416001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0563; H:HK2PR06MB0561.apcprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2015 16:45:58.1152 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0563 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > The old method with conditional placement in the linker script is > broken beyond repair. There is simply way too much stuff these days > to do this sanely. I think the only way to fix it properly is to > have a separate linker script for XIP usage with proper (and obvious) > section placement. Step 1: Change the Makefiles to select an alternative linker script. What do you think about doing the following? Chris --- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index fd46821..956ad21 100644 --- a/Makefile +++ b/Makefile @@ -898,7 +898,11 @@ libs-y := $(libs-y1) $(libs-y2) # Externally visible symbols (used by link-vmlinux.sh) export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) +ifdef CONFIG_XIP_KERNEL +export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux-xip.lds +else export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds +endif export LDFLAGS_vmlinux # used by scripts/pacmage/Makefile export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt) diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index af9e59b..d97fc2e 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -3,6 +3,7 @@ # CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) +CPPFLAGS_vmlinux-xip.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) ifdef CONFIG_FUNCTION_TRACER @@ -92,4 +93,8 @@ obj-y += psci-call.o obj-$(CONFIG_SMP) += psci_smp.o endif +ifdef CONFIG_XIP_KERNEL +extra-y := $(head-y) vmlinux-xip.lds +else extra-y := $(head-y) vmlinux.lds +endif