Skip to content

Commit 81c12e9

Browse files
Yu ZhaoChristoph Hellwig
authored andcommitted
Revert "swiotlb: panic if nslabs is too small"
This reverts commit 0bf28fc. Reasons: 1. new panic()s shouldn't be added [1]. 2. It does no "cleanup" but breaks MIPS [2]. v2: properly solved the conflict [3] with commit 20347fc ("swiotlb: split up the global swiotlb lock") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> [1] https://lore.kernel.org/r/CAHk-=wit-DmhMfQErY29JSPjFgebx_Ld+pnerc4J2Ag990WwAA@mail.gmail.com/ [2] https://lore.kernel.org/r/[email protected]/ [3] https://lore.kernel.org/r/[email protected]/ Fixes: 0bf28fc ("swiotlb: panic if nslabs is too small") Signed-off-by: Yu Zhao <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 0066f1b commit 81c12e9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/dma/swiotlb.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,6 @@ void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags,
326326
swiotlb_adjust_nareas(num_possible_cpus());
327327

328328
nslabs = default_nslabs;
329-
if (nslabs < IO_TLB_MIN_SLABS)
330-
panic("%s: nslabs = %lu too small\n", __func__, nslabs);
331-
332329
/*
333330
* By default allocate the bounce buffer memory from low memory, but
334331
* allow to pick a location everywhere for hypervisors with guest
@@ -341,8 +338,7 @@ void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags,
341338
else
342339
tlb = memblock_alloc_low(bytes, PAGE_SIZE);
343340
if (!tlb) {
344-
pr_warn("%s: Failed to allocate %zu bytes tlb structure\n",
345-
__func__, bytes);
341+
pr_warn("%s: failed to allocate tlb structure\n", __func__);
346342
return;
347343
}
348344

0 commit comments

Comments
 (0)