[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8dc83d5f7eb6c1127b320e23fa0c4c909abd700d.camel@mediatek.com>
Date: Mon, 20 May 2024 09:53:53 +0000
From: Yong Wu (吴勇) <Yong.Wu@...iatek.com>
To: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>, "christian.koenig@....com"
<christian.koenig@....com>, "angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>, "robh+dt@...nel.org"
<robh+dt@...nel.org>, "sumit.semwal@...aro.org" <sumit.semwal@...aro.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"jstultz@...gle.com" <jstultz@...gle.com>, "linaro-mm-sig@...ts.linaro.org"
<linaro-mm-sig@...ts.linaro.org>, "linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "quic_vjitta@...cinc.com"
<quic_vjitta@...cinc.com>, "willy@...radead.org" <willy@...radead.org>,
Kuohong Wang (王國鴻) <kuohong.wang@...iatek.com>,
"pavel@....cz" <pavel@....cz>, "robin.murphy@....com" <robin.murphy@....com>,
"contact@...rsion.fr" <contact@...rsion.fr>, "logang@...tatee.com"
<logang@...tatee.com>, "daniel@...ll.ch" <daniel@...ll.ch>,
"jkardatzke@...gle.com" <jkardatzke@...gle.com>, "conor+dt@...nel.org"
<conor+dt@...nel.org>, "Brian.Starkey@....com" <Brian.Starkey@....com>,
"benjamin.gaignard@...labora.com" <benjamin.gaignard@...labora.com>,
"tjmercier@...gle.com" <tjmercier@...gle.com>,
"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "joakim.bech@...aro.org"
<joakim.bech@...aro.org>, "ppaalanen@...il.com" <ppaalanen@...il.com>,
Jianjiao Zeng (曾健姣)
<Jianjiao.Zeng@...iatek.com>, Youlin Pei (裴友林)
<youlin.pei@...iatek.com>
Subject: Re: [PATCH v5 2/9] scatterlist: Add a flag for the restricted memory
On Thu, 2024-05-16 at 11:59 +0200, AngeloGioacchino Del Regno wrote:
> Il 15/05/24 13:23, Yong Wu ha scritto:
> > Introduce a FLAG for the restricted memory which means the memory
> > is
> > protected by TEE or hypervisor, then it's inaccessiable for kernel.
> >
> > Currently we don't use sg_dma_unmark_restricted, thus this
> > interface
> > has not been added.
> >
> > Signed-off-by: Yong Wu <yong.wu@...iatek.com>
> > ---
> > include/linux/scatterlist.h | 34
> > ++++++++++++++++++++++++++++++++++
> > 1 file changed, 34 insertions(+)
> >
> > diff --git a/include/linux/scatterlist.h
> > b/include/linux/scatterlist.h
> > index 77df3d7b18a6..a6ad9018eca0 100644
> > --- a/include/linux/scatterlist.h
> > +++ b/include/linux/scatterlist.h
> > @@ -282,6 +282,7 @@ static inline void sg_unmark_end(struct
> > scatterlist *sg)
> >
> > #define SG_DMA_BUS_ADDRESS (1 << 0)
> > #define SG_DMA_SWIOTLB (1 << 1)
> > +#define SG_DMA_RESTRICTED (2 << 1)
>
> I think you wanted to write (1 << 2) here :-)
Apparently, you are right:)
Thanks.
>
> Cheers,
> Angelo
Powered by blists - more mailing lists