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
30 unsigned int *nents, u32 length);30 unsigned int *nents, u32 length);
31void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl);31void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl);
32void pci_p2pmem_publish(struct pci_dev *pdev, bool publish);32void pci_p2pmem_publish(struct pci_dev *pdev, bool publish);
33int pci_p2pdma_map_sg(struct device *dev, struct scatterlist *sg, int nents,33int pci_p2pdma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
34 enum dma_data_direction dir);34 int nents, enum dma_data_direction dir, unsigned long attrs);
35int pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev,35int pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev,
36 bool *use_p2pdma);36 bool *use_p2pdma);
37ssize_t pci_p2pdma_enable_show(char *page, struct pci_dev *p2p_dev,37ssize_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
81static inline void pci_p2pmem_publish(struct pci_dev *pdev, bool publish)81static inline void pci_p2pmem_publish(struct pci_dev *pdev, bool publish)
82{82{
83}83}
84static inline int pci_p2pdma_map_sg(struct device *dev,84static inline int pci_p2pdma_map_sg_attrs(struct device *dev,
85 struct scatterlist *sg, int nents, enum dma_data_direction dir)85 struct scatterlist *sg, int nents, enum dma_data_direction dir,
86 unsigned long attrs)
86{87{
87 return 0;88 return 0;
88}89}
@@ -111,4 +112,10 @@ static inline struct pci_dev *pci_p2pmem_find(struct device *client) · 22 unmodified lines
111 return pci_p2pmem_find_many(&client, 1);112 return pci_p2pmem_find_many(&client, 1);
112}113}
113 114
115static 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
114#endif /* _LINUX_PCI_P2P_H */121#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