Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1711480pxb; Fri, 20 Nov 2020 17:29:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIJVkYmc8EkljAh/95PrbJ7VH41/Ydhw7NTkPQpsLlc0i8US3ASEXcHgaM2/DroX5Sf2vR X-Received: by 2002:aa7:d591:: with SMTP id r17mr126521edq.4.1605922140619; Fri, 20 Nov 2020 17:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605922140; cv=none; d=google.com; s=arc-20160816; b=nQLHX8UiEmfzEo9M+0yowSHVZSCmOtKCk+U/cFpBFUWHtUOOwMz+pyI0UmY5pkKgZ6 dTBQK8jbfF8K6iyY1LlU8n0HDbl5oYYSeUH/7QyfVlOIw3GFPiGAPuIySCrWv38vN79I rgshBofWgolID04cENFtF1UH60VNQYswGM87S6GDd1eCmNjR73S4bImX/XY/g9lErkk5 STZ0OCmNb1X4AchDQx0dISKbqlayaKcUc84r56rHxmihF06k8n2Ty+yYOjL82LXJVjut r369Ej7XN/ZxQpNrAQLb23Hwo8v7YUeYeO3+yvqRYRj5gN1MQivc/T/3xRi+29jI7nu8 +dIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=6KZYL84q2xxt5TmYFMpWbKjN4h44xay65dQZ26BA80A=; b=i7ptjNUWjiLRrLbfq4kO+pAGChBhxr5yqDrqVDMalEUJ+/eTLEULuPjnbLiyK6kLFs X5qumGKeX4n35BWY9V78VJqy1PlHboI5p9pK3+ozvd84BIxAMuswvZCZF0rIOAawa5dK JR9IoSWhfnhZ7dVEiLh0xEKSgKNwhi8lAsmNwaeObnMYrW2l6CAWF8jkApYPqvYioO/m htkI0Jwjn1l7fifEQ9s85jmm96aBkQ6m039izD6UULuB2XzqCU+qz+yw5DqceMzrEsQH isOGQfpBr0ex0cF0HmX6IpsL8Pr2AlHSImpLSb6AIWvgM8G0BB7ABCrNIZ2bAj4FT3v2 BTTg== ARC-Authentication-Results: i=1; mx.google.com; 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 z7si2705880edm.477.2020.11.20.17.28.37; Fri, 20 Nov 2020 17:29:00 -0800 (PST) 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; 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 S1728720AbgKUBZL (ORCPT + 99 others); Fri, 20 Nov 2020 20:25:11 -0500 Received: from mail.loongson.cn ([114.242.206.163]:58908 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727367AbgKUBZL (ORCPT ); Fri, 20 Nov 2020 20:25:11 -0500 Received: from [10.130.0.193] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxr9NwbLhfHCAUAA--.41434S3; Sat, 21 Nov 2020 09:25:05 +0800 (CST) Subject: Re: [PATCH] microblaze: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S To: Michal Simek References: <1605750037-433-1-git-send-email-tangyouling@loongson.cn> Cc: Stefan Asserhall , Arnd Bergmann , linux-kernel@vger.kernel.org From: Youling Tang Message-ID: <10172eb4-2fa3-faba-1700-6f9daff74d86@loongson.cn> Date: Sat, 21 Nov 2020 09:25:04 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=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8JbIYCTnIWIevJa73UjIFyTuYvj xUcBMKDUUUU X-CM-SenderInfo: 5wdqw5prxox03j6o00pqjv00gofq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Michal On 11/20/2020 09:31 PM, Michal Simek wrote: > Hi, > > On 19. 11. 20 2:40, Youling Tang wrote: >> Use the common INIT_DATA_SECTION rule for the linker script in an effort >> to regularize the linker script. >> >> Signed-off-by: Youling Tang >> --- >> arch/microblaze/kernel/vmlinux.lds.S | 24 +----------------------- >> 1 file changed, 1 insertion(+), 23 deletions(-) >> >> diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S >> index df07b3d..527ebfc 100644 >> --- a/arch/microblaze/kernel/vmlinux.lds.S >> +++ b/arch/microblaze/kernel/vmlinux.lds.S >> @@ -96,10 +96,7 @@ SECTIONS { >> __init_begin = .; >> >> INIT_TEXT_SECTION(PAGE_SIZE) >> - >> - .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { >> - INIT_DATA >> - } >> + INIT_DATA_SECTION(0) >> >> . = ALIGN(4); >> .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) { >> @@ -107,25 +104,6 @@ SECTIONS { >> *(.init.ivt) >> __ivt_end = .; >> } >> - >> - .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { >> - INIT_SETUP(0) >> - } >> - >> - .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) { >> - INIT_CALLS >> - } >> - >> - .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { >> - CON_INITCALL >> - } >> - >> - __init_end_before_initramfs = .; >> - >> - .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { >> - INIT_RAM_FS >> - } >> - >> __init_end = .; >> >> .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) { >> > Thanks for the patch but I can't accept it because recently we found > that there needs to be some resorting in linker to be able to boot. > The issue is that INIT_RAMFS_FS section is text/data/init and bss. > But because microblaze in early code is using two TLBs (16M) each for > early mapping and you have big initramfs bss section is unreachable. > That's why these sections needs to be swapped. > Maybe bss section can be moved up before INIT_DATA_SECTION maybe even > before INIT_TEXT_SECTION and we should be fine. Thank you for your reply. Do you mean it should be changed as follows: ... .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) { /* page aligned when MMU used */ __bss_start = . ; *(.bss*) *(COMMON) . = ALIGN (4) ; __bss_stop = . ; } INIT_TEXT_SECTION(PAGE_SIZE) INIT_DATA_SECTION(0) ... Thanks, Youling > Thanks, > Michal >