Commit 565ca360 authored by Mike Rapoport's avatar Mike Rapoport Committed by Todd Kjos
Browse files

BACKPORT: dma-mapping: remove bogus test for pfn_valid from dma_map_resource

dma_map_resource() uses pfn_valid() to ensure the range is not RAM.
However, pfn_valid() only checks for availability of the memory map for a
PFN but it does not ensure that the PFN is actually backed by RAM.

As dma_map_resource() is the only method in DMA mapping APIs that has this
check, simply drop the pfn_valid() test from dma_map_resource().

Link: https://lore.kernel.org/all/20210824173741.GC623@arm.com/


Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20210930013039.11260-2-rppt@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>

Bug: 228454859
(cherry picked from commit a9c38c5d)
Change-Id: Iae9d77b018d728a0cfaf5f4fd7e14311aa463659
Signed-off-by: default avatarGeorgi Djakov <quic_c_gdjako@quicinc.com>
parent 521f2e62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment