mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
UPSTREAM: powerpc/svm: stop using io_tlb_start
Use the local variable that is passed to swiotlb_init_with_tbl for
freeing the memory in the failure case to isolate the code a little
better from swiotlb internals.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 9906aa5bd6)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 190591509
Change-Id: Id42b806e3624a1fd2fbb4f3540cfb7eccc2845e8
This commit is contained in:
committed by
Will Deacon
parent
83a0fecafb
commit
4351690b07
@@ -55,9 +55,9 @@ void __init svm_swiotlb_init(void)
|
||||
if (vstart && !swiotlb_init_with_tbl(vstart, io_tlb_nslabs, false))
|
||||
return;
|
||||
|
||||
if (io_tlb_start)
|
||||
memblock_free_early(io_tlb_start,
|
||||
PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
|
||||
|
||||
memblock_free_early(__pa(vstart),
|
||||
PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
|
||||
panic("SVM: Cannot allocate SWIOTLB buffer");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user