public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Howard Yen <howardyen@google.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Robin Murphy <robin.murphy@arm.com>,
	hch@lst.de, m.szyprowski@samsung.com,
	petr.tesarik.ext@huawei.com, rafael@kernel.org,
	broonie@kernel.org, james@equiv.tech, james.clark@arm.com,
	masahiroy@kernel.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux.dev
Subject: Re: [PATCH] dma-coherent: add support for multi coherent rmems per dev
Date: Fri, 2 Feb 2024 17:09:18 +0200	[thread overview]
Message-ID: <Zb0Fng6g-PjNznCH@smile.fi.intel.com> (raw)
In-Reply-To: <CAJDAHvZ=XVZ-Ea1LVqfTnDXJ+J=PLbZNCZkuSpvdOtEsreguWw@mail.gmail.com>

On Fri, Feb 02, 2024 at 12:40:59PM +0800, Howard Yen wrote:
> On Thu, Feb 1, 2024 at 11:41 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Thu, Feb 01, 2024 at 10:45:30AM +0000, Robin Murphy wrote:
> > > On 2024-02-01 9:35 am, Howard Yen wrote:

...

> I'm considering to modify the change to
> 
> 1. Move it into the dma_coherent_mem structure, like
> 
>      HEAD
> mem0->node
> 
> This case, if I check list_empty(mem0->node), it would give me the
> list is empty, but actually there is one rmem.
> 
> 2. Replace the pointer to a list_head.
> 
>     HEAD
> dma_mems ---> mem0->node
> 
> This case, if I check list_empty(dma_mems), it would give me the list
> is non-empty, it matches the actual status.
> 
> So, the 2nd looks reasonable, I'm going to upload a v2 patch with the
> 2nd approach, does that make sense?

I believe this is exactly what Robin told about "list to replace the pointer".

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2024-02-02 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01  9:35 [PATCH] dma-coherent: add support for multi coherent rmems per dev Howard Yen
2024-02-01 10:45 ` Robin Murphy
2024-02-01 11:45   ` Andy Shevchenko
2024-02-01 15:41   ` Greg KH
2024-02-02  4:40     ` Howard Yen
2024-02-02 15:09       ` Andy Shevchenko [this message]

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=Zb0Fng6g-PjNznCH@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=howardyen@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=james.clark@arm.com \
    --cc=james@equiv.tech \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=masahiroy@kernel.org \
    --cc=petr.tesarik.ext@huawei.com \
    --cc=rafael@kernel.org \
    --cc=robin.murphy@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox