[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <770332a7-f34d-fe26-f708-830b587a98d5@intel.com>
Date: Tue, 16 Mar 2021 10:15:48 +0800
From: Jie Deng <jie.deng@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Jason Wang <jasowang@...hat.com>,
Linux I2C <linux-i2c@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Wolfram Sang <wsa@...nel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
conghui.chen@...el.com, kblaiech@...lanox.com,
jarkko.nikula@...ux.intel.com,
Sergey Semin <Sergey.Semin@...kalelectronics.ru>,
Mike Rapoport <rppt@...nel.org>, loic.poulain@...aro.org,
Tali Perry <tali.perry1@...il.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
yu1.wang@...el.com, shuo.a.liu@...el.com,
Viresh Kumar <viresh.kumar@...aro.org>,
Stefan Hajnoczi <stefanha@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v7] i2c: virtio: add a virtio i2c frontend driver
On 2021/3/15 15:52, Arnd Bergmann wrote:
> On Mon, Mar 15, 2021 at 6:54 AM Jie Deng <jie.deng@...el.com> wrote:
>> On 2021/3/15 11:13, Jason Wang wrote:
>>> On 2021/3/15 9:14 上午, Jie Deng wrote:
>>>> On 2021/3/12 16:58, Arnd Bergmann wrote:
>> Then do you think it is necessary to mark the virtio bufs with
>> ____cacheline_aligned ?
> I think so, yes.
>
>> I haven't seen any virtio interface being marked yet. If this is a
>> problem, I believe it should be common for all virtio devices, right ?
> Yes, but it's not a problem if the buffers are allocated separately
> because kmalloc provinces a cachelinen aligned buffer on architectures
> that need it.
>
> It's only a problem here because there is a single allocation for three
> objects that have different ownership states during the DMA (device
> owned to-device, cpu-owned, device owned to-cpu).
>
> Arnd
I'm not sure if this will actually cause a problem. But I'm OK to mark
the items
in struct virtio_i2c_req with ____cacheline_aligned to avoid potential
problem
as you said.
Thank you.
Powered by blists - more mailing lists