From patchwork Mon Sep 18 15:55:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9957029 X-Patchwork-Delegate: deller@gmx.de 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 457296039A for ; Mon, 18 Sep 2017 15:55:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3572428CD1 for ; Mon, 18 Sep 2017 15:55:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A30828D1C; Mon, 18 Sep 2017 15:55:35 +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=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0BF528CD1 for ; Mon, 18 Sep 2017 15:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754465AbdIRPze (ORCPT ); Mon, 18 Sep 2017 11:55:34 -0400 Received: from mout.gmx.net ([212.227.17.21]:53102 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754198AbdIRPzd (ORCPT ); Mon, 18 Sep 2017 11:55:33 -0400 Received: from p100.box ([193.159.30.106]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MIuft-1drUU32b29-002bXl; Mon, 18 Sep 2017 17:55:26 +0200 Date: Mon, 18 Sep 2017 17:55:24 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [PATCH] parisc: Check for broken memory in initrd Message-ID: <20170918155524.GA24676@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:BOIuBbmd/INPYFH/xEacPN6u9U4Unh9YaaItWpanJmfSLTi933c +Z+hiWWQ+/K584HYSxlETGSEwFLeNXH96PqYhY1zBgErTkZanEtTEgsGiVnIM9WV+X8VP1I oZLfUUEcJ8zmGemORRxaF0D9BcKZKtawxHqHQbvSpPvqwoNwnI2cUxrEfqjmeyUh7taq0zn kU9QGNcNQmvSAunpEGmCg== X-UI-Out-Filterresults: notjunk:1; V01:K0:TX447iobCUM=:kJZnIFQiV/9pPBkSi/FS0O PckZQPCso04NCxQZuyVP2YXVVAvQvzmpE+pIAY28cW7P8leD3rv/3rKIoTUAT6P2jltBCEf9s XEj0UPne9igICZxevDwLuqYMMHfvxcnv+dLI+y9/C9bZDUcIPwFy9nrVGk6DnmGu0Tou0F78U csSnObE/YLohunZ5uCKmch1oq5k2l0Qsa5CeabhYuC6/Vlr1LcR+DkIH1KztqWIqvrvBXKbu8 wMO/YR1keRvjvmdh4GkjIjVhKPwRuGXPwfs6cGeavYhfeVg9EDN1m1J4UorHmefHOaxNHdbn9 ygn/L+NNM1sSWMtYY2yYERhJuWOZFwT4EUKFctdHDS9F6aaief3QLFCA2AXCCC7+zzt6oGemo 1c5lsjax02YlwWHtiEgYu8Pcf2vkPH/JtUV/kuv2J9ej4f0JgAwp56PFLEl1V3cvSmrPBLycs cR3gBJdbTG9Ul31GRHCUlGSF8zXeW7pukAA5v8povms45IMuOgAidGqQoTkCr5uf04wsQ1bHc +G1enltzBx17GWwl9Eq9ZqztaKPXeFzB5KNf3QmUfP1n1E9pbkewQ4jIX5nccK80RJigd2hV6 5bO3lDaK1cdGmsDOMwWndTywitoZ3bF4d5WUeOgENuPWorDg76edic/5/i6aagxwGq2I2NWne DZoqMyr51qgyxpO9/QpymE4yyc3KjpYZUmfLqzMws7lFlfe/sY+B8izDqdn/c2xNBTXUO/YVu yRt97L3Fw+RAMzV0NapMfn6B4b/XfSCIgTy9eF4GjRBjhvdECXyYuAW9LEF5O9G4yi4Dccj+W sMQNVErIc6WlSb3VkIRRMchEn7b2A== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While scanning the PDT for reported broken memory modules, check if the initrd may have been loaded in such broken regions. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c index 05730a8..00aed08 100644 --- a/arch/parisc/kernel/pdt.c +++ b/arch/parisc/kernel/pdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -216,8 +217,16 @@ void __init pdc_pdt_init(void) } for (i = 0; i < pdt_status.pdt_entries; i++) { + unsigned long addr; + report_mem_err(pdt_entry[i]); + addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK; + if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && + addr >= initrd_start && addr < initrd_end) + pr_crit("CRITICAL: initrd possibly broken " + "due to bad memory!\n"); + /* mark memory page bad */ memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE); }