projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fbc02a
)
dma-mapping: take dma_pfn_offset into account in dma_max_pfn
author
Christoph Hellwig
<hch@lst.de>
Thu, 30 Nov 2017 15:32:51 +0000
(07:32 -0800)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 10 Jan 2018 15:25:06 +0000
(16:25 +0100)
This makes sure the generic version can be used with architectures /
devices that have a DMA offset in the direct mapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
include/linux/dma-mapping.h
patch
|
blob
|
history
diff --git
a/include/linux/dma-mapping.h
b/include/linux/dma-mapping.h
index 81ed9b2d84dcc78e1b2213e9a22efd0f4f384330..d84951865be7207446ad67703513809f54ac802f 100644
(file)
--- a/
include/linux/dma-mapping.h
+++ b/
include/linux/dma-mapping.h
@@
-692,7
+692,7
@@
static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask)
#ifndef dma_max_pfn
static inline unsigned long dma_max_pfn(struct device *dev)
{
- return
*dev->dma_mask >> PAGE_SHIFT
;
+ return
(*dev->dma_mask >> PAGE_SHIFT) + dev->dma_pfn_offset
;
}
#endif