[PATCH 01/31] scatterlist: add sg_pfn and sg_has_page helpers
Christoph Hellwig
hch at lst.de
Wed Aug 12 17:05:20 AEST 2015
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
include/linux/scatterlist.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 9b1ef0c..b1056bf 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -230,6 +230,16 @@ static inline dma_addr_t sg_phys(struct scatterlist *sg)
return page_to_phys(sg_page(sg)) + sg->offset;
}
+static inline unsigned long sg_pfn(struct scatterlist *sg)
+{
+ return page_to_pfn(sg_page(sg));
+}
+
+static inline bool sg_has_page(struct scatterlist *sg)
+{
+ return true;
+}
+
/**
* sg_virt - Return virtual address of an sg entry
* @sg: SG entry
--
1.9.1
More information about the Linuxppc-dev
mailing list