[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGSDoVKKVqCkbaCB@infradead.org>
Date: Wed, 17 May 2023 00:34:57 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Xiaoming Ding <xiaoming.ding@...iatek.com>
Cc: Jens Wiklander <jens.wiklander@...aro.org>,
Sumit Garg <sumit.garg@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, fei.xu@...iatek.com,
srv_heupstream@...iatek.com, linux-mm@...ck.org
Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm
> + u32 page_flag = FOLL_WRITE;
>
> if (!tee_device_get(teedev))
> return ERR_PTR(-EINVAL);
> @@ -255,9 +256,11 @@ register_shm_helper(struct tee_context *ctx, unsigned long addr,
> ret = ERR_PTR(-ENOMEM);
> goto err_free_shm;
> }
> -
> +#if IS_ENABLED(CONFIG_CMA)
> + page_flag |= FOLL_LONGTERM;
> +#endif
> if (flags & TEE_SHM_USER_MAPPED)
If this mapping is long live it should always use FOLL_LONGTERM.
The ifdef does not make sense.
Powered by blists - more mailing lists