Commit 35d8ba2
PCI/P2PDMA: Introduce p2pdma_provider structure for cleaner abstraction
Extract the core P2PDMA provider information (device owner and bus
offset) from the dev_pagemap into a dedicated p2pdma_provider structure.
This creates a cleaner separation between the memory management layer and
the P2PDMA functionality.
The new p2pdma_provider structure contains:
- owner: pointer to the providing device
- bus_offset: computed offset for non-host transactions
This refactoring simplifies the P2PDMA state management by removing
the need to access pgmap internals directly. The pci_p2pdma_map_state
now stores a pointer to the provider instead of the pgmap, making
the API more explicit and easier to understand.
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>1 parent ac93cfa commit 35d8ba2
2 files changed
Lines changed: 37 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
207 | | - | |
208 | | - | |
| 206 | + | |
| 207 | + | |
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
| |||
270 | 269 | | |
271 | 270 | | |
272 | 271 | | |
273 | | - | |
| 272 | + | |
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
280 | | - | |
| 279 | + | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
| |||
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
343 | | - | |
| 342 | + | |
344 | 343 | | |
345 | 344 | | |
346 | 345 | | |
| |||
973 | 972 | | |
974 | 973 | | |
975 | 974 | | |
976 | | - | |
977 | | - | |
| 975 | + | |
| 976 | + | |
978 | 977 | | |
979 | 978 | | |
980 | | - | |
| 979 | + | |
981 | 980 | | |
982 | 981 | | |
983 | 982 | | |
984 | 983 | | |
985 | | - | |
| 984 | + | |
986 | 985 | | |
987 | 986 | | |
988 | 987 | | |
| |||
991 | 990 | | |
992 | 991 | | |
993 | 992 | | |
994 | | - | |
| 993 | + | |
995 | 994 | | |
996 | 995 | | |
997 | 996 | | |
998 | 997 | | |
999 | 998 | | |
1000 | 999 | | |
1001 | 1000 | | |
1002 | | - | |
| 1001 | + | |
1003 | 1002 | | |
1004 | 1003 | | |
1005 | 1004 | | |
1006 | 1005 | | |
1007 | 1006 | | |
1008 | 1007 | | |
1009 | 1008 | | |
1010 | | - | |
1011 | | - | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1012 | 1016 | | |
1013 | 1017 | | |
1014 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
147 | | - | |
| 157 | + | |
148 | 158 | | |
149 | 159 | | |
150 | 160 | | |
| 161 | + | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
| |||
166 | 177 | | |
167 | 178 | | |
168 | 179 | | |
169 | | - | |
170 | | - | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
| |||
185 | 195 | | |
186 | 196 | | |
187 | 197 | | |
188 | | - | |
| 198 | + | |
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
0 commit comments