Commit 4f956c9
iommu/mediatek: Move domain_finalise into attach_device
Currently domain_alloc only has a parameter(type), We have no chance to
input some special data. This patch moves the domain_finalise into
attach_device which has the device information, then could update
the domain's geometry.aperture ranges for each a device.
Strictly, I should use the data from mtk_iommu_get_m4u_data as the
parameter of mtk_iommu_domain_finalise in this patch. but dom->data
only is used in tlb ops in which the data is get from the m4u_list, thus
it is ok here.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Link: https://lore.kernel.org/r/20210111111914.22211-25-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>1 parent 08500c4 commit 4f956c9
1 file changed
Lines changed: 12 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
| 332 | + | |
332 | 333 | | |
333 | | - | |
334 | | - | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
| |||
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
355 | | - | |
356 | 354 | | |
357 | 355 | | |
358 | 356 | | |
| |||
369 | 367 | | |
370 | 368 | | |
371 | 369 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
377 | 374 | | |
378 | 375 | | |
379 | 376 | | |
380 | 377 | | |
381 | | - | |
382 | 378 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | 379 | | |
390 | 380 | | |
391 | 381 | | |
392 | 382 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | 383 | | |
397 | 384 | | |
398 | 385 | | |
| |||
408 | 395 | | |
409 | 396 | | |
410 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
411 | 404 | | |
412 | 405 | | |
413 | 406 | | |
| |||
0 commit comments