[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d9637b40196873f392ac9cebfe369106a6f0eee7.camel@mediatek.com>
Date: Wed, 16 Feb 2022 13:54:59 +0800
From: Yong Wu <yong.wu@...iatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
CC: Robin Murphy <robin.murphy@....com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Tomasz Figa <tfiga@...omium.org>,
<linux-mediatek@...ts.infradead.org>,
<srv_heupstream@...iatek.com>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<iommu@...ts.linux-foundation.org>,
Hsin-Yi Wang <hsinyi@...omium.org>, <youlin.pei@...iatek.com>,
<anan.sun@...iatek.com>, <xueqi.zhang@...iatek.com>,
<yen-chang.chen@...iatek.com>, <mingyuan.ma@...iatek.com>,
<yf.wang@...iatek.com>, <libo.kang@...iatek.com>,
<chengci.xu@...iatek.com>, Joerg Roedel <joro@...tes.org>,
Rob Herring <robh+dt@...nel.org>,
"Matthias Brugger" <matthias.bgg@...il.com>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v4 08/35] iommu/mediatek: Use kmalloc for protect buffer
On Thu, 2022-01-27 at 12:08 +0100, AngeloGioacchino Del Regno wrote:
> Il 25/01/22 09:56, Yong Wu ha scritto:
> > No need zero for the protect buffer that is only accessed by the
> > IOMMU HW
> > translation fault happened.
> >
> > Signed-off-by: Yong Wu <yong.wu@...iatek.com>
>
> I would rather keep this a devm_kzalloc instead... the cost is very
> minimal and
> this will be handy when new hardware will be introduced, as it may
> require a bigger
> buffer: in that case, "older" platforms will use only part of it and
> we may get
> garbage data at the end.
Currently this is to avoid zero 512 bytes for all the platforms.
Sorry, I don't understand why it is unnecessary when the new hardware
requires a bigger buffer. If the buffer becomes bigger, then clearing
it to 0 need more cost. then this patch is more helpful?
The content in this buffer is garbage, we won't care about or analyse
it.
>
> Regards,
> Angelo
Powered by blists - more mailing lists