Re: [PATCH 2/7] OF: Simplify DMA range calculations

From
Jason Gunthorpe <jgg@ziepe.ca>
Date
2023-11-30 00:46:11
Also in
linux-acpi, linux-arm-kernel, linux-iommu, lkml
Reply to
Robin Murphy, 2023-11-29
On Wed, Nov 29, 2023 at 05:42:59PM +0000, Robin Murphy wrote:
Juggling start, end, and size values for a range is somewhat redundant
and a little hard to follow. Consolidate down to just using inclusive
start and end, which saves us worrying about size overflows for full
64-bit ranges (note that passing a potentially-overflowed value through
to arch_setup_dma_ops() is benign for all current implementations, and
this is working towards removing that anyway).
In iommu code I've been trying to use consistent language with other
parts of the kernel like interval tree and maple tree:

 * In this file the term 'last' indicates an inclusive and closed interval, eg
 * [0,0] refers to a single PFN. 'end' means an open range, eg [0,0) refers to
 * no PFNs.

Here I think you've swapped end to mean last?

Regardless the change looks correct

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason
Thread (29 messages) 29 messages, 6 authors, last reply 2023-12-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help