RE: [PATCH V2] dma-mapping: Set dma_mem pointer as NULL after it's freed

From: Joakim Zhang
Date: Fri Dec 15 2023 - 09:25:10 EST



Hi Christoph Hellwig,

> -----Original Message-----
> From: Christoph Hellwig <hch@xxxxxx>
> Sent: Friday, December 15, 2023 7:32 PM
> To: Joakim Zhang <joakim.zhang@xxxxxxxxxxx>
> Cc: hch@xxxxxx; m.szyprowski@xxxxxxxxxxx; robin.murphy@xxxxxxx;
> iommu@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; cix-kernel-upstream
> <cix-kernel-upstream@xxxxxxxxxxx>
> Subject: Re: [PATCH V2] dma-mapping: Set dma_mem pointer as NULL after
> it's freed
>
> I've applied this after fixing the whitespace errors.
>
> But we really need to get remoteporc off messing with the reserved regions
> itself and retire this API entirely.

Indeed, I met this issue when debugging remoteproc, this API maybe useful since some system would not support device tree, but still want to reserve memory in the driver.