From: Christoph Hellwig <hch@infradead.org>
To: Xiaoming Ding <xiaoming.ding@mediatek.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, fei.xu@mediatek.com,
srv_heupstream@mediatek.com, linux-mm@kvack.org
Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm
Date: Wed, 17 May 2023 00:34:57 -0700 [thread overview]
Message-ID: <ZGSDoVKKVqCkbaCB@infradead.org> (raw)
In-Reply-To: <20230517031856.19660-1-xiaoming.ding@mediatek.com>
> + 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.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: op-tee@lists.trustedfirmware.org
Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm
Date: Wed, 17 May 2023 00:34:57 -0700 [thread overview]
Message-ID: <ZGSDoVKKVqCkbaCB@infradead.org> (raw)
In-Reply-To: <20230517031856.19660-1-xiaoming.ding@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
> + 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.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Xiaoming Ding <xiaoming.ding@mediatek.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, fei.xu@mediatek.com,
srv_heupstream@mediatek.com, linux-mm@kvack.org
Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm
Date: Wed, 17 May 2023 00:34:57 -0700 [thread overview]
Message-ID: <ZGSDoVKKVqCkbaCB@infradead.org> (raw)
In-Reply-To: <20230517031856.19660-1-xiaoming.ding@mediatek.com>
> + 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.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-05-17 7:35 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 3:18 [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm Xiaoming Ding
2023-05-17 3:18 ` Xiaoming Ding
2023-05-17 3:18 ` Xiaoming Ding
2023-05-17 7:34 ` Christoph Hellwig [this message]
2023-05-17 7:34 ` Christoph Hellwig
2023-05-17 7:34 ` Christoph Hellwig
2023-05-17 7:52 ` Sumit Garg
2023-05-17 7:52 ` Sumit Garg
2023-05-17 7:52 ` Sumit Garg
2023-05-17 8:08 ` Christoph Hellwig
2023-05-17 8:08 ` Christoph Hellwig
2023-05-17 8:08 ` Christoph Hellwig
2023-05-17 9:02 ` Xiaoming Ding (丁晓明)
2023-05-17 9:02 ` Xiaoming Ding (丁晓明)
2023-05-17 9:26 ` Sumit Garg
2023-05-17 9:26 ` Sumit Garg
2023-05-17 9:26 ` Sumit Garg
2023-05-17 9:36 ` Christoph Hellwig
2023-05-17 9:36 ` Christoph Hellwig
2023-05-17 9:36 ` Christoph Hellwig
2023-05-17 10:19 ` Sumit Garg
2023-05-17 10:19 ` Sumit Garg
2023-05-17 10:19 ` Sumit Garg
2023-05-17 18:23 ` David Hildenbrand
2023-05-17 18:23 ` David Hildenbrand
2023-05-17 18:23 ` David Hildenbrand
2023-05-18 4:20 ` FOLL_LONGTERM vs FOLL_EPHEMERAL " Christoph Hellwig
2023-05-18 4:20 ` Christoph Hellwig
2023-05-18 4:20 ` Christoph Hellwig
2023-05-18 6:08 ` Sumit Garg
2023-05-18 6:08 ` Sumit Garg
2023-05-18 6:08 ` Sumit Garg
2023-05-18 13:56 ` David Hildenbrand
2023-05-18 13:56 ` David Hildenbrand
2023-05-18 13:56 ` David Hildenbrand
2023-05-23 1:54 ` John Hubbard
2023-05-23 1:54 ` John Hubbard
2023-05-23 1:54 ` John Hubbard
2023-05-23 7:25 ` Lorenzo Stoakes
2023-05-23 7:25 ` Lorenzo Stoakes
2023-05-23 7:25 ` Lorenzo Stoakes
2023-06-13 5:30 ` Xiaoming Ding (丁晓明)
2023-06-13 5:30 ` Xiaoming Ding (丁晓明)
2023-06-13 8:48 ` Sumit Garg
2023-06-13 8:48 ` Sumit Garg
2023-06-13 8:48 ` Sumit Garg
2023-05-18 6:40 ` Xiaoming Ding (丁晓明)
2023-05-18 6:40 ` Xiaoming Ding (丁晓明)
2023-05-19 10:01 ` David Hildenbrand
2023-05-19 10:01 ` David Hildenbrand
2023-05-19 10:01 ` David Hildenbrand
2023-05-19 11:03 ` Sumit Garg
2023-05-19 11:03 ` Sumit Garg
2023-05-19 11:03 ` Sumit Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGSDoVKKVqCkbaCB@infradead.org \
--to=hch@infradead.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=fei.xu@mediatek.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=matthias.bgg@gmail.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=srv_heupstream@mediatek.com \
--cc=sumit.garg@linaro.org \
--cc=xiaoming.ding@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.