[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200513064755.GA763968@kroah.com>
Date: Wed, 13 May 2020 08:47:55 +0200
From: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
To: "Idgar, Or" <Or.Idgar@...l.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"Ravich, Leonid" <Leonid.Ravich@...l.com>
Subject: Re: CMA enhancement - non-default areas in x86
On Wed, May 13, 2020 at 06:13:55AM +0000, Idgar, Or wrote:
> Hi,
> I'm working with Linux kernel on x86 and needed a way to allocate a very large contiguous memory (around 20GB) for DMA operations.
For what type of device?
> I've found out that CMA is one of the major ways to do so, but our problem is that CMA's default behavior is to create one default area from which all devices can allocate memory.
> when booting, there were some drivers that allocated memory for DMA and used CMA memory if exist. The problem is that it takes memory that we need for our device and we want to make sure this area is dedicated for our device.
>
> As I saw, the only way to reserve a dedicated area is by enabling OF_RESERVED_MEM which is available for several architectures but excluding x86 (and as far as I understand relies on device tree which is not in use with x86 or at least cannot be configured with OF_RESERVED_MEM).
>
> I really want to leverage this mechanism/API and thought about modifying the code (and hopefully merge it upstream) so multiple non-default areas will be available for x86 and with a way to consume it by mapping specific area to specific device.
>
> Is it something that will be open for merging if written properly?
We always will be glad to review patches, no need to ask us about that.
Just post them!
good luck,
greg k-h
Powered by blists - more mailing lists