aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/unix_bpf.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2025-03-10 02:47:45 +0000
committerJoerg Roedel <[email protected]>2025-03-10 08:31:02 +0000
commita8653e5cc2047b6a3354dc072a9f1ebaff157eaa (patch)
treeaf23cd495d32b2e171d4fe4e48d3ebc596c869c8 /net/unix/unix_bpf.c
parentiommu/vt-d: Fix system hang on reboot -f (diff)
downloadkernel-a8653e5cc2047b6a3354dc072a9f1ebaff157eaa.tar.gz
kernel-a8653e5cc2047b6a3354dc072a9f1ebaff157eaa.zip
iommu/vt-d: Use virt_to_phys()
If all the inlines are unwound virt_to_dma_pfn() is simply: return page_to_pfn(virt_to_page(p)) << (PAGE_SHIFT - VTD_PAGE_SHIFT); Which can be re-arranged to: (page_to_pfn(virt_to_page(p)) << PAGE_SHIFT) >> VTD_PAGE_SHIFT The only caller is: ((uint64_t)virt_to_dma_pfn(tmp_page) << VTD_PAGE_SHIFT) re-arranged to: ((page_to_pfn(virt_to_page(tmp_page)) << PAGE_SHIFT) >> VTD_PAGE_SHIFT) << VTD_PAGE_SHIFT Which simplifies to: page_to_pfn(virt_to_page(tmp_page)) << PAGE_SHIFT That is the same as virt_to_phys(tmp_page), so just remove all of this. Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions