From patchwork Mon Aug 28 17:40:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Brandt X-Patchwork-Id: 9925929 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 6200B60380 for ; Mon, 28 Aug 2017 17:40:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50DD22876E for ; Mon, 28 Aug 2017 17:40:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4448B28770; Mon, 28 Aug 2017 17:40:58 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW 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 942092876E for ; Mon, 28 Aug 2017 17:40:57 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s7Rtqf2Em6FurXlUDuYBIEOKiVz9zD33APW9lIqtO2M=; b=Y9Zw+mF1PlRGX5 lMbkFC+9Lq5+VpQFICNLA/zkhVOTvmt7F5LesSZoH+0Ui8Z+vvKNchybTkauSiXMZU0MexEa19B3G x2hx6pEv4KZYKEmlFHZDNUrijVSpiVDZtc2ZiPNDIwSXz5mEqi2IuBFq5zK1HSuFe07gJ25uF+0By Q/27l9/K3k9D3WBDez5Oqxo8hyH+InKxJGz95y9rBA8DGtdRkAAmNi1+7snoPq82GTKfu744UONA6 9LgKuzYra4i+B8yFGZrGSyhKBxttIJU9YJFkq0S6AHjiaZ1aJfY1NCG/QzggvuAz4j9S6N9KDB56w S2jz1npLws0MHSDq28CQ==; 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 1dmO1r-0008BI-IR; Mon, 28 Aug 2017 17:40:51 +0000 Received: from relmlor4.renesas.com ([210.160.252.174] helo=relmlie3.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dmO1m-00087F-RC for linux-arm-kernel@lists.infradead.org; Mon, 28 Aug 2017 17:40:49 +0000 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 29 Aug 2017 02:40:24 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 45476450A8; Tue, 29 Aug 2017 02:40:24 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.41,442,1498489200"; d="scan'208";a="254966326" Received: from mail-hk2apc01lp0216.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.216]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 29 Aug 2017 02:40:23 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bwl0BIhzvCVw2TrV+YDqt+YQ6lR5uMHLjbGaw2Z8pls=; b=DT+fbvsTqVHwnck+Lt0x9ClQLhr1TGTPoq7W79FLlAHFO1HWeM2WQpQo4ghxITOGoY0F0Zb/FaMU0LJY/eZ0LAkJHqxfBWrfBQvAyOikDezjs0qt5J8Wxdj8tIZHMpGcbUivQiUFJMvZ9PD6UtzP/xDIv9i7qXu+Ug757Rl3bsE= Received: from SG2PR06MB1165.apcprd06.prod.outlook.com (10.169.58.147) by SG2PR06MB0459.apcprd06.prod.outlook.com (10.161.10.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Mon, 28 Aug 2017 17:40:21 +0000 Received: from SG2PR06MB1165.apcprd06.prod.outlook.com ([fe80::38e1:46c3:c910:6437]) by SG2PR06MB1165.apcprd06.prod.outlook.com ([fe80::38e1:46c3:c910:6437%13]) with mapi id 15.01.1385.014; Mon, 28 Aug 2017 17:40:21 +0000 From: Chris Brandt To: Nicolas Pitre , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH 0/3] make XIP kernel .data compressed in ROM Thread-Topic: [PATCH 0/3] make XIP kernel .data compressed in ROM Thread-Index: AQHTHb7f3p7MxSGIAUGyYVGKwPMydKKaCKaQ Date: Mon, 28 Aug 2017 17:40:21 +0000 Message-ID: References: <20170825162600.15709-1-nicolas.pitre@linaro.org> In-Reply-To: <20170825162600.15709-1-nicolas.pitre@linaro.org> 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-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SG2PR06MB0459; 20:pi5Yi96khApRU1PJ+Ze4jxvaPRyB+4C53lD/L4QVMXYAuQYaqufH/DkS0Rwt6bdA9C7Xj5rbCdM7v/b88paZGoxnNajlBbyOEZrY4ULbRU6B1nAL8IUpfn3IAo3TCgNM/cP3f4Mh8hejxXQX+MrspxjdMzdeFnbDNjo3kL8PufU= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 35e69b74-b562-4469-ed7a-08d4ee3bdb5b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SG2PR06MB0459; x-ms-traffictypediagnostic: SG2PR06MB0459: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SG2PR06MB0459; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SG2PR06MB0459; x-forefront-prvs: 0413C9F1ED x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(24454002)(189002)(199003)(6246003)(7696004)(66066001)(74316002)(101416001)(54356999)(76176999)(50986999)(5660300001)(25786009)(33656002)(9686003)(55016002)(99286003)(53936002)(3660700001)(3280700002)(106356001)(68736007)(105586002)(97736004)(2906002)(8936002)(3846002)(102836003)(6116002)(229853002)(86362001)(478600001)(2950100002)(81156014)(81166006)(8676002)(189998001)(2900100001)(305945005)(6436002)(6506006)(14454004)(7736002)(72206003)(5250100002)(2501003)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0459; H:SG2PR06MB1165.apcprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2017 17:40:21.5392 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0459 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170828_104047_280422_E5A76D02 X-CRM114-Status: GOOD ( 13.26 ) 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: , 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 Friday, August 25, 2017 1, Nicolas Pitre wrote: > This patch series provides the ability to store the kernel .data > segment compressed in ROM. It has to be copied to RAM anyway so > storing it uncompressed is arguably a waste of ROM resources. > > While at it, the copying of .data (when not compressed) and the > clearing of .bss is performed using optimized string routines rather > than doing it one word at a time. And throw in small linker script > cleanups for good measure. > I like the idea, but unfortunately it won't build for my RZ/A1 (CONFIG_ARCH_R7S72100=y) XIP system. It's a Cortex-A9 with MMU (meaning you have to hack the Kconfig because apparently allowing CONFIG_ARCH_MULTIPLATFORM=y and CONFIG_XIP_KERNEL=y in the same build is considered a ridiculous thing to do). LD vmlinux.o MODPOST vmlinux.o KSYM .tmp_kallsyms1.o KSYM .tmp_kallsyms2.o LD vmlinux SORTEX vmlinux SYSMAP System.map XIPZ arch/arm/boot/xipImage data segment doesn't match end of xipImage ../arch/arm/boot/Makefile:46: recipe for target 'arch/arm/boot/xipImage' failed make[2]: *** [arch/arm/boot/xipImage] Error 1 arch/arm/Makefile:334: recipe for target 'xipImage' failed make[1]: *** [xipImage] Error 2 make[1]: Leaving directory '/home/renesas/tools/upstream/renesas-drivers/.out' Makefile:145: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 I admit, I did not do any debug yet to find out why. But if you want to see it, you can simply apply this patch below and then build the shmobile_defconfig (after you go in and enable XIP_KERNEL=y and XIP_DEFLATED_DATA=y of course). --------------------------- Chris diff --git a/arch/arm/Kconfigb/arch/arm/Kconfig index 80191e93f09b..eeb4aa37e8e9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -338,7 +338,7 @@ config ARCH_MULTIPLATFORM bool "Allow multiple platforms to be selected" depends on MMU select ARM_HAS_SG_CHAIN - select ARM_PATCH_PHYS_VIRT + select ARM_PATCH_PHYS_VIRT if !XIP_KERNEL select AUTO_ZRELADDR select TIMER_OF select COMMON_CLK @@ -1977,7 +1977,7 @@ endchoice config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" - depends on !ARM_LPAE && !ARCH_MULTIPLATFORM + depends on !ARM_LPAE help Execute-In-Place allows the kernel to run from non-volatile storage directly addressable by the CPU, such as NOR flash. This saves RAM