Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238573
| From | Nishanth Aravamudan <nacc@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/5 v2] dma-mapping: add generic dma_get_page_shift API |
| Date | 2015-10-02 22:20 +0200 |
| Message-ID | <qfeYa-5qP-7@gated-at.bofh.it> (permalink) |
| References | <qfc9X-1mW-5@gated-at.bofh.it> <qfeYa-5qP-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Drivers like NVMe need to be able to determine the page size used for
DMA transfers. Add a new API that defaults to return PAGE_SHIFT on all
architectures.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
index b1bc954..86e4e97 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -355,4 +355,11 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
}
#endif
+#ifndef HAVE_ARCH_DMA_GET_PAGE_SHIFT
+static inline unsigned long dma_get_page_shift(struct device *dev)
+{
+ return PAGE_SHIFT;
+}
+#endif
+
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] Fix NVMe driver support on Power with 32-bit DMA Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 19:20 +0200
[PATCH 1/2] powerpc/iommu: expose IOMMU page shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 19:20 +0200
[PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 19:30 +0200
Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power Christoph Hellwig <hch@infradead.org> - 2015-10-02 19:30 +0200
Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 19:50 +0200
Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power Christoph Hellwig <hch@infradead.org> - 2015-10-02 19:50 +0200
[PATCH 2/5 v2] powerpc/dma-mapping: override dma_get_page_shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:20 +0200
[PATCH 3/5 v2] powerpc/dma: implement per-platform dma_get_page_shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:20 +0200
[PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:30 +0200
[PATCH 5/5 v2] drivers/nvme: default to the IOMMU page size Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:40 +0200
Re: [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift kbuild test robot <lkp@intel.com> - 2015-10-02 22:40 +0200
[PATCH 1/5 v2] dma-mapping: add generic dma_get_page_shift API Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:20 +0200
[PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 22:20 +0200
Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-02 23:10 +0200
Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-10-02 23:40 +0200
Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-10-03 00:00 +0200
Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-10-02 23:30 +0200
Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA Christoph Hellwig <hch@infradead.org> - 2015-10-03 10:30 +0200
csiph-web