Received: by 10.223.176.5 with SMTP id f5csp264476wra; Thu, 1 Feb 2018 19:59:20 -0800 (PST) X-Google-Smtp-Source: AH8x2265DcOZVhd+QUj5+GD+IAAeQupBkwPWSkLn5QC6WdlinwKLAbkrufoWYcvAXN9Vlw1LytHW X-Received: by 10.99.122.82 with SMTP id j18mr30062070pgn.250.1517543960667; Thu, 01 Feb 2018 19:59:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517543960; cv=none; d=google.com; s=arc-20160816; b=03xs7xHJ524ja4slwujjRErqFigSFw3rtfru65y2pwVN81IdWgtGR0hs/g/QPKxT9l PFy/EvrVOw28mTdEeZdN7aOJautHEoRKybxy8VCZ4yl3iR1mcFYuJSuaTAjM/46/Kd4g vI6TAbmacZb/JVkONlQNYO/pKtejyLs4YvcJSCNEgw7LshWV5+08XRCrUmHW2I7d90Gf XdVczxtB3h3BtqCipMMPFl7WAiF+xYE1Bb9yHmiN3xsGE9CnDsmPPnWsu0oPFxAWoF+V aY0RHGIFpjl2OsZrjDfq4jyEp5OGXfU24QuYtKgGFNnSzPH0Ni/5WzhZPEFSIT3sUNU4 KR+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Qe+jeju5c0xk13GQNkrFJsA7pQ5xm3AiUWEjRkNB9v8=; b=uRjxLzN+SkWsVUA+vbMhH+HQfZpZOXFKWmT2UWdhwpQSRem9ock1tIghJA5A4Z/4/Q J/StlAPIsvvoYFxau3O16EBuoc+mvJjk9np4OE3WfulOoXgIbc+KCKEeT7TL6ub1KcK+ PYWgI5gnerwEGYtvrUO2DO4TYWlE0XkfAsyrUNlR2Rsf7JYbpk8LRbXQQVeyICIOAbQW Uc5fIcly5HdUXVANnNbXcjX9DW2GD34ox/Mto9fsLCsgkVVEoyW2avGTdS4J5ZFrybI+ dZltpZIJMpbbAWxpkfLNX8K7OFY16Z9R+IBnJQAUZ14U08UTHlwE0XHhLLfyFBVV6Ua1 GEOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oFDk4Emk; 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 d23si755233pgn.737.2018.02.01.19.59.06; Thu, 01 Feb 2018 19:59:20 -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=oFDk4Emk; 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 S1752038AbeBBD5w (ORCPT + 99 others); Thu, 1 Feb 2018 22:57:52 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:44396 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbeBBDzP (ORCPT ); Thu, 1 Feb 2018 22:55:15 -0500 Received: by mail-lf0-f67.google.com with SMTP id v188so29426472lfa.11 for ; Thu, 01 Feb 2018 19:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qe+jeju5c0xk13GQNkrFJsA7pQ5xm3AiUWEjRkNB9v8=; b=oFDk4Emk6ROVEWnVg8ZhtN86TIvqgLk7/axRRH7WH4JgyqRDS2TrCSMX/HoHXiK/0L iUPJ2V3vgo/jdRkrbXKoskH4o8FYgFdFKe8IJ8ANRGeezMrAZv3Kn6NxIzegsYATSPw9 8QgAH8OIH27Fo8MBb9+tnbcg3LOjW8oE+Zfh/vE+hlfGfDo9f3ibGD+2UTqwvflhACn5 +WoSz0+vru2MzrMAGCGt9zqgHnEcIexl7dt8SVG+LYU80Y+6kuy6hvEwbAMX8xNCnRj7 STsDn4Us01N0vaI3lfVTV6NZh5RNlignWHaAPbGgEf6WHC/+vTS8uP+CxFDy0RLfN3jB 8MKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Qe+jeju5c0xk13GQNkrFJsA7pQ5xm3AiUWEjRkNB9v8=; b=C8wz/HQjjh52mjKNzzMfIdNhg9+M00m+bZgmtxYx+7K68+eCZqWr77a47OxBXLCZN4 iqfmBQiKfELa71F+1CqEwRPYzQcVI6pkfm0fWyXyn0ty5LxTNgn77dfdTMGv24SebtCj NFUDzVieMl6R93SYDuqXaBSfskvPqhqG5cKme6+6yPi7m13zBEpgc4xus655v8qYYTla ENs4Vrv82iwytgVsbMx0OSTIqNrGdf2IDxyXL+VZc/0V9MItAMLadtYEgzJv5aXPMilj pBmoWcgdmYvCd7CBY4YLc0IvebPhUiK5UzpMSMeBXr/9UiFBTjB9R7yQs8uTrbQsZl2T AV7g== X-Gm-Message-State: AKwxytcU4fqkkQQ1rVHmwb87NCRQh3ZL7QexcJWt6+8agu/cLOyvQwJT M5H4jcY7izoGalNA0XDqagk= X-Received: by 10.46.69.4 with SMTP id s4mr12113003lja.73.1517543713994; Thu, 01 Feb 2018 19:55:13 -0800 (PST) Received: from linux.local ([95.79.164.146]) by smtp.gmail.com with ESMTPSA id f14sm190934lje.84.2018.02.01.19.55.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Feb 2018 19:55:13 -0800 (PST) From: Serge Semin To: 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 Cc: alexander.sverdlin@nokia.com, matt.redfearn@mips.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, Serge Semin Subject: [PATCH v2 08/15] MIPS: memblock: Mark present sparsemem sections Date: Fri, 2 Feb 2018 06:54:51 +0300 Message-Id: <20180202035458.30456-9-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180202035458.30456-1-fancer.lancer@gmail.com> References: <20180117222312.14763-1-fancer.lancer@gmail.com> <20180202035458.30456-1-fancer.lancer@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If sparsemem is activated all sections with present pages must be accordingly marked after memblock is fully initialized. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index b2a5b89ae6b2..54302319ce1c 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -837,6 +837,11 @@ static void __init arch_mem_init(char **cmdline_p) crashk_res.end - crashk_res.start + 1); #endif device_tree_init(); +#ifdef CONFIG_SPARSEMEM + for_each_memblock(memory, reg) + memory_present(0, memblock_region_memory_base_pfn(reg), + memblock_region_memory_end_pfn(reg)); +#endif /* CONFIG_SPARSEMEM */ sparse_init(); plat_swiotlb_setup(); -- 2.12.0