From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: iommu@lists.linux-foundation.org, robin.murphy@arm.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] dma-mapping: align default segment_boundary_mask with dma_mask
Date: Mon, 16 Mar 2020 14:45:06 -0700 [thread overview]
Message-ID: <20200316214506.GC18970@Asurada-Nvidia.nvidia.com> (raw)
In-Reply-To: <20200316124850.GB17386@lst.de>
Hi Christoph,
On Mon, Mar 16, 2020 at 01:48:50PM +0100, Christoph Hellwig wrote:
> On Fri, Mar 13, 2020 at 05:00:07PM -0700, Nicolin Chen wrote:
> > @@ -736,7 +736,7 @@ static inline unsigned long dma_get_seg_boundary(struct device *dev)
> > {
> > if (dev->dma_parms && dev->dma_parms->segment_boundary_mask)
> > return dev->dma_parms->segment_boundary_mask;
> > - return DMA_BIT_MASK(32);
> > + return (unsigned long)dma_get_mask(dev);
>
> Just thinking out loud after my reply - shouldn't we just return ULONG_MAX
> by default here to mark this as no limit?
Yea, ULONG_MAX (saying no limit) sounds good to me.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: robin.murphy@arm.com, m.szyprowski@samsung.com,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [RFC][PATCH] dma-mapping: align default segment_boundary_mask with dma_mask
Date: Mon, 16 Mar 2020 14:45:06 -0700 [thread overview]
Message-ID: <20200316214506.GC18970@Asurada-Nvidia.nvidia.com> (raw)
In-Reply-To: <20200316124850.GB17386@lst.de>
Hi Christoph,
On Mon, Mar 16, 2020 at 01:48:50PM +0100, Christoph Hellwig wrote:
> On Fri, Mar 13, 2020 at 05:00:07PM -0700, Nicolin Chen wrote:
> > @@ -736,7 +736,7 @@ static inline unsigned long dma_get_seg_boundary(struct device *dev)
> > {
> > if (dev->dma_parms && dev->dma_parms->segment_boundary_mask)
> > return dev->dma_parms->segment_boundary_mask;
> > - return DMA_BIT_MASK(32);
> > + return (unsigned long)dma_get_mask(dev);
>
> Just thinking out loud after my reply - shouldn't we just return ULONG_MAX
> by default here to mark this as no limit?
Yea, ULONG_MAX (saying no limit) sounds good to me.
next prev parent reply other threads:[~2020-03-16 21:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 0:00 [RFC][PATCH] dma-mapping: align default segment_boundary_mask with dma_mask Nicolin Chen
2020-03-14 0:00 ` Nicolin Chen
2020-03-16 10:45 ` Christoph Hellwig
2020-03-16 10:45 ` Christoph Hellwig
2020-03-16 12:12 ` Robin Murphy
2020-03-16 12:12 ` Robin Murphy
2020-03-16 12:46 ` Christoph Hellwig
2020-03-16 12:46 ` Christoph Hellwig
2020-03-16 13:16 ` Robin Murphy
2020-03-16 13:16 ` Robin Murphy
2020-03-16 21:42 ` Nicolin Chen
2020-03-16 21:42 ` Nicolin Chen
2020-03-16 21:39 ` Nicolin Chen
2020-03-16 21:39 ` Nicolin Chen
2020-03-16 12:48 ` Christoph Hellwig
2020-03-16 12:48 ` Christoph Hellwig
2020-03-16 21:45 ` Nicolin Chen [this message]
2020-03-16 21:45 ` Nicolin Chen
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=20200316214506.GC18970@Asurada-Nvidia.nvidia.com \
--to=nicoleotsuka@gmail.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.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 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.