Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2427770pxk; Sat, 5 Sep 2020 23:20:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9BJntIUw0dwPfqSIn99vGZIvtk/bn0hf5W9/mTFpfrkQx4YUt9yTAxdt9vBcdXRnTyOOl X-Received: by 2002:a50:a693:: with SMTP id e19mr15810444edc.205.1599373201905; Sat, 05 Sep 2020 23:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599373201; cv=none; d=google.com; s=arc-20160816; b=cPFmadzJzN5GdL85xH0hpXCplAR8Cz+w7HND6VIPZEK2a72PQcERjdtZqqZksoAbmb /OfLsxxO8eaGcyqnzK3YYgTDPt7fBNRpyE5NAr3bn1+TDj19JviGzxYJmFbA7NpOLvgW fqoHioFiGOhkHxIw2+D8O135l/wZ8mVucNxq9h8H08Y3vEJtlRnu3QHvK0qdq9v8Hn+c 59TIoHDG4H3AB0v/5g9UU0X7Ox7j9vFAEbwAGtw6P3zQvOobWwW0GbZaiV8ZoVZbfYSN ZtMVwYWFZIN9xHeU6AjeKfOF4d8jgwnHL2qPQO7aHBnRyw1nGG4fXPL4wWHQZF6URpSB owmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DKpUW087mbdDkhi2wLdNYo1ywPhjrOqJ76DLLbPUMCI=; b=wcHY2rcuj2GYQsVMmz/yp17d+bZQTgfLV085qdP9kkL3BKv17trkjgOcp+sQiBWQzN 4D1l1U6SO7jEuZ4gbKynVK27V14lEjemSXLRPkbmpM2Z9f71OkXZ3+uqLO/e43Zhxe3/ TMZO+KDvak1K4nz8pbDTc24lyaI8rRETTkCMPqe93YspPFRJaLztrEJLzgh+EbxS+Fs3 g1oE1JD5BlIPusV2pyAA+6PnaKsbZZ44ufUK3Myqz70cfl7oxAJEWh7cpEvSZcyWLE3H AHNSml+o4r55AwQKig26gS8FI8c5uAQ3jzIoeC3vemn1bnABurBcJRWfy90mLksKmLM6 MdQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K7efverp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si7286385ejh.372.2020.09.05.23.19.05; Sat, 05 Sep 2020 23:20:01 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=K7efverp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725803AbgIFGPp (ORCPT + 99 others); Sun, 6 Sep 2020 02:15:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:50470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgIFGPp (ORCPT ); Sun, 6 Sep 2020 02:15:45 -0400 Received: from kernel.org (unknown [87.71.73.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65E122075A; Sun, 6 Sep 2020 06:15:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599372944; bh=3LOzpkhgg7KndiUMcaG1D3PMxKGP2Vve0vOfAnOeF+g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K7efverp7pmqiAfzOuuPfYV/lyxn0zRTAEi7F3ORrVZGDSe+Lqv4FEP9x8LEjuyNA EgWjpDORzBb5XuR79NYIC3K/fSSa9VElLmWEXzCMedaqpkCmY9szpekWioUB0e+IFf sh39eedkR97+lUds13+pQwxoFCYMOtPHIbZKR9C0= Date: Sun, 6 Sep 2020 09:15:38 +0300 From: Mike Rapoport To: Stafford Horne Cc: LKML , Jonas Bonn , Stefan Kristiansson , Arvind Sankar , Greg Kroah-Hartman , Andrew Morton , openrisc@lists.librecores.org Subject: Re: [PATCH v2 1/3] openrisc: Reserve memblock for initrd Message-ID: <20200906061538.GB1213823@kernel.org> References: <20200905131935.972386-1-shorne@gmail.com> <20200905131935.972386-2-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200905131935.972386-2-shorne@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 10:19:33PM +0900, Stafford Horne wrote: > Recently OpenRISC added support for external initrd images, but I found > some instability when using larger buildroot initrd images. It turned > out that I forgot to reserve the memblock space for the initrd image. > > This patch fixes the instability issue by reserving memblock space. > > Fixes: ff6c923dbec3 ("openrisc: Add support for external initrd images") > Signed-off-by: Stafford Horne Reviewed-by: Mike Rapoport > --- > arch/openrisc/kernel/setup.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c > index b18e775f8be3..13c87f1f872b 100644 > --- a/arch/openrisc/kernel/setup.c > +++ b/arch/openrisc/kernel/setup.c > @@ -80,6 +80,16 @@ static void __init setup_memory(void) > */ > memblock_reserve(__pa(_stext), _end - _stext); > > +#ifdef CONFIG_BLK_DEV_INITRD > + /* Then reserve the initrd, if any */ > + if (initrd_start && (initrd_end > initrd_start)) { > + unsigned long aligned_start = ALIGN_DOWN(initrd_start, PAGE_SIZE); > + unsigned long aligned_end = ALIGN(initrd_end, PAGE_SIZE); > + > + memblock_reserve(__pa(aligned_start), aligned_end - aligned_start); > + } > +#endif /* CONFIG_BLK_DEV_INITRD */ > + > early_init_fdt_reserve_self(); > early_init_fdt_scan_reserved_mem(); > > -- > 2.26.2 > -- Sincerely yours, Mike.