History

PCI/P2PDMA: Add attrs argument to pci_p2pdma_map_sg()

This is to match the dma_map_sg() API which this function will have to call in an future patch. Add a pci_p2pdma_map_sg_attrs() function and helper to call it with no attributes just like the dma_map_sg() function.

Logan Gunthorpe committed 7 years ago

Commit 2b9f4bb1 parent 494d63b3 files · +17 −9Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/pci-p2pdma.h+11−4
@@ -30,8 +30,8 @@ struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev, · 29 unmodified lines
3030 unsigned int *nents, u32 length);
3131 void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl);
3232 void pci_p2pmem_publish(struct pci_dev *pdev, bool publish);
33−int pci_p2pdma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
34− enum dma_data_direction dir);
33+int pci_p2pdma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
34+ int nents, enum dma_data_direction dir, unsigned long attrs);
3535 int pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev,
3636 bool *use_p2pdma);
3737 ssize_t pci_p2pdma_enable_show(char *page, struct pci_dev *p2p_dev,
@@ -81,8 +81,9 @@ static inline void pci_p2pmem_free_sgl(struct pci_dev *pdev, · 43 unmodified lines
8181 static inline void pci_p2pmem_publish(struct pci_dev *pdev, bool publish)
8282 {
8383 }
84−static inline int pci_p2pdma_map_sg(struct device *dev,
85− struct scatterlist *sg, int nents, enum dma_data_direction dir)
84+static inline int pci_p2pdma_map_sg_attrs(struct device *dev,
85+ struct scatterlist *sg, int nents, enum dma_data_direction dir,
86+ unsigned long attrs)
8687 {
8788 return 0;
8889 }
@@ -111,4 +112,10 @@ static inline struct pci_dev *pci_p2pmem_find(struct device *client) · 22 unmodified lines
111112 return pci_p2pmem_find_many(&client, 1);
112113 }
113114
115+static inline int pci_p2pdma_map_sg(struct device *dev, struct scatterlist *sg,
116+ int nents, enum dma_data_direction dir)
117+{
118+ return pci_p2pdma_map_sg_attrs(dev, sg, nents, dir, 0);
119+}
120+
114121 #endif /* _LINUX_PCI_P2P_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t