From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083AbdB0LzJ (ORCPT ); Mon, 27 Feb 2017 06:55:09 -0500 Received: from foss.arm.com ([217.140.101.70]:52750 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbdB0Lyf (ORCPT ); Mon, 27 Feb 2017 06:54:35 -0500 Date: Mon, 27 Feb 2017 08:48:09 +0000 From: Mark Rutland To: Yisheng Xie Cc: Ard Biesheuvel , Leif Lindholm , Catalin Marinas , Will Deacon , Kefeng Wang , Jisheng Zhang , Ganapatrao Kulkarni , Laura Abbott , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Hanjun Guo , dongbo4@huawei.com Subject: Re: [PATCH RFC] arm64/mm: handle memmap kernel option Message-ID: <20170227084808.GA31271@remoulade> References: <1488005245-54811-1-git-send-email-xieyisheng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Feb 27, 2017 at 11:48:50AM +0800, Yisheng Xie wrote: > On 2017/2/26 18:46, Ard Biesheuvel wrote: > > On 25 February 2017 at 06:47, Yisheng Xie wrote: > >> To make user reserve memory for some specific use more convenient, > >> this patch implement the following memmap variants: > >> - memmap=nn[KMG]$ss[KMG]: mark specified memory as reserved; > >> - memmap=nn[KMG]@ss[KMG]: force usage of a specific region of memory; > > Could you explain which problem you are solving here? ACPI implies > > UEFI on arm64, and so these reservations could be made by a boot > > component instead, if it requires a fixed memory reservation. If this > > is a reservation for, e.g., OP-TEE, we should not rely on the command > > line to communicate this information. > > > We just want to reserve some memory for a driver and I just not so familiar > with how to reserve memory with UEFI. So doubt about whether it is suitable > to reserve memory with cmdline like "memmap=xxx", which had appeared in x86 > for a long time. Could you please explain for what purpose this is necessary? Does the driver need a specific region of memory? Or just some contiguous region? Or something else? For the former, this is not an appropriate solution; firmware must absolutely mark the memory as reserved for a particular purpose. If you just need contiguous physical memory, I believe it would be better to use CMA, and request CMA reserve a larger area if necessary. Thanks, Mark.