[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZesVgXi9xBFvDL4O@smile.fi.intel.com>
Date: Fri, 8 Mar 2024 15:41:21 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Howard Yen <howardyen@...gle.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, mathias.nyman@...el.com,
hch@....de, m.szyprowski@...sung.com, robin.murphy@....com,
petr.tesarik.ext@...wei.com, broonie@...nel.org, james@...iv.tech,
james.clark@....com, masahiroy@...nel.org,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
iommu@...ts.linux.dev
Subject: Re: [PATCH v4 1/2] dma-coherent: add support for multi coherent
rmems per dev
On Fri, Mar 08, 2024 at 09:53:19AM +0000, Howard Yen wrote:
> Add support for multiple coherent rmems per device. This patch replaces
> original dma_mem with dma_mems list in device structure to store multiple
> rmems.
>
> These multiple rmems can be assigned to the device one by one by
> of_reserved_mem_device_init_by_idx() with the memory-region
> declaration in device tree as below and store the rmem to the dma_mems
> list.
>
> device1@0 {
> ...
> memory-region = <&reserved_mem0>, <&reserved_mem1>;
> ...
> };
>
> When driver tries to allocate memory from the rmems, looks for the first
> available rmem and allocates the memory from this rmem.
>
> Then if driver removed, of_reserved_mem_device_release() needs to be
> invoked to release all the rmems assigned to the device.
..
> +#endif
> +#ifdef CONFIG_DMA_DECLARE_COHERENT
> + INIT_LIST_HEAD(&dev->dma_mems);
> #endif
Side note: Have you used --histogram diff algo? If no, use it in the future.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists