~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pci-p2pdma.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/pci-p2pdma.h (Version linux-6.12-rc7) and /include/linux/pci-p2pdma.h (Version linux-6.9.12)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * PCI Peer 2 Peer DMA support.                     3  * PCI Peer 2 Peer DMA support.
  4  *                                                  4  *
  5  * Copyright (c) 2016-2018, Logan Gunthorpe         5  * Copyright (c) 2016-2018, Logan Gunthorpe
  6  * Copyright (c) 2016-2017, Microsemi Corporat      6  * Copyright (c) 2016-2017, Microsemi Corporation
  7  * Copyright (c) 2017, Christoph Hellwig            7  * Copyright (c) 2017, Christoph Hellwig
  8  * Copyright (c) 2018, Eideticom Inc.               8  * Copyright (c) 2018, Eideticom Inc.
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef _LINUX_PCI_P2PDMA_H                        11 #ifndef _LINUX_PCI_P2PDMA_H
 12 #define _LINUX_PCI_P2PDMA_H                        12 #define _LINUX_PCI_P2PDMA_H
 13                                                    13 
 14 #include <linux/pci.h>                             14 #include <linux/pci.h>
 15                                                    15 
 16 struct block_device;                               16 struct block_device;
 17 struct scatterlist;                                17 struct scatterlist;
 18                                                    18 
 19 #ifdef CONFIG_PCI_P2PDMA                           19 #ifdef CONFIG_PCI_P2PDMA
 20 int pci_p2pdma_add_resource(struct pci_dev *pd     20 int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
 21                 u64 offset);                       21                 u64 offset);
 22 int pci_p2pdma_distance_many(struct pci_dev *p     22 int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients,
 23                              int num_clients,      23                              int num_clients, bool verbose);
 24 bool pci_has_p2pmem(struct pci_dev *pdev);         24 bool pci_has_p2pmem(struct pci_dev *pdev);
 25 struct pci_dev *pci_p2pmem_find_many(struct de     25 struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients);
 26 void *pci_alloc_p2pmem(struct pci_dev *pdev, s     26 void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size);
 27 void pci_free_p2pmem(struct pci_dev *pdev, voi     27 void pci_free_p2pmem(struct pci_dev *pdev, void *addr, size_t size);
 28 pci_bus_addr_t pci_p2pmem_virt_to_bus(struct p     28 pci_bus_addr_t pci_p2pmem_virt_to_bus(struct pci_dev *pdev, void *addr);
 29 struct scatterlist *pci_p2pmem_alloc_sgl(struc     29 struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev,
 30                                          unsig     30                                          unsigned int *nents, u32 length);
 31 void pci_p2pmem_free_sgl(struct pci_dev *pdev,     31 void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl);
 32 void pci_p2pmem_publish(struct pci_dev *pdev,      32 void pci_p2pmem_publish(struct pci_dev *pdev, bool publish);
 33 int pci_p2pdma_enable_store(const char *page,      33 int pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev,
 34                             bool *use_p2pdma);     34                             bool *use_p2pdma);
 35 ssize_t pci_p2pdma_enable_show(char *page, str     35 ssize_t pci_p2pdma_enable_show(char *page, struct pci_dev *p2p_dev,
 36                                bool use_p2pdma     36                                bool use_p2pdma);
 37 #else /* CONFIG_PCI_P2PDMA */                      37 #else /* CONFIG_PCI_P2PDMA */
 38 static inline int pci_p2pdma_add_resource(stru     38 static inline int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar,
 39                 size_t size, u64 offset)           39                 size_t size, u64 offset)
 40 {                                                  40 {
 41         return -EOPNOTSUPP;                        41         return -EOPNOTSUPP;
 42 }                                                  42 }
 43 static inline int pci_p2pdma_distance_many(str     43 static inline int pci_p2pdma_distance_many(struct pci_dev *provider,
 44         struct device **clients, int num_clien     44         struct device **clients, int num_clients, bool verbose)
 45 {                                                  45 {
 46         return -1;                                 46         return -1;
 47 }                                                  47 }
 48 static inline bool pci_has_p2pmem(struct pci_d     48 static inline bool pci_has_p2pmem(struct pci_dev *pdev)
 49 {                                                  49 {
 50         return false;                              50         return false;
 51 }                                                  51 }
 52 static inline struct pci_dev *pci_p2pmem_find_     52 static inline struct pci_dev *pci_p2pmem_find_many(struct device **clients,
 53                                                    53                                                    int num_clients)
 54 {                                                  54 {
 55         return NULL;                               55         return NULL;
 56 }                                                  56 }
 57 static inline void *pci_alloc_p2pmem(struct pc     57 static inline void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
 58 {                                                  58 {
 59         return NULL;                               59         return NULL;
 60 }                                                  60 }
 61 static inline void pci_free_p2pmem(struct pci_     61 static inline void pci_free_p2pmem(struct pci_dev *pdev, void *addr,
 62                 size_t size)                       62                 size_t size)
 63 {                                                  63 {
 64 }                                                  64 }
 65 static inline pci_bus_addr_t pci_p2pmem_virt_t     65 static inline pci_bus_addr_t pci_p2pmem_virt_to_bus(struct pci_dev *pdev,
 66                                                    66                                                     void *addr)
 67 {                                                  67 {
 68         return 0;                                  68         return 0;
 69 }                                                  69 }
 70 static inline struct scatterlist *pci_p2pmem_a     70 static inline struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev,
 71                 unsigned int *nents, u32 lengt     71                 unsigned int *nents, u32 length)
 72 {                                                  72 {
 73         return NULL;                               73         return NULL;
 74 }                                                  74 }
 75 static inline void pci_p2pmem_free_sgl(struct      75 static inline void pci_p2pmem_free_sgl(struct pci_dev *pdev,
 76                 struct scatterlist *sgl)           76                 struct scatterlist *sgl)
 77 {                                                  77 {
 78 }                                                  78 }
 79 static inline void pci_p2pmem_publish(struct p     79 static inline void pci_p2pmem_publish(struct pci_dev *pdev, bool publish)
 80 {                                                  80 {
 81 }                                                  81 }
 82 static inline int pci_p2pdma_enable_store(cons     82 static inline int pci_p2pdma_enable_store(const char *page,
 83                 struct pci_dev **p2p_dev, bool     83                 struct pci_dev **p2p_dev, bool *use_p2pdma)
 84 {                                                  84 {
 85         *use_p2pdma = false;                       85         *use_p2pdma = false;
 86         return 0;                                  86         return 0;
 87 }                                                  87 }
 88 static inline ssize_t pci_p2pdma_enable_show(c     88 static inline ssize_t pci_p2pdma_enable_show(char *page,
 89                 struct pci_dev *p2p_dev, bool      89                 struct pci_dev *p2p_dev, bool use_p2pdma)
 90 {                                                  90 {
 91         return sprintf(page, "none\n");            91         return sprintf(page, "none\n");
 92 }                                                  92 }
 93 #endif /* CONFIG_PCI_P2PDMA */                     93 #endif /* CONFIG_PCI_P2PDMA */
 94                                                    94 
 95                                                    95 
 96 static inline int pci_p2pdma_distance(struct p     96 static inline int pci_p2pdma_distance(struct pci_dev *provider,
 97         struct device *client, bool verbose)       97         struct device *client, bool verbose)
 98 {                                                  98 {
 99         return pci_p2pdma_distance_many(provid     99         return pci_p2pdma_distance_many(provider, &client, 1, verbose);
100 }                                                 100 }
101                                                   101 
102 static inline struct pci_dev *pci_p2pmem_find(    102 static inline struct pci_dev *pci_p2pmem_find(struct device *client)
103 {                                                 103 {
104         return pci_p2pmem_find_many(&client, 1    104         return pci_p2pmem_find_many(&client, 1);
105 }                                                 105 }
106                                                   106 
107 #endif /* _LINUX_PCI_P2P_H */                     107 #endif /* _LINUX_PCI_P2P_H */
108                                                   108 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php