Received: by 10.223.176.46 with SMTP id f43csp3409320wra; Mon, 22 Jan 2018 13:48:45 -0800 (PST) X-Google-Smtp-Source: AH8x2276MkYJhtL3H9zIA5PUkBlguE4W72nh9l38Sl342fgbm27925Lt8mfByOa+5tm/yLvDweAA X-Received: by 10.107.59.77 with SMTP id i74mr517982ioa.180.1516657725125; Mon, 22 Jan 2018 13:48:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516657725; cv=none; d=google.com; s=arc-20160816; b=sfPQDjEtMJZU1N5G83YWsKWWlOrkza/M+MAY8mLbDWzeRmF4gkdiWWNxE3Abrzm/Z1 Yl7pSzjYS5fje4z72wKkR8XphCz0ovG0i22wAInRgDjXDFBwMz4k74X+pK7Lqc7G+egL xgfZH7qzhXYw1YGWujSSupx0gqFG1tWNQEbN/MOm5+VSciwNXD971STQ8L+sL+wev6YT ZyDFlHkkZccWQfvGljjzFz/rCBx94CPLRUR02VcO0fI4SYTAHitscSGxMILYE2ByQcvI hCKkRiuZEdnufD3ERPEVNAqerWY8lr7sP4Lb55yCS96KHQYXdr4FMvTwrdtMrl2fEMIs uiGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=M8dgX5evKOzhsRquGpZtLIHtN8syS8yLxYk1MVVXP/I=; b=nMNP9+yd9eeVuVxRCirKmfuzanZvuzb0murI48VUE85iI9UCYwg9CQVm3w4Q6WaUWn YaWnnjHFTTJJ8Zy/+3E0zBUce0j/OaktNFJRpg9QqyaykltuMQ+xddyVjmTR0a5yf5cZ mtIn0YDIi05bhKguVaug1b3B+qYpn5SH5ZK0BpsSnfk4/wEszL8dTfudeFdQWMuU7+CG C05RNwpsyO9JOMHXd3Wjbp/CTd57UD3r/ryT31W2WYiXN1oNXy2mtm1lwzfRufCHMA3s tgRUblNM0jzoqYeeC7KqxbNimqJe21u6vLxfm+oPqDZzkCDoO9Vot9B/iWjt5/sgZjF/ 43BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5u6pFi7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j34si13859940iod.160.2018.01.22.13.48.32; Mon, 22 Jan 2018 13:48:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5u6pFi7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbeAVVri (ORCPT + 99 others); Mon, 22 Jan 2018 16:47:38 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:41690 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbeAVVrg (ORCPT ); Mon, 22 Jan 2018 16:47:36 -0500 Received: by mail-lf0-f66.google.com with SMTP id f136so12447136lff.8 for ; Mon, 22 Jan 2018 13:47:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M8dgX5evKOzhsRquGpZtLIHtN8syS8yLxYk1MVVXP/I=; b=B5u6pFi7OcqzAQ+7C4yqz3/RZJUl2IEGefH9/S5ksF0wTj3dEOFYKrKtXUpC4FVxqc f4Hn4OftL+Yr1pf+aWHThLhM9OMB/ySUdVCrWWrYvei84rp7Xbbmu7vKRoOdn6vltbYw Q5Gc+1kWgJ5FnzvBHy/BKEaIefcG8Yv/U7p+2Q4msOQ4KralOktUV41iAmautcKN4nY3 X9DZmp8IE9YKICkodhO532t529EfH0x+CYUXq7B8eLu+c8U6TgOQ+8+l5ut+3xa67NEw sAR1W2D8GsSUMbnq5WY2FJGXiFgnvv9F01xoKRzv59orWx0gk1kNN7+6HmlwTYWY67Am 5RuA== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M8dgX5evKOzhsRquGpZtLIHtN8syS8yLxYk1MVVXP/I=; b=LxfB7MBTo6l3r/3TMeh/yPHmXhaG9YJujyOYyTKUvZLyvH9TLeN9/21zhYNeojAanz GsSoFxRRSdqR1tRTe0317pHSHoFM7CTvWl1iqSZiV3fpbUAEA/fQ/6s2/fB3lONS1HIP aH92Dxn8kB4V/uK1KGx6GN6TjAkHjELcv3mBYXEJLmmPd4XYzG2KIzlkVWuyBi1G8I9V ojW+5jAJUW4drLh6a7RgEZcKr/EPx0WdKdwk+fHwIPKDMewW+E4EtNFMdpybfecNc/Yi 77Of1ZBBFdXNFb56NV6oSlHXbfzQ4bn1g99j60uX3QfOd8kbOV+GYpraXN6VT9pKN/P6 6vBw== X-Gm-Message-State: AKwxytdHVb6yfFJFYE2kjaJeF83PITjoDQcgLeiuDWi6h2Yyms+MyMqD /1BHNCPaF2RVM1gkuYRpXVw= X-Received: by 10.46.87.86 with SMTP id r22mr163444ljd.106.1516657655191; Mon, 22 Jan 2018 13:47:35 -0800 (PST) Received: from mobilestation ([95.79.164.146]) by smtp.gmail.com with ESMTPSA id m187sm608935lfe.39.2018.01.22.13.47.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 13:47:34 -0800 (PST) Date: Tue, 23 Jan 2018 00:47:46 +0300 From: Serge Semin To: Matt Redfearn Cc: ralf@linux-mips.org, miodrag.dinic@mips.com, jhogan@kernel.org, goran.ferenc@mips.com, david.daney@cavium.com, paul.gortmaker@windriver.com, paul.burton@mips.com, alex.belits@cavium.com, Steven.Hill@cavium.com, alexander.sverdlin@nokia.com, kumba@gentoo.org, marcin.nowakowski@mips.com, James.hogan@mips.com, Peter.Wotton@mips.com, Sergey.Semin@t-platforms.ru, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section Message-ID: <20180122214746.GC32024@mobilestation> References: <20180117222312.14763-1-fancer.lancer@gmail.com> <20180117222312.14763-3-fancer.lancer@gmail.com> <3fbb8850-bf34-d698-299a-f1cd62d063ae@mips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fbb8850-bf34-d698-299a-f1cd62d063ae@mips.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Matt, On Mon, Jan 22, 2018 at 04:35:26PM +0000, Matt Redfearn wrote: > Hi Serge, > > On 17/01/18 22:23, Serge Semin wrote: > >The current MIPS code makes sure the kernel code/data/init > >sections are in the maps, but BSS should also be there. > > Quite right - it should. But this was protected against by reserving all > bootmem up to the _end symbol here: > http://elixir.free-electrons.com/linux/v4.15-rc8/source/arch/mips/kernel/setup.c#L388 > Which you remove in the next patch in this series. I'm not sure it is worth Right. Missed that part. The old code just doesn't set the kernel memory free calling the free_bootmem() method for non-reserved parts below reserved_end. > disentangling the reserved_end stuff from the next patch to make this into a > single logical change of reserving just .bss rather than everything below > _end. Good point. I'll move this change into the "[PATCH 05/14] MIPS: memblock: Add reserved memory regions to memblock". It logically belongs to that place. Since basically by the arch_mem_addpart() calls we reserve all the kernel memory now I'd also merged them into a single call for the range [_text, _end]. What do you think? Regards, -Sergey > > Reviewed-by: Matt Redfearn > > Thanks, > Matt > > > > >Signed-off-by: Serge Semin > >--- > > arch/mips/kernel/setup.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > >diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c > >index 76e9e2075..0d21c9e04 100644 > >--- a/arch/mips/kernel/setup.c > >+++ b/arch/mips/kernel/setup.c > >@@ -845,6 +845,9 @@ static void __init arch_mem_init(char **cmdline_p) > > arch_mem_addpart(PFN_UP(__pa_symbol(&__init_begin)) << PAGE_SHIFT, > > PFN_DOWN(__pa_symbol(&__init_end)) << PAGE_SHIFT, > > BOOT_MEM_INIT_RAM); > >+ arch_mem_addpart(PFN_DOWN(__pa_symbol(&__bss_start)) << PAGE_SHIFT, > >+ PFN_UP(__pa_symbol(&__bss_stop)) << PAGE_SHIFT, > >+ BOOT_MEM_RAM); > > pr_info("Determined physical RAM map:\n"); > > print_memory_map(); > >