Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4125205yba; Tue, 23 Apr 2019 15:51:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrXjGwkGhYHP03wm93Knnol+vOp2Zpnn+2YkqIZkka8JiFop8PTAT7e3htaMUaYu27dUMt X-Received: by 2002:a17:902:6b03:: with SMTP id o3mr28079160plk.226.1556059870784; Tue, 23 Apr 2019 15:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556059870; cv=none; d=google.com; s=arc-20160816; b=SgbP4EbSQgtMo89PteYXZD61TOnihQmh1XcIhkwTWRbL9En/0itsGwXm3nh/XpCrK1 K2rwbBi673qihtMI+ZaRAXK3cRpnRE/y23GdtZlB2suXqFEsOWCb34jH7i+61+x27Gyj E4XM8fNfnRWXwoCoNEyL/Rh00UJOdahscB513fqScHnnWcAJ5M3ZG7c5J4AGIt0q7ZQi +odJVDQI+PMSFvImC6vqsiKuxMJ7UJg+SqQbSvhTXqO2GrApB9P74WFUroSulBrV2sdx ezlq+TW+m+YkirnpjgdomnA/C+3Dr2uzbLfU2mfN5ISfKwIzX0FQJBakGbxuAODvqW4e xyfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QQUuLg/zS2tfsDPJ/SWrp4NtSrhhV6zRMowLIWOaos8=; b=c3wg0zic9nKaUdF50h8w0rgDM38ZakIRNgImYhw9X2Wg+wn4OyE0krBgyLcLVpT0p5 hERJOTxM67oPMJEeJXEHggbXkCpSF7XXY4rrRUKM5M/lEWNmt+JQXG4KGG6gh26aw/vl 4NYpi1aBTiZ1LGNapnwOtSaGGguMWYyAg2oIL/FIvyggOQXS/lki+GhOqYGf7sRtYKTL xNVZbPF9lrj9t5Ppyzn5YTU4z5C9AckpBzUC92NohtP+2VXVD0q/WpHQnZh81DTcVUUV J3676rDuTokhH7Jg1b5wf0ZHK1E226994/yPS8BieOsA8XDV+DCllZ7fiqDq8XCnmy// YAGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZBRqseJk; 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=QUARANTINE 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 b12si15569767pgq.53.2019.04.23.15.50.55; Tue, 23 Apr 2019 15:51:10 -0700 (PDT) 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=ZBRqseJk; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728823AbfDWWto (ORCPT + 99 others); Tue, 23 Apr 2019 18:49:44 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33079 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728712AbfDWWti (ORCPT ); Tue, 23 Apr 2019 18:49:38 -0400 Received: by mail-lj1-f195.google.com with SMTP id f23so15031255ljc.0; Tue, 23 Apr 2019 15:49:36 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=QQUuLg/zS2tfsDPJ/SWrp4NtSrhhV6zRMowLIWOaos8=; b=ZBRqseJkYxfE/CzTHrtM2oFui4WHlgpHFxVNRrXxCKi7N8X3XTPlsNGSc4ixdgXSQL Ft4N3un8giuvHukO+rUIqFqg0gQrFi37NydhXvzZUYY3sYVerTDnePzuqzPJtTLFZsT9 /RDd7oy6OmJCrxdT41pBlHXf5a4QRlDK7UhVj+HzeR4vmCoJHiI4eIolL/He31Q98u/K 3TErh/CFzHNTVNGq5mKSfaj8nWGvk+J8dlJFoShbrWWdsl++e1FObF2V7gTXntamcVK4 IBurUD9I0DGT57g4pVBixhVip8XowygvDGao0r7jv/60dGysobUJVkxU7zxL6rbpBfk4 MeXg== 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:mime-version:content-transfer-encoding; bh=QQUuLg/zS2tfsDPJ/SWrp4NtSrhhV6zRMowLIWOaos8=; b=B4hrCaNSALucr1a/FeHK7GnIIpqOvo3auje6MAk8UP3teCS13Emih96SHFwADdllj0 SxQMG4Xgy9ZcU6tMi7LB1QxJPz3DNdBCh+Oiq6xLwZSdoU65p4KqGyutapwf1GfFIh5y NyC7KF4rbF81lo0oe0j9WTFVupCQ+YAq5pyo3WqxSoaS95GqZzpmIh0vX/Diw8loH4jj 2mrxNsd8TYQ69e1xkrOdmvEMbj4Dr2Qui/x/l/5AX3YdzWy2YwqE+QM00VDkBe3N2dwE L5MxL2vwBEsWjM8ddpTme24gfHsdmCg+ly3/gt1cYoAY4PcAW8U9MnfSk9NkRM19c2Vb Rfwg== X-Gm-Message-State: APjAAAV407CG9p2tG0/J/JoY3zIAWXaLFu7MUTgLTVpMoUJvJD0wREXA zKvKoHUfFLZHbm706YV9mo4= X-Received: by 2002:a2e:5d94:: with SMTP id v20mr14093334lje.138.1556059775938; Tue, 23 Apr 2019 15:49:35 -0700 (PDT) Received: from localhost.localdomain ([5.164.240.123]) by smtp.gmail.com with ESMTPSA id w2sm4904722lfa.63.2019.04.23.15.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 15:49:35 -0700 (PDT) From: Serge Semin To: Ralf Baechle , Paul Burton , James Hogan , Matt Redfearn , Mike Rapoport , Andrew Morton , Michal Hocko , Greg Kroah-Hartman , Thomas Bogendoerfer , Huacai Chen , Stefan Agner , Stephen Rothwell , Alexandre Belloni , Juergen Gross Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Semin Subject: [PATCH 09/12] mips: Perform early low memory test Date: Wed, 24 Apr 2019 01:47:45 +0300 Message-Id: <20190423224748.3765-10-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190423224748.3765-1-fancer.lancer@gmail.com> References: <20190423224748.3765-1-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org memblock subsystem provides a method to optionally test the passed memory region in case if it was requested via special kernel boot argument. Lets add the function at the bottom of the arch_mem_init() method. Testing at this point in the boot sequence should be safe since all critical areas are now reserved and a minimum of allocations have been done. Reviewed-by: Matt Redfearn Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index ca493fdf69b0..fbd216b4e929 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -826,6 +826,8 @@ static void __init arch_mem_init(char **cmdline_p) __pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin)); memblock_dump_all(); + + early_memtest(PFN_PHYS(min_low_pfn), PFN_PHYS(max_low_pfn)); } static void __init resource_init(void) -- 2.21.0